 //Note that you do not have to dojo.require anything
  //in order to use the fade functions, as they are included
  //in the base.


  /*function cambiaEstilo(id) {
      document.getElementById(id).className='box2';
  }

  function vuelveEstilo(id, estilo) {
      document.getElementById(id).className=estilo;
  }

  /*  function cambiaEstiloN(id) {
      var st= document.getElementById(id).style;
      st.color='#123280';
      st.backgroundColor='#ffc';
      st.fontWeight='bold';
  }

  function vuelveEstiloN(id) {
      var st= document.getElementById(id).style;
      st.color='black';
      st.backgroundColor='#ddd';
      st.fontWeight='normal';
  }*/

  function cambiaNegrita(id) {
      var st= document.getElementById(id).style;
      //st.fontWeight='bold';
      st.border='solid 1px';
  }

  function vuelveNegrita(id) {
      var st= document.getElementById(id).style;
      //st.fontWeight='normal';
      st.border='none';
  }
/*
  function cambiaEstilo2(id) {
      var st= document.getElementById(id).style;

      st.color='white';
      st.backgroundColor='#123280';
      st.fontWeight='bold';
  }

  function prueba(i,st){
            var st= document.getElementById("img1").style;
            st.width=i+'%';
            st.heigth==i+'%';
  }

  function setColor(id, color){
            var st= document.getElementById(id).style;
           st.backgroundColor=color;
  }
*/


  function escala(escal,id){
    var st= document.getElementById(id).style;
     st.height=escal+'%';
     st.width=escal+'%';

  }

  function tam(escal,id){
    var st= document.getElementById(id).style;
    st.height=escal+'px';
    st.width='';
  }

      var es=10;
      var next=0;
      var actual;
  function escalaG(escal, id){
      var st= document.getElementById(id).style;
      var imgs=new Array(6);
      actual=document.getElementById(id);

      for(i=0;i<6;i++){
        imgs[i]=document.getElementById('f'+i);

      }
      st.display = 'block';
      setTimeout (nextEscal,1);

        function nextEscal(){

         st.height=es+'px';
        // st.width=es+'%';
         es+=1;

         if (escal>es){
             setTimeout (nextEscal,0.0001);
         }else{
             es=0;
             setTimeout (cambiaImg,2000);
         }
     }

    function cambiaImg(){

        if (next>4)next=0;
        else next++;

        oscurece();
        actual.src=imgs[next].src;


    }
    function oscurece(){
        actual.style.opacity ="50%";
        actual.style.zIndex=0;
        setTimeout (cambiaImg,2000);
    }

  }

   function slideshow(id){
       var st= document.getElementById(id);
       setTimeout (cambiaImg,1000);

      function cambiaImg(){
            st.src=imgs[next].src;
            if (next>5)next=0;
            else next++;
            setTimeout (cambiaImg,1000);
      }
   }

   function ini(){
       var ie = navigator.userAgent.toLowerCase().indexOf('msie')!=-1;
       if(ie){
         //  document.getElementById("tem").style.width="78%";
         //  document.getElementById("box").style.width="200px";
          // document.getElementById("tabla").style.marginLeft="10%";
       }
   }




