var tpa=new Array();
var isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);
function setTP(){
	var i,j,h="<sty"+"le type=\"text/css\">\n";
	h+=".wTP_tabs{display: block;}\n";
	if(document.getElementById){
		for(i=1;i<51;i++){
			h+="#tpc"+i+"_1 {display:block;}\n";
			for(j=2;j<51;j++){
				h+="#tpc"+i+"_"+j+" {display:none;}\n";
			}
		}
		h+="\n<"+"/sty"+"le>";
		document.write(h);
	}
}
setTP();
function initTP(){
	var i,j,tb,tD,tP,tA,pb="wTP";
	if(!document.getElementById){
		return;
	};
	tpa=arguments;
	for(i=1;i<51;i++){
		tb=pb+i;
		tP=document.getElementById(tb);
		if(tP){
			tD=tP.getElementsByTagName("DIV");
			if(tD){
				for(j=0;j<tD.length;j++){
					if(tD[j].id&&tD[j].id.indexOf("tpb")==0){
						tA=tD[j].getElementsByTagName("A");
						if(tA[0]){
							tA[0].tpn=new Array(i,tD[j].id);
							tA[0].onclick=function(){
								return TPtrig(this);
							};
						}
					}
				}
			}
		}
	}
}
function TPtrig(a){
	var i,tD,tA,tC,c,d,sb,an=tpa[1],wP,h,cP,ch,hD,hh;
	if(typeof(a)!='object'){
		c=a.replace("tpc","tpb");
		d=document.getElementById(c);
		if(d){
			a=d.getElementsByTagName("A")[0];
		}
	}
	if(a.tpn){
		tD=document.getElementById(a.tpn[1]);
		if(tD){
			tA=tD.parentNode.getElementsByTagName("A");
			if(an==29&&!isIE5){
				wP=P7_getCD(a);
				h=P7_getPH(wP);
				cP=getTPc(a);
				ch=P7_getPH(cP);
				hD=h-ch;
				if(window.opera){
					P7_setPW(wP);
				}
				wP.style.height=h+"px";
				wP.style.overflow="hidden";
			}
			for(i=0;i<tA.length;i++){
				if(tA[i].tpn){
					sb=tA[i].tpn[1].replace("tpb","tpc");
					tC=document.getElementById(sb);
					if(tA[i]==a){
						tA[i].className="down";
						document.getElementById(tA[i].tpn[1]).className="down";
						if(tC){
							if(an>0&&an!=29){
								tC.style.visibility="hidden"
								tC.style.display="block";
								setTimeout("P7_TPanim('"+tC.id+"')",100);
							}
							else{
								tC.style.display="block";
							}
							if(an==29&&!isIE5){
								hh=P7_getPH(tC);
								TPglide(tC.id,h,hh+hD);
							}
						}
					}
					else{
						tA[i].className='';
						document.getElementById(tA[i].tpn[1]).className='';
						if(tC){
							tC.style.display="none";
						}
					}
				}
			}
		}
	}
	if(typeof(P7_colH2)=='function'){
		P7_colH2();
	}
	if(typeof(P7_colH)=='function'){
		P7_colH();
	}
	return false;
}

function P7_getPH(d){
	var h,nh,dh,oh;
	d.style.height="auto";
	oh=d.offsetHeight;
	d.style.height=oh+"px";
	nh=d.offsetHeight;
	if(oh!=nh){
		nh=(oh-(nh-oh));
	}
	d.style.height="auto";
	return nh;
}
function P7_setPW(d){
	var w,nw,dw,ow;
	d.style.width="auto";
	ow=d.offsetWidth;
	d.style.width=ow+"px";
	nw=d.offsetWidth;
	if(ow!=nw){
		nw=(ow-(nw-ow));
	}
	d.style.width=nw+"px";
}
function P7_getCD(a){
	var g,tP=a.tpn[1].replace("tpb","tpc");
	g=document.getElementById(tP);
	return g.parentNode;
}
function getTPc(a){
	var i,tA,cD,tC=null;
	tA=a.parentNode.parentNode.getElementsByTagName("A");
	for(i=0;i<tA.length;i++){
		if(tA[i].className && tA[i].className=="down"){
			cD=tA[i].tpn[1].replace("tpb","tpc");
			tC=document.getElementById(cD);
			break;
		}
	}
	return tC;
}
function fecha() {
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado")
var montharray=new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre")
document.write(dayarray[day]+", "+daym + " de " + montharray[month]+" "+year)
}