// JavaScript Document
function climostrar(nombrecapa){ 
document.getElementById(nombrecapa).style.visibility="visible";
}
function cliocultar(nombreCapa){ 
document.getElementById(nombreCapa).style.visibility="Hidden"; 
}
var timeDelay = 3;
var Pix = new Array("of1", "of2", "of3","of4");
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
function startPix() {setInterval("slideshow()", timeDelay);}
function slideshow() {
cliocultar(Pix[PicCurrentNum]);
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;}
climostrar(Pix[PicCurrentNum]);
}



function colocar(nomcapa,referencia,lmargen,tmargen){
	alert(nomcapa);
	alert(referencia);
document.getElementById(nomcapa).style.left=referencia.offsetLeft+lmargen;
document.getElementById(nomcapa).style.top=referencia.offsetTop+tmargen;
}

function Colocacion(){
	alert("colocacion");
colocar(of1,refer,0,10);	
colocar(of2,refer,0,10);	
colocar(of3,refer,0,10);	
colocar(of4,refer,0,10);	

}
function mueveReloj(){ 

	dows = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
	months = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	now = new Date();
	dow = now.getDay();
	d = now.getDate();
	m = now.getMonth();
	h = now.getTime();
	y = now.getYear();

    momentoActual = new Date();
    hora = momentoActual.getHours(); 
    minuto = momentoActual.getMinutes(); 
    segundo = momentoActual.getSeconds(); 

    str_segundo = new String (segundo) ;
    if (str_segundo.length == 1) 
       segundo = "0" + segundo; 

    str_minuto = new String (minuto); 
    if (str_minuto.length == 1) 
       minuto = "0" + minuto; 

    str_hora = new String (hora); 
    if (str_hora.length == 1) 
       hora = "0" + hora;

    horaImprimible = /*dows[dow]+" "+d+" de "+months[m]+" de "+y +", " +*/ hora + ":" + minuto + ":" + segundo;

    document.form_reloj.reloj.value = horaImprimible;

    setTimeout("mueveReloj()",1000);
} 

