//Funciones...

var months=new Array(13);
months[1]="Enero";
months[2]="Febrero";
months[3]="Marzo";
months[4]="Abril";
months[5]="Mayo";
months[6]="Junio";
months[7]="Julio";
months[8]="Agosto";
months[9]="Setiembre";
months[10]="Octubre";
months[11]="Noviembre";
months[12]="Diciembre";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)    // 
year = year + 1900;  
if (date < 10)
date = "0" + date ;
//
function Hoy () {
document.write (date + " de ");
document.write (lmonth  + " del " + year);
document.write ("<BR>");
}

// Funciones fondo incativo
var gPopupMask = null;
var ventana;
	
//--
function loadedPage() {
theBody = document.getElementsByTagName('BODY')[0];
popmask = document.createElement('div');
popmask.id = 'popupMask';
theBody.appendChild(popmask);
gPopupMask = document.getElementById("popupMask");
gPopupMask.style.display = "none";
}
	
//--
function UnloadedPage() {
if (typeof(ventana) != 'undefined' && ventana.closed == false)
{		
	ventana.close();		
}	
}

//--
function hideMask() {
	gPopupMask.style.display = "none";
}

//--
function setMaskSize() {
var theBody = document.getElementsByTagName("BODY")[0];			
var fullHeight = getViewportHeight();
var fullWidth = getViewportWidth();


if (fullHeight > theBody.scrollHeight) {
	popHeight = fullHeight;
} else {
	popHeight = theBody.scrollHeight;
}

if (fullWidth > theBody.scrollWidth) {
popWidth = fullWidth;
} else {
		popWidth = theBody.scrollWidth;
	}	
	gPopupMask.style.height = popHeight + "px";
	gPopupMask.style.width = popWidth + "px";
}
	
	//--
function getViewportHeight() {
if (window.innerHeight!=window.undefined) return window.innerHeight;
if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
if (document.body) return document.body.clientHeight; 
return window.undefined; 
}
	
	//--
function getViewportWidth() {
var offset = 17;
var width = null;
if (window.innerWidth!=window.undefined) return window.innerWidth; 
if (document.compatMode=='CSS1Compat') return document.documentElement.clientWidth; 
if (document.body) return document.body.clientWidth; 
}
	
	//--
function Deactivate(){
gPopupMask.style.display = "block";	
setMaskSize();
}

//Funcion abrir ventana
function abrir(direccion,ancho,alto){ 

var izquierda = (screen.availWidth - ancho) / 2; 
var arriba = (screen.availHeight - alto) / 2; 

var opciones = "fullscreen=" + 0 + 
",toolbar=" + 0 + 
",location=" + 0 + 
",status=" + 0 + 
",menubar=" + 0 + 
",scrollbars=" + 0 + 
",resizable=" + 0 + 
",width=" + ancho + 
",height=" + alto + 
",left=" + izquierda + 
",top=" + arriba; 

var ventana = window.open(direccion,"ventana",opciones); 

} 
	
//-->