hoy = new Date();
dia = hoy.getDay();
mes = hoy.getMonth();
myweekday= hoy.getDate();

//document.oncontextmenu = function(){return false}

function FechaActual() {

	switch(dia){
			case 0:		day = " Domingo, ";
						break;
			case 1:		day = " Lunes, ";
						break;
			case 2:		day = " Martes, ";
						break;
			case 3:		day = " Mi&eacute;rcoles, ";
						break;
			case 4:		day = " Jueves, ";
						break;
			case 5:		day = " Viernes, ";
						break;
			case 6:		day = " S&aacute;bado, ";
			}
	
	switch(mes){
			case 0:		month = "Enero ";
						break;
			case 1:		month = "Febrero ";
						break;
			case 2:		month = "Marzo ";
						break;
			case 3:		month = "Abril ";
						break;
			case 4:		month = "Mayo ";
						break;
			case 5:		month = "Junio ";
						break;
			case 6:		month = "Julio ";
						break;
			case 7:		month = "Agosto ";
						break;
			case 8:		month = "Septiembre ";
						break;
			case 9:		month = "Octubre ";
						break;
			case 10:	month = "Noviembre ";
						break;
			case 11:	month = "Diciembre ";
			}
		document.write(day+myweekday+" de "+month); 

}

function Contador(){
		var fiestas = new Date("August 14, 2009");
		var diff = fiestas.getTime() - hoy.getTime();
		var quedan = Math.floor(diff / (1000 * 60 * 60 * 24));
		if (quedan > 1) {
			document.write("&nbsp;&nbsp;<b>(" + (quedan+1) + " d&iacute;as para Fiestas)</b>.");
		}else{
			document.write("Reinicializar contador");
		}
}	

function highlight(which,color){
		if (document.all||document.getElementById) which.style.backgroundColor=color;
}

function Saludo(){
		if((hoy.getHours() >5) && (hoy.getHours() <14)){
					document.write("Buenos d&iacute;as, Pomeran@")
		}
		if((hoy.getHours() >13) && (hoy.getHours() <21)){
					document.write("Buenas tardes, Pomeran@")
		}
		if((hoy.getHours() >20) || (hoy.getHours() <6)){
					document.write("Buenas noches, Pomeran@")
		}
}

function Medidas(){
		EcranHaut = screen.height;
		EcranLarg = screen.width;
		Ecran = EcranLarg + "x" + EcranHaut;
		document.write('Web optimizada para 800x600. Tu resoluci&oacute;n es: ' + Ecran);
}

function aFavoritos() {
		var browsName = navigator.appName; 
		if (browsName == "Microsoft Internet Explorer") { 
				window.external.AddFavorite('http://www.pomer.org','Página de POMER');
		} else {
				alert ("\nPara agregar esta página a tus FAVORITOS presiona CTRL+D");
		}
}

function selectWin(imagen,texto,h1,w1){
	var nuevaWin = window.open("", "imagen", "height=" + h1 + ",width=" + w1 + ",top=0,left=0,resizable=no,scrollbars=no,toolbar=no,status=no,menubar=no,location=no");
	with (nuevaWin.document) {
	  open("text/html", "replace");
	  write("<html><head><title>imagen</title></head><body leftmargin=0 topmargin=0><img src='graficos/"+imagen+"'></img><br><center><b>"+texto+"</b></center></body></html>");
	  close();
	}
}
