<!-- 
var undefined;
var disableCache=true;
var menuImageWidth=9;
//var bordercolor="#FFFFFF";
//var bgcolor="#FFFFFF";

function BrowserCheck()
{
	this.isNN=false;
	this.isIE=false;
	this.isMac=false;
	var b = navigator.appName
	// Browser
	if (b=="Netscape") this.isNN=true;
	else if (b=="Microsoft Internet Explorer") this.isIE=true;
	// Màquina
	if(navigator.userAgent.indexOf("Mac") != -1) this.isMac=true;
}
var nav = new BrowserCheck();
var t=".top";
var l=".left";
var v=".visibility";
var c=".clip";
var h=".height";
var w=".width";
var visible="show";
var hidden="hide";
var creando=false;
if(nav.isIE)
{
	t=".style"+t;
	l=".style"+l;
	v=".style"+v;
	c=".style"+c;
	h=".style"+h;
	visible="visible";
	hidden="hidden";
}
var maxHeight;
function desplaza(o, x, y)
{
	eval("o"+t+"=y;");
	eval("o"+l+"=x;");
}

function desplazaPor(obj, incx, incy)
{
	eval("obj"+t+"=parseInt(obj"+t+")+incy;");
	eval("obj"+l+"=parseInt(obj"+l+")+incx;");
}

var deslizando=false;
function desliza(hasta)
{
	if(objsDes==null)
		objsDes=new Array();
	else
		for(var i=0; i<objsDes.length; i++)
			if(objsDes[i]==this)
			{
				objsDes[i]=null;
				break;
			}
	objsDes[objsDes.length]=this;
	if(objsDesHasta==null)
		objsDesHasta=new Array();
	objsDesHasta[objsDesHasta.length]=hasta;
	deslizando=true;
	deslizaObjs(objsDes.length-1);
}

var objsDes;
var objsDesHasta;
function deslizaObjs(i)
{
	if(objsDes!=null && objsDes[i]!=null)
	{
		var desMas=false;
		var capa=objsDes[i].objL;
		var hasta=parseInt(objsDesHasta[i]);
		var top=parseInt(eval(capa+t));
		var inc=incDes;
		if(top!=hasta)
		{
			if(top>hasta)
			{
				if((top-hasta)<=incDes)
					inc=top-hasta;
				else
					desMas=true;
				eval(capa+t+"="+(top-inc)+";");
			}
			else if(top<hasta)
			{
				if((hasta-top)<=incDes)
					inc=hasta-top;
				else
					desMas=true;
				eval(capa+t+"="+(top+inc)+";");
			}
			if(desMas)
				setTimeout("deslizaObjs("+i+");", timeDes);
			else
			{
				objsDes[i]=null;				
				if(i==objsDes.length-1)
				{
					objsDes=null;
					objsDesHasta=null;				
					deslizando=false;
				}
			}
		}
		else
			objsDes[i]=null;
	}
}

function setHTML(obj, html)
{
	if(nav.isIE)
		obj.innerHTML=html;
	else if(nav.isNN)
	{
		obj.document.open();
		obj.document.write(html);
		obj.document.close();
	}
}

function Menu(name, text, link, path, linkAndMenu)
{
	this.name=name;
	this.text=text;
	this.isMenu=false;
	if(link=="" || link==undefined || linkAndMenu==true)
		this.isMenu=true;
	this.javaScriptLink=this.name+".click()";
	this.link=link;
	this.path=path;
	this.getPath=getPath;
	this.level=0;
	this.menu=this;
	this.restore=restore;
	this.id=-1;
	this.openChild=-1;
	this.isOpen=false;
	this.html="";
	this.htmlChilds="";
	this.create=create;
	this.addChild=addChild;
	this.addChilds=addChilds;
	this.extend=extend;
	this.moveChilds=moveChilds;
	this.click=click;
	this.extendChilds=extendChilds;
	this.openURL=openURL;
	this.desliza=desliza;
	this.setVisible=setVisible;
	if(nav.isIE)
	{
		this.objL=this.name+"L";
		this.objC=this.name+"C";
	}
	else if(nav.isNN)
	{
		this.objL="document."+this.name+"Tot.document."+this.name+"L";
		this.objC=this.objL+".document."+this.name+"C";
	}
	this.init=initMenu;
	this.end=endMenu;
	this.addTabs=addTabsToMenu;
}

function create()
{
	this.id=this.parent.childs.length-1;
	this.level=this.parent.level+1;	
	var top=0;
	if(this.level==1)
		top=this.id*itemHeight;
	var vis=visible;
	if(this.level!=1)
		vis=hidden;
	var aux="";
	for(var i=1; i<this.level; i++)
		aux+="&nbsp;&nbsp;"
	var auxalign="align='absmiddle'";
	if(nav.isNN && this.level==1)
		auxalign="align='top' vspace=2";
	var img="";
	var hayimg=false;
	if(window.imageDown!=undefined)
	{
		if(window.imageDown.src!=undefined)
		{
			if(window.imageDown.src!="");
			{
				hayimg=true;
				img="<IMG id='"+this.name+"I' src='"+imageDown.src+"' height="+menuImageWidth+" width="+menuImageWidth+" border=0 "+auxalign+">&nbsp;&nbsp;&nbsp;";				
			}
		}
	}
	if(!hayimg)
		img="&nbsp;<B>·</B>&nbsp;";
	if(!this.isMenu)
		img="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	var auxbackground="";
	var cellspacing=border;
	if(nav.isIE)
		this.html="<DIV id='"+this.name+"L' name='"+this.name+"L' style='position:absolute;top:"+top+";left:0;visibility:"+vis+";width:"+itemWidth+";'><TABLE bgcolor='"+bordercolor+"' width="+itemWidth+" border=0 cellspacing="+cellspacing+" cellpadding=0><TR onMouseOver='entrarMenu(this);' OnMouseOut='salirMenu(this)' onClick='"+this.javaScriptLink+"' class='level"+this.level+"'><TD bgcolor='"+eval("bgcolorLevel"+this.level)+"' valign='bottom' height="+(itemHeight-border)+auxbackground+">"+aux+img+this.text+"</TD></TR></TABLE><DIV id='"+this.name+"C' name='"+this.name+"C' style='position:absolute;top:"+itemHeight+";left:0'></DIV></DIV>";
	else if(nav.isNN)
		this.html="<LAYER id='"+this.name+"L' name='"+this.name+"L' top="+top+" left=0 visibility='"+vis+"' width="+itemWidth+((cellspacing!="0")?" ":"")+"><TABLE width="+itemWidth+" border=0 cellspacing=0 cellpadding=0><TR><TD valign='bottom' height="+(itemHeight-border)+auxbackground+"><A class='level"+this.level+"' href='javascript:"+this.javaScriptLink+"'>"+aux+img+this.text+"</A></TD></TR></TABLE><LAYER id='"+this.name+"C' name='"+this.name+"C' top="+itemHeight+"></LAYER></LAYER>";
}

function addChild(obj, flag)
{
	if(this.childs==null)
		this.childs=new Array();
	this.childs[this.childs.length]=obj;
	obj.parent=this;
	obj.menu=this.menu;
	obj.create();
	this.htmlChilds+=obj.html;
	if(flag!="wait")
		setHTML(eval(this.objC),this.htmlChilds);
	if(nav.isNN)
	{
		obj.objL=this.objC+".document."+obj.name+"L";
		obj.objC=obj.objL+".document."+obj.name+"C";
	}
}

function addChilds(arr)
{
	if(arr!=null && arr.length>0)
	{
		for(var i=0; i<arr.length-1; i++)
			this.addChild(arr[i], "wait");
		this.addChild(arr[arr.length-1]);
	}
}

function setVisible(b)
{
	var ov=eval(this.objL+v);
	if(b)
		ov=visible;
	else
		ov=hidden;
}

function extend(b)
{
	if(this.childs!=null)
	{
		if(b)
		{
			if(window.imageUp!=undefined && window.imageUp.src!=undefined && window.imageUp.src!="")
			{
				if(nav.isIE)
					eval("document.images('"+this.name+"I').src=imageUp.src;");
				else
					eval(this.objL+".document.images[0].src=imageUp.src;");
			}
			this.isOpen=true;
			for(var i=0; i<this.childs.length; i++)
			{
				eval(this.childs[i].objL+v+"=\""+visible+"\";");
				desplaza(eval(this.childs[i].objL),0,i*itemHeight);
				if(nav.isNN)
				{
					eval(this.objC).clip.height+=itemHeight;
					eval(this.objL).clip.height+=itemHeight;
				}
			}
			this.menu.tabs.newHeight(this.menu.tabs.height+this.childs.length*itemHeight);
		}
		else
		{
			if(window.imageDown!=undefined && window.imageDown.src!=undefined && window.imageDown.src!="")
			{
				if(nav.isIE)
					eval("document.images('"+this.name+"I').src=imageDown.src;");
				else
					eval(this.objL+".document.images[0].src=imageDown.src;");
			}
			this.isOpen=false;
			for(var i=0; i<this.childs.length; i++)
			{
				eval(this.childs[i].objL+v+"=\""+hidden+"\";");
				desplaza(eval(this.childs[i].objL),0,itemHeight);
			}
			if(this.openChild!=-1)
			{
					this.childs[this.openChild].isOpen=false;
					this.childs[this.openChild].extend(false);
					this.openChild=-1;
			}
			desplazaPor(eval(this.menu.tabs.layer),0,this.childs.length*itemHeight);
			if(parseInt(eval(this.menu.tabs.layer+t))>tabHeight)
				desplaza(eval(this.menu.tabs.layer),0,tabHeight);
			this.menu.tabs.newHeight(this.menu.tabs.height-this.childs.length*itemHeight);
		}
		this.parent.moveChilds(this.id, this.childs.length, b, false);
	}
}

function moveChilds(num, can, dir, flag)
{
	if(num!=this.openChild && this.openChild!=-1)
		this.childs[this.openChild].extend(false);
	if(dir)		// dir==true -> down
	{
		if(nav.isNN)
		{
			eval(this.objC).clip.height+=can*itemHeight;
			eval(this.objL).clip.height+=can*itemHeight;
		}
		this.openChild=num;
		if(nav.isMac)
			for(var i=num+1;i<this.childs.length; i++)
				desplazaPor(eval(this.childs[i].objL),0,can*itemHeight);
		else
			for(var i=num+1;i<this.childs.length; i++)
				eval(this.childs[i]).desliza((parseInt(eval(this.childs[i].objL+t))+can*itemHeight));
	}
	else			// dir==false -> up
	{
		if(nav.isNN)
		{
			eval(this.objC).clip.height+=-can*itemHeight;
			eval(this.objL).clip.height+=-can*itemHeight;
		}
		if(!flag)
			this.openChild=-1;
		for(var i=num+1; i<this.childs.length; i++)
			desplazaPor(eval(this.childs[i].objL),0,-can*itemHeight);
	}
	if(this.level>0)
		this.parent.moveChilds(this.id,can,dir, true)
}

function click()
{
	if(this.childs!=null && this.childs.length>0)
		this.extendChilds();	
	if(this.link!="" && this.link!=undefined)
		this.openURL();
}

function extendChilds()
{
	if(!deslizando && !creando)
	{
		if(this.isOpen)
			this.extend(false);
		else
			this.extend(true);
		setPath(this.getPath());
	}
	return false;
}

var isOk=true;
function openURL()
{
	if(isOk)
	{
		if(this.link.substring(0,11)=="javascript:")
			eval(this.link.substring(11));
		else
		{
			var href=this.link;
			if(disableCache && href.indexOf("?")!=-1)
			{
				var date = new Date();
				href+="&p="+date.getTime();
			}
			if(linkTarget!="")
				eval("parent."+linkTarget+".location.href=href;");
			else
				document.location.href=href;
			isOk=false;
			setTimeout("isOk=true;", linkDelay);
		}
		setPath(this.getPath());
	}
	return false;
}

function setPath(path)
{
	if(pathTarget!="")
	{
		var fr=eval("parent."+pathTarget)
		if(fr!=undefined)
		{
			if(nav.isIE)
			{
				if(fr.path!=undefined)
					fr.path.innerHTML="&nbsp;&nbsp;"+path;
			}
			else if(nav.isNN)
			{
				if(fr.document.pathAbsolute!=undefined)
				{
					fr.document.pathAbsolute.document.open();
					fr.document.pathAbsolute.document.write("<FONT face='verdana' size=0>"+ path+"</FONT>");
					fr.document.pathAbsolute.document.close();
				}
			}
		}
	}
}

function getPath()
{
	var p="";
	if(this.path==null || this.path==undefined)
	{
		if(this.childs!=null && this.childs.length>0)
			p=this.text+"&nbsp;/";
		else
			p="<B>"+this.text+"</B>";
		var obj=this.parent;
		while(obj!=null && obj.level>0)
		{
			p=obj.text+"&nbsp;/&nbsp;"+p;
			obj=obj.parent;
		}
	}
	else
		p=this.path;
	return p;
}

function initMenu()
{
	creando=true;
	this.setVisible(false)
	window.status="Please wait.";
	setMaxHeight();
//	setPath("");
}

function endMenu()
{
	creando=false;
	window.onresize=this.restore;
	this.setVisible(true);
	window.status="Ready.";
}

function preload(imgObj,imgSrc)
{
	if (document.images)
	{
		eval(imgObj+' = new Image()');
		eval(imgObj+'.src = "'+imgSrc+'"');
	}
}

function addTabsToMenu()
{
//	window.onresize=this.restore;
	eval(this.name+"Tabs=new ScrollTabs('"+this.name+"Tabs', '"+this.name+"Tot');");
	this.tabs=eval(this.name+"Tabs;");
}

function ScrollTabs(name, layerTot)
{
	this.menuName=layerTot.substring(0,layerTot.indexOf("Tot"));
	this.name=name;
	var tot=layerTot;
	if(nav.isIE)
	{
		this.layer=this.menuName+"L";
		this.tab1=this.layer+"Tab1";
		this.tab2=this.layer+"Tab2";
	}
	else if(nav.isNN)
	{
		this.layer="document."+this.menuName+"Tot.document."+this.menuName+"L";
		this.tab1=this.layer+"Tab1";
		this.tab2=this.layer+"Tab2";
		tot="document."+this.menuName+"Tot";
	}
	desplaza(eval(this.tab1),0,-tabHeight);
	desplaza(eval(this.tab2),0,maxHeight+tabHeight);
	this.upOver=tabUpOver;
	this.upOut=tabUpOut;
	this.downOver=tabDownOver;
	this.downOut=tabDownOut;
	var aux1="";
	var aux2="";
	if(nav.isIE)
	{
		aux1=" onMouseOver='"+this.name+".upOver()' onMouseOut='"+this.name+".upOut()'";
		aux2=" onMouseOver='"+this.name+".downOver()'  onMouseOut='"+this.name+".downOut()'";
	}
	
	this.newHeight=newHeight;
	this.on=false;
	eval(tot+h+"="+(maxHeight+2*tabHeight));
	eval(tot+w+"="+itemHeight);
	if(nav.isIE)
		eval(tot+c+"='rect(0px "+itemWidth+"px "+(maxHeight+2*tabHeight)+"px 0px)';");
	else if(nav.isNN)
	{
		eval(tot).clip.height=(maxHeight+2*tabHeight);
		eval(tot).layers[1].captureEvents(Event.MOUSEOUT | Event.MOUSEOVER);
		eval(tot).layers[1].tabObj=this;
		eval(tot).layers[1].onmouseover=tabUpOver;
		eval(tot).layers[1].onmouseout=tabUpOut;
		eval(tot).layers[2].captureEvents(Event.MOUSEOUT | Event.MOUSEOVER);
		eval(tot).layers[2].tabObj=this;
		eval(tot).layers[2].onmouseover=tabDownOver;
		eval(tot).layers[2].onmouseout=tabDownOut;
	}
	this.newHeight(eval(layerTot.substring(0,layerTot.length-3)+".childs.length")*itemHeight);
}

var menuToMove;
var moveMenuDir;
var menuHeight;
var menuIni;
var desMenuTimer;
var tabover=false;
function moveMenu()
{
	if(moveMenuDir=="up")
	{
		if(parseInt(eval(menuToMove+t))<menuIni)
		{
			var i=incDes;
			if(parseInt(eval(menuToMove+t))>=menuIni-incDes)
				i=menuIni-parseInt(eval(menuToMove+t));
			desplazaPor(eval(menuToMove),0,i);
		}
		else
			clearInterval(desMenuTimer);
	}
	else if(moveMenuDir=="down")
	{
		if(parseInt(eval(menuToMove+t))+menuHeight>menuIni+maxHeight)
		{
			var i=incDes;
			if(parseInt(eval(menuToMove+t))+menuHeight<=menuIni+maxHeight+incDes)
				i=parseInt(eval(menuToMove+t))+menuHeight-menuIni-maxHeight;
			desplazaPor(eval(menuToMove),0,-i);
		}
		else
			clearInterval(desMenuTimer);
	}
}

function tabUpOver()
{
	if(!tabover)
	{
		tabover=true;
		if(nav.isIE)
			var tabObj=this;
		else if(nav.isNN)
			var tabObj=this.tabObj;
		menuIni=tabHeight;
		menuHeight=tabObj.height;
		if(!deslizando && !creando)
		{
			if(parseInt(eval(tabObj.layer+t))<tabHeight)
			{
				clearInterval(tabObj.timer);
				moveMenuDir="up";
				menuToMove=tabObj.layer;
				desMenuTimer=setInterval("moveMenu();", timeDes*20);
			}
		}
	}
}

function tabUpOut()
{
	tabover=false;
	if(nav.isIE)
		var tabObj=this;
	else if(nav.isNN)
		var tabObj=this.tabObj;
	clearInterval(desMenuTimer);
}

function tabDownOver()
{
	if(!tabover)
	{
		tabover=true;
		if(nav.isIE)
			var tabObj=this;
		else if(nav.isNN)
			var tabObj=this.tabObj;
		menuIni=tabHeight;
		menuHeight=tabObj.height;
		if(!deslizando && !creando)
		{
			if(parseInt(eval(tabObj.layer+t))+tabObj.height>(tabHeight+maxHeight))
			{
				clearInterval(tabObj.timer);
				menuToMove=tabObj.layer;
				moveMenuDir="down";
				desMenuTimer=setInterval("moveMenu();", timeDes*20);
			}
		}
	}
}

function tabDownOut()
{
	tabover=false;
	if(nav.isIE)
		var tabObj=this;
	else if(nav.isNN)
		var tabObj=this.tabObj;

	clearInterval(desMenuTimer);
}

function newHeight(height)
{
	this.height=height;
	if(this.height>(maxHeight+2*tabHeight))
	{
		eval(this.tab1+v+"=\""+visible+"\";");
		eval(this.tab2+v+"=\""+visible+"\";");
		desplaza(eval(this.tab1),0,0);
		desplaza(eval(this.tab2),0,maxHeight+tabHeight);
		if(!this.on)
			desplaza(eval(this.layer),0,tabHeight);
		this.on=true;
	}
	else
	{
		eval(this.tab1+v+"=\""+hidden+"\";");
		eval(this.tab2+v+"=\""+hidden+"\";");
		desplaza(eval(this.tab1),0,-tabHeight);
		desplaza(eval(this.layer),0,0);
		this.on=false;
	}
}

function setMaxHeight()
{
	if(nav.isIE)
		maxHeight=document.body.clientHeight-tabHeight*2;
	else if(nav.isNN)
	{
		var aux=5;
		if(nav.isMac) aux=0;
		maxHeight=window.innerHeight-tabHeight*2+aux;
	}
}

function restore()
{
	var oldMaxHeight=maxHeight;
	setMaxHeight();
	if(maxHeight!=oldMaxHeight)
	{
		var tot=this.menu.name+"Tot";
		if(nav.isIE)
		{
			eval(tot).style.height=maxHeight+2*tabHeight;
			eval(tot).style.clip='rect(0px '+itemWidth+'px '+(maxHeight+2*tabHeight)+'px 0px)';
		}
		else if(nav.isNN)
		{
			tot="document."+this.menu.name+"Tot";
			eval(tot).height=maxHeight+2*tabHeight;
			eval(tot).clip.height=maxHeight+2*tabHeight;
		}
		this.menu.tabs.newHeight(this.menu.tabs.height);
	}
	if(nav.isNN)
	{
		var va=eval("parent."+linkTarget);
		if(va!=undefined)
			va.reload=false;
		history.go(0);
	}
}

var activeWindowLocale;
function setActiveWindowLocale(l)
{
	if(activeWindowLocale!=undefined && l!=activeWindowLocale)
		eval("parent."+pathTarget+".history.go(0);");
}

function entrarMenu(obj)
{
	if (!obj.contains(event.fromElement))
		obj.style.cursor = "hand";
	//Rojo	
	obj.style.color="#CC0000"
	
	//Azul Claro
	//obj.style.color="#C6DFEC"
	
	//Azul Oscuro
	//obj.style.color="#013F71"
}

function salirMenu(obj)
{
	if (!obj.contains(event.toElement))
		obj.style.cursor = "default";
	obj.style.color="#660000"
}
//-->
