/* 
Fecha y Hora By Chivi 
Nombre: Mario Plaza 
Web: www.programadorweb.com 
*/ 

/* Función del Reloj */ 

function actualizaReloj() {  
var Dia = new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"); 
var Mes = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"); 
var Hoy = new Date(); 
var Anio = Hoy.getFullYear(); 
var Fecha = Dia[Hoy.getDay()] + ", " + Hoy.getDate() + " de " + Mes[Hoy.getMonth()] + " de " + Anio + ", Hora: "; 
var Inicio, Datos, Fin, Total

marcacion = new Date()  
Hora = marcacion.getHours()  
Minutos = marcacion.getMinutes()  
Segundos = marcacion.getSeconds()  

if (Hora<=9) 
Hora = "0" + Hora 

if (Minutos<=9) 
Minutos = "0" + Minutos 

if (Segundos<=9) 
Segundos = "0" + Segundos 

Inicio = "<font face=\"comic Sans MS\" size=2 color=yellow>&nbsp;&nbsp;&nbsp;&nbsp;" 
Datos = Fecha + Hora + ":" + Minutos + ":" + Segundos
Fin = "</font>" 
Total = Inicio + Datos + Fin
document.getElementById('Fecha_Reloj').innerHTML = Total
setTimeout("actualizaReloj()",1000)
}


/**********************************************************************/
/****************    Función para abrir ventana     *******************/
/**********************************************************************/
function Abrir_ventana (pagina) {
	var opciones= "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=465, top=85, left=140";
	window.open(pagina,"",opciones);
}


var ventana
var cont=0
var titulopordefecto = "Planificación mensual del comedor" //texto por defecto a mostrar en la barra de título en caso de omitir el argumento titulo

function afoto(cual,titulo) {
	if(cont==1){
		ventana.close();
		ventana=null
	}
	if(titulo==null){
		titulo=titulopordefecto
	}
	ventana=window.open('','ventana','resizable=yes,scrollbars=auto')
	ventana.document.write('<html><head><title>' + titulo + '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><img src="' + cual + '" onLoad="opener.redimensionar(this.width, this.height)">')
	ventana.document.close()
	cont++
}

function redimensionar(ancho,alto) {
	ventana.resizeTo(ancho+12,alto+28)
	ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2) //centra la ventana. Eliminar si no se quiere centrar el popup
} 

/**********************************************************************/
/***********************    Menú desplegable    ***********************/
/**********************************************************************/

var tempor;

function mostrarCapa() {
	document.getElementById('capa').style.display='block';
 
}

function ocultarCapa() {
		tempor=setTimeout("document.getElementById('capa').style.display='none';",100);
}

function mantenerCapa() {
		clearTimeout( tempor );
}


/**********************************************************************/
/***********************    Album de fotos      ***********************/
/**********************************************************************/

function verColor(c,ima) {
/*	var kk=;*/
	document.getElementById(c).style.background='url("ima") no-repeat';
	document.getElementById(c).style.heigh="80px";
	document.getElementById(c).style.width="60px";
}

function verBN(c,im) {
	document.getElementById(c).style.background='url("im") no-repeat';
}

function cambiarFondo() {
}

