// Muestra capa
function mostrar(capa) {
	document.getElementById(capa).style.visibility="visible";
}

// Oculta capa
function ocultar(capa) {
	document.getElementById(capa).style.visibility="hidden";
}




// Recupera la fecha del dia
function fecha(){
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();
dd = now.getDate();
mm = now.getMonth();
hh = now.getTime();
yy = now.getFullYear();
document.write(dows[dow]+", "+dd+" de "+months[mm]+" de "+yy);
}

// Recupera la fecha de la última actualización 
function ultimaAct(){
    var a; 
    a=new Date(document.lastModified); 
    lm_year=a.getYear(); 
    if (lm_year<1000){                  //just in case date is delivered with 4 digits 
        if (lm_year<70){ 
        lm_year=2000+lm_year; 
        } 
        else lm_year=1900+lm_year; 
    }                                 //end workaround 
    lm_month=a.getMonth()+1; 
    if (lm_month<10){ 
        lm_month='0'+lm_month; 
    } 
    lm_day=a.getDate(); 
    if (lm_day<10){ 
        lm_day='0'+lm_day; 
    } 
    document.write("Última actualización " + lm_day+'.'+lm_month+'.'+lm_year); 
}

// Abre ventana centrada
function AbrirCentrado(Url,NombreVentana,width,height,extras) {
var largo = width;
var altura = height;
var adicionales= extras;
var top = (screen.height-altura)/2;
var izquierda = (screen.width-largo)/2; 

nuevaVentana=window.open(''+ Url + '',''+ NombreVentana + '','width=' + largo + ',height=' + altura + ',top=' + top + ',left=' + izquierda + ',features=' + adicionales + ''); 
nuevaVentana.focus();
}

// Abrir ventana
function popup(foto) {
var opciones; // aquí se le da dimensiones y opciones
var contenido = "<html><body style='background: url(" + foto +") no-repeat center center'></body></html>";

var popup = window.open("", "", opciones);
	with (popup.document) {
	open();
	write(contenido);
	close();
	}
}

