/* Codigo JS 
   Autor:  Diego Rodero Pulido
   Fecha Creacion:  24/7/2000
   Ultima Modificacion:  24/7/2000
*/

/* deteccion del navegador (entre N4 y E4)*/
    var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);

    
 /* constantes para salvar las diferencias en cuanto a los valores de visibilidad */
    var OCULTO = (isNS) ? 'hide' : 'hidden';
    var VISIBLE = (isNS) ? 'show' : 'visible';

/**********************************************************************************************/
/*************** ESCRIBE LA FECHA *************************************************************/
/**********************************************************************************************/
fecha = new Date();
function EscribeFecha()
{
 
 mes = new Array(12);
 dia = new Array(7);
 var resul, temp;


 mes[0]='Enero';
 mes[1]='Febrero';
 mes[2]='Marzo';
 mes[3]='Abril';
 mes[4]='Mayo';
 mes[5]='Junio';
 mes[6]='Julio';
 mes[7]='Agosto';
 mes[8]='Septiembre';
 mes[9]='Octubre';
 mes[10]='Noviembre';
 mes[11]='Diciembre';

 dia[0]='Domingo';
 dia[1]='Lunes';
 dia[2]='Martes';
 dia[3]='Mi&eacute;rcoles';
 dia[4]='Jueves';
 dia[5]='Viernes';
 dia[6]='S&aacute;bado';

 if ((temp=fecha.getYear())<1900)
   temp=temp+1900;

 resul=dia[fecha.getDay()] + ', ' + fecha.getDate() + ' de ' + mes[fecha.getMonth()] + ' del ' + temp;

 return(resul);

}

/**********************************************************************************************/
/*************** SCROLL EN LA BARRA DE ESTADO *************************************************/
/**********************************************************************************************/

var texto="  ---  Bienvenido al sitio WEB del Gabinete Percial Valcarcel S.L.";
var longitud=texto.length;

function BarraEstado()
{
 hora = new Date();
 var laHora, temp;
 
 if ((temp=hora.getHours())<10)
   laHora="0" + temp + ":";
 else
   laHora=temp + ":";
 if ((temp=hora.getMinutes())<10)
   laHora+="0" + temp + ":";
 else
   laHora+=temp + ":";
 if ((temp=hora.getSeconds())<10)
   laHora+="0" + temp;
 else
   laHora+=temp; 

 texto=texto.substring(1,longitud)+texto.charAt(0);
 window.status = texto + "   " + laHora;
 setTimeout("BarraEstado()",100);

} 

/**********************************************************************************************/
/*************** MOVIMIENTO DE LA FLECHA ******************************************************/
/**********************************************************************************************/

function Mueve(num,pos)
  {  
   var aux;
   
   aux=parseInt(flecha.top);   
   if (num<pos) {  
     if (aux<alturas[pos]) {
      flecha.top=parseInt(flecha.top)+5; 
      clearTimeout(tempor);     
      tempor=setTimeout("Mueve("+num+","+pos+")",1);
     }
     else if (aux>alturas[pos]) {
      flecha.top=parseInt(flecha.top)-5; 
      clearTimeout(tempor);     
      tempor=setTimeout("Mueve("+num+","+pos+")",1);
     }
     else numero=pos;
   }
   else if (num>pos) {       
     if (aux>alturas[pos]) {
       flecha.top=parseInt(flecha.top)-5;
       clearTimeout(tempor);
       tempor=setTimeout("Mueve("+num+","+pos+")",1);
     }
     else if (aux<alturas[pos]) {
       flecha.top=parseInt(flecha.top)+5;
       clearTimeout(tempor);
       tempor=setTimeout("Mueve("+num+","+pos+")",1);
     } 
     else numero=pos;
   }   
  }
  
/**********************************************************************************************/
/*************** VISIBILIDAD DE TODOS LOS ELEMENTOS COMUNES ***********************************/
/**********************************************************************************************/
function VisiblesInicio(aux)
{
    op1.visibility=VISIBLE; sombra1.visibility=VISIBLE;
    op2.visibility=VISIBLE; sombra2.visibility=VISIBLE;
    op3.visibility=VISIBLE; sombra3.visibility=VISIBLE;
    op4.visibility=VISIBLE; sombra4.visibility=VISIBLE;
    op5.visibility=VISIBLE; sombra5.visibility=VISIBLE;
 
    if (aux!=0)  {
      op0.visibility=VISIBLE; 
      sombra0.visibility=VISIBLE;
      centro.visibility=VISIBLE;
    }
    else {
      centro0.visibility=VISIBLE; 
      img0.visibility=VISIBLE;
    }

    flecha.visibility=VISIBLE;

}