// ----------------------------------------------
// Data
// ----------------------------------------------

	function MostrarDia() {

		var nombres_dias = new Array("dom","lun","mar","mi&eacute;","jue","vie","s&aacute;b")
		var nombres_meses = new Array("01","02","03","04","05","06","07","08","09","10","11","12")
		var fecha_actual = new Date()

		dia_mes = fecha_actual.getDate()		//dia del mes
		dia_semana = fecha_actual.getDay()	//dia de la semana
		mes = fecha_actual.getMonth() + 1
		anio = fecha_actual.getYear()

		if (anio < 100)						//pasa el ano a 4 digitos
			anio = '19' + anio
		else if ( ( anio > 100 ) && ( anio < 999 ) ) {	//efecto 2000
			var cadena_anio = new String(anio)
			anio = '20' + cadena_anio.substring(1,3)
		}
		//escribe en pagina
		document.write(nombres_dias[dia_semana])
	}


	function MostrarFecha() {

		var nombres_dias = new Array("dom","lun","mar","mi&eacute;","jue","vie","s&aacute;b")
		var nombres_meses = new Array("01","02","03","04","05","06","07","08","09","10","11","12")
		var fecha_actual = new Date()

		dia_mes = fecha_actual.getDate()		//dia del mes
		dia_semana = fecha_actual.getDay()	//dia de la semana
		mes = fecha_actual.getMonth() + 1
		anio = fecha_actual.getYear()

		if (dia_mes < 10) 
			dia_mes = '0' + dia_mes
		if (anio < 100)						//pasa el ano a 4 digitos
	      anio = '19' + anio
		else if ( ( anio > 100 ) && ( anio < 999 ) ) {	//efecto 2000
			var cadena_anio = new String(anio)
			anio = '20' + cadena_anio.substring(1,3)
		}
	   //escribe en pagina
	   document.write(dia_mes + "." + nombres_meses[mes - 1])
	}

// ----------------------------------------------
// Cajas menu
// ----------------------------------------------

var ns4 = (document.layers)?true:false
var ie4 = (document.all)?true:false
if(ie4){
    document.write("<link rel='stylesheet' href='http://www.gato-encerrado.com/wp-content/themes/elgato/style.css'>")
}else{
    document.write("<link rel='stylesheet' href='http://www.gato-encerrado.com/wp-content/themes/elgato/style.css'>")
}
function overTD(td,color){td.bgColor=color;}
function outTD(td,color){td.style.cursor='default';td.bgColor=color;}
function clickTD(td){td.children.tags('A')[0].click();}

// ----------------------------------------------
// Protagonistas
// ----------------------------------------------

var description = new Array();
description[0] = "Recu&eacute;rdalos";
description[1] = "Ismael";
description[2] = "GH 1";
description[3] = "Sabrina";
description[4] = "GH 2";
description[5] = "Javito";
description[6] = "GH 3";
description[7] = "Pedro";
description[8] = "GH 4";
description[9] = "Nuria";
description[10] = "GH 5";
description[11] = "Juanjo";
description[12] = "GH 6";
description[13] = "Pepe";
description[14] = "GH 7";
description[15] = "Naiala";
description[16] = "GH 8";
description[17] = "Judith";
description[18] = "GH 9";
description[19] = "Iv&aacute;n";
description[20] = "GH 10";


// ----------------------------------------------
// Abrir popup
// ----------------------------------------------

function popUp(url){
	window.open(url,"pop","width=550,height=450,toolbars=0,scrollbars=1")
}

// ----------------------------------------------
// Abre foto
// ----------------------------------------------
function abreFoto(nombre,ancho,alto) {
	ancho += 20;
	alto += 20;
	props = 'width=' + ancho + ',height=' + alto + ',scrollbars=no,resizable=no';
	window.open(nombre,'',props)
}

// ----------------------------------------------
// Ticker
// ----------------------------------------------

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0)
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}