<!--
var undefined;
var disableCache=true;
var itemHeight=17;
var itemWidth=160;
var bgcolorLevel1="#EEEEEE";
var bgcolorLevel2="#DDDDDD";
var bgcolorLevel3="#CCCCCC";
var bgcolorLevel4="#BBBBBB";
var bordercolor="#FFFFFF";
var border=1;
var incDes=17;
var timeDes=5;
var menuImageWidth=9;
var bordercolor="#FFFFFF";
var bgcolor="#EEEEEE";
var linkDelay=10000;
var tabHeight=10;
function BrowserCheck(){
	this.isNN=(document.layers)? true:false;
	this.isIE=(document.all)? true:false;
	this.isMac=false;
	this.isDom=(document.getElementById)? true:false;

	var b=navigator.appName
	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) {

	if(!nav.isDom) {
		eval("o"+t+"=y;");
		eval("o"+l+"=x;");
	} else {
		o.style.top=y;
		o.style.left=x;
	}
}

function desplazaPor(obj,incx,incy) {

	if(!nav.isDom) {
		eval("obj"+t+"=parseInt(obj"+t+")+incy;");
		eval("obj"+l+"=parseInt(obj"+l+")+incx;");
	} else {
		obj.style.top =parseInt(obj.style.top)+incy;
		obj.style.left=parseInt(obj.style.left)+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]);
		if(!nav.isDom) {
			var top=parseInt(eval(capa+t));
		} else {
			var top=parseInt(document.getElementById(capa).style.top);

		}
		var inc=incDes;
		if(top!=hasta) {
			if(top>hasta){
				if((top-hasta)<=incDes)
					inc=top-hasta;
				else
					desMas=true;
				if(!nav.isDom) {
					eval(capa+t+"="+(top-inc)+";");
				} else {
					document.getElementById(capa).style.top=(top-inc);
				}
			}
		else if(top<hasta) {
			if((hasta-top)<=incDes)
				inc=hasta-top;
			else
				desMas=true;
			if(!nav.isDom) {
				eval(capa+t+"="+(top+inc)+";");
			} else {

				document.getElementById(capa).style.top=(top+inc);
			}
		}
		if(desMas) {
			if(nav.isDom) {
				deslizaObjs(i);
			} else {
				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.isNN)
		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;
	if(link=="void")
		link="";
	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 || nav.isDom){
		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;
	this.childsCreated=!this.isMenu;
}

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+">";}
}
}
if(!hayimg)
img="&nbsp;<B>·</B>&nbsp;";if(!this.isMenu)
img="&nbsp;&nbsp;&nbsp;";var auxbackground="";var cellspacing=border;if(eval("window.bgimageLevel"+this.level+"!=undefined")){
if(eval("window.bgimageLevel"+this.level+".src!=undefined"))
if(eval("window.bgimageLevel"+this.level+".src!=''")){
auxbackground=" background='"+eval("bgimageLevel"+this.level).src+"'";cellspacing="0";}
}

var auxCellSpacing=cellspacing;
var auxItemHeight=itemHeight;
if(this.text=="") {
	auxCellSpacing=0;
	auxItemHeight=0;
}

if(!nav.isNN) {

	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="+auxCellSpacing+" cellpadding=0><TR name='"+this.name+"' onClick='selectOption(this);' onMouseOver='entrarMenu(this);' OnMouseOut='salirMenu(this)' class='level"+this.level+"'><TD class='level"+this.level+"' valign='bottom' height="+(itemHeight-border)+auxbackground+"> <a href='#' onClick='"+this.javaScriptLink+"' class='level"+this.level+"'> "+img+this.text+"</TD></TR></TABLE><DIV id='"+this.name+"C' name='"+this.name+"C' style='position:absolute;top:"+itemHeight+";left:0'></DIV></DIV>";
//	this.html="<DIV id='"+this.name+"L' name='"+this.name+"L' style='position:absolute;top:"+top+";left:0;visibility:"+vis+";width:"+itemWidth+";'><TABLE width="+itemWidth+" border=0 cellspacing="+auxCellSpacing+" cellpadding=0><TR onMouseOver='entrarMenu(this);' OnMouseOut='salirMenu(this)' class='level"+this.level+"'><TD class='level"+this.level+"' valign='bottom' height="+(itemHeight-border)+auxbackground+"> <a href='javascript:void(null);' onClick='"+this.javaScriptLink+"' class='level"+this.level+"'> "+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  {
	this.html="<LAYER id='"+this.name+"L' name='"+this.name+"L' top="+top+" left=0 visibility='"+vis+"' width="+itemWidth+((cellspacing!="0")?" bgcolor='"+bordercolor+"'":"")+"><TABLE bgcolor='"+bordercolor+"' width="+itemWidth+" border=0 cellspacing=0 cellpadding=0><TR><TD bgcolor='"+eval("bgcolorLevel"+this.level)+"' 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+" bgcolor='"+bgcolor+"'></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")

if(!nav.isDom) {
	setHTML(eval(this.objC),this.htmlChilds);
} else {

	setHTML(document.getElementById(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){

if(!nav.isDom) {
	var ov=eval(this.objL+v);
} else {
	var ov=document.getElementById(this.objL).style.visibility;


}

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.isNN) {

	eval("document.images['"+this.name+"I'].src=imageUpWhite.src;");
} else {
	eval(this.objL+".document.images[0].src=imageUpWhite.src;");
}

}
this.isOpen=true;

for(var i=0;i<this.childs.length;i++) {

	if(!nav.isDom) {
		eval(this.childs[i].objL+v+"=\""+visible+"\";");
		desplaza(eval(this.childs[i].objL),0,i*itemHeight);
	} else {
		document.getElementById(this.childs[i].objL).style.visibility="visible";
		desplaza(document.getElementById(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.isNN)
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++){

if(!nav.isDom) {
	eval(this.childs[i].objL+v+"=\""+hidden+"\";");
	desplaza(eval(this.childs[i].objL),0,itemHeight);
} else {
	document.getElementById(this.childs[i].objL).style.visibility="hidden";
	desplaza(document.getElementById(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;
}

if(!nav.isDom) {
	desplazaPor(eval(this.menu.tabs.layer),0,this.childs.length*itemHeight);
} else {
	desplazaPor(document.getElementById(this.menu.tabs.layer),0,this.childs.length*itemHeight);
}

if(!nav.isDom) {
	if(parseInt(eval(this.menu.tabs.layer+t))>tabHeight)
		desplaza(eval(this.menu.tabs.layer),0,tabHeight);
} else {

	if(parseInt(document.getElementById(this.menu.tabs.layer).style.top)>tabHeight)
		desplaza(document.getElementById(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){
	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++)
			if(nav.isDom) {
				desplazaPor(document.getElementById(this.childs[i].objL),0,can*itemHeight);
			} else {
				desplazaPor(eval(this.childs[i].objL),0,can*itemHeight);
			}
	else
		for(var i=num+1;i<this.childs.length;i++) {

			if(nav.isDom)
				eval(this.childs[i]).desliza((parseInt(document.getElementById(this.childs[i].objL).style.top)+can*itemHeight));
			else
				eval(this.childs[i]).desliza((parseInt(eval(this.childs[i].objL+t))+can*itemHeight));
		}

} else {
	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++) {

		if(nav.isDom) {
			desplazaPor(document.getElementById(this.childs[i].objL),0,-can*itemHeight);

		} else {
			desplazaPor(eval(this.childs[i].objL),0,-can*itemHeight);
	}
}
}
if(this.level>0)
this.parent.moveChilds(this.id,can,dir,true)}
function click(){
if(isMenuDes){
if(this.isMenu&&!this.childsCreated){
window.status=(window.mens1!=undefined)?mens1:"Please wait.";m.createChilds((this.level+1),this.name);window.status=(window.mens2!=undefined)?mens2:"Ready.";this.childsCreated=true;}
}
if(this.childs!=null&&this.childs.length>0)
this.extendChilds();if(this.link!=""&&this.link!=undefined)this.openURL();}
function extendChilds(){
if(!deslizando&&!creando){
this.menu.restore(false);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!=""&&parent[linkTarget]!=undefined)
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 || nav.isDom){
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=(window.mens1!=undefined)?mens1:"Please wait.";setMaxHeight();}
function endMenu(){
creando=false;this.setVisible(true);window.status=(window.mens2!=undefined)?mens2:"Ready.";window.onresize=this.restore;}
function preload(imgObj,imgSrc){
if(document.images){eval(imgObj+' = new Image()');
//eval(imgObj+'.id = "'+imgObj+'"');
eval(imgObj+'.src = "'+imgSrc+'"');
}
}
function addTabsToMenu(){
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 || nav.isDom){
	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";
}

if(nav.isDom) {
	desplaza(document.getElementById(this.tab1),0,-tabHeight);
	desplaza(document.getElementById(this.tab2),0,maxHeight+tabHeight);
} else {
	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 || nav.isDom) {
	aux1=" onMouseOver='"+this.name+".upOver()' onMouseOut='"+this.name+".upOut()'";
	aux2=" onMouseOver='"+this.name+".downOver()'  onMouseOut='"+this.name+".downOut()'";
}

if(!nav.isDom) {
	setHTML(eval(this.tab1),"<IMG id='"+this.name+"Up' name='"+this.name+"Up' src='"+imageTab1Off.src+"' border=0 height="+tabHeight+aux1+">");
	setHTML(eval(this.tab2),"<IMG id='"+this.name+"Down' name='"+this.name+"Down' src='"+imageTab2Off.src+"' border=0 height="+tabHeight+aux2+">");
} else {
	setHTML(document.getElementById(this.tab1),"<IMG id='"+this.name+"Up' name='"+this.name+"Up' src='"+imageTab1Off.src+"' border=0 height="+tabHeight+aux1+">");
	setHTML(document.getElementById(this.tab2),"<IMG id='"+this.name+"Down' name='"+this.name+"Down' src='"+imageTab2Off.src+"' border=0 height="+tabHeight+aux2+">");


}

this.newHeight=newHeight;
this.on=false;

if(!nav.isDom) {
	eval(tot+h+"="+(maxHeight+2*tabHeight));
	eval(tot+w+"="+itemHeight);
} else {
	document.getElementById(tot).style.height=(maxHeight+2*tabHeight);
	document.getElementById(tot).style.width=itemHeight;
}

if(nav.isDom) {

	document.getElementById(tot).clip=='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;
} else if(nav.isIE) {
	eval(tot+c+"='rect(0px "+itemWidth+"px "+(maxHeight+2*tabHeight)+"px 0px)';");
}

this.newHeight(eval(layerTot.substring(0,layerTot.length-3)+".childs.length")*itemHeight);

if(nav.isDom) {
	document.getElementById(this.tab2).style.visibility=hidden;
}

}
var menuToMove;
var moveMenuDir;
var menuHeight;
var menuIni;var desMenuTimer;
var tabover=false;
function moveMenu(){
var auxT3=0;
if(nav.isDom) {
	auxT3=parseInt(document.getElementById(menuToMove).style.top);
} else {
	auxT3=parseInt(eval(menuToMove+t));
}

if(moveMenuDir=="up"){
if(auxT3<menuIni){
var i=incDes;
if(auxT3>=menuIni-incDes)
i=menuIni-auxT3;
if(!nav.isDom) {
	desplazaPor(eval(menuToMove),0,i);
} else {
	desplazaPor(document.getElementById(menuToMove), 0, i);
}

}
else
clearInterval(desMenuTimer);}
else if(moveMenuDir=="down"){
var auxT2=0;
if(nav.isDom) {
	auxT2=parseInt(document.getElementById(menuToMove).style.top);
} else {
	auxT2=parseInt(eval(menuToMove+t));
}

if(auxT2+menuHeight>menuIni+maxHeight){
var i=incDes;if(auxT2+menuHeight<=menuIni+maxHeight+incDes)
i=auxT2+menuHeight-menuIni-maxHeight;
if(!nav.isDom) {
	desplazaPor(eval(menuToMove),0,-i);
} else {
	desplazaPor(document.getElementById(menuToMove), 0, -i);
}

}
else
clearInterval(desMenuTimer);}
}
function tabUpOver(){
if(!tabover){
tabover=true;if(nav.isIE || nav.isDom)
var tabObj=this;else if(nav.isNN)
var tabObj=this.tabObj;menuIni=tabHeight;menuHeight=tabObj.height;if(!deslizando&&!creando){
var auxT1=0;
if(nav.isDom) {
	auxT1=parseInt(document.getElementById(tabObj.layer).style.top);
} else {
	auxT1=parseInt(eval(tabObj.layer+t));
}
if(auxT1<tabHeight)
{
if(window.imageTab1On!=undefined){
if(!nav.isNN)
eval("document.images['"+tabObj.name+"Up'].src=imageTab1On.src;");else
eval(tabObj.tab1+".document.images[0].src=imageTab1On.src;");}
clearInterval(tabObj.timer);
moveMenuDir="up";
menuToMove=tabObj.layer;
desMenuTimer=setInterval("moveMenu();",timeDes*20);}
}
}
}
function tabUpOut() {
	tabover=false;
	if(nav.isIE || nav.isDom)
		var tabObj=this;
	else if(nav.isNN)
		var tabObj=this.tabObj;

	if(!deslizando&&!creando) {
		if(window.imageTab1On!=undefined) {
			if(!nav.isNN)
				eval("document.images['"+tabObj.name+"Up'].src=imageTab1Off.src;");
			else
				eval(tabObj.tab1+".document.images[0].src=imageTab1Off.src;");}
		}
		clearInterval(desMenuTimer);
}

function tabDownOver() {

	if(!tabover){
		tabover=true;
		if(nav.isIE || nav.isDom)
			var tabObj=this;
		else if(nav.isNN)
			var tabObj=this.tabObj;

		var auxitabobj=0;

		if(!nav.isDom) {
			auxitabobj=parseInt(eval(tabObj.layer+t))+tabObj.height;
		} else {

			auxitabobj=parseInt(document.getElementById(tabObj.layer).style.top)+tabObj.height;
		}
		menuIni=tabHeight;
		menuHeight=tabObj.height;

		if(!deslizando&&!creando) {

			if(auxitabobj>(tabHeight+maxHeight)) {

				if(window.imageTab1On!=undefined) {
					if(!nav.isNN)
						eval("document.images['"+tabObj.name+"Down'].src=imageTab2On.src;");
					else
						eval(tabObj.tab2+".document.images[0].src=imageTab2On.src;");
				}
				clearInterval(tabObj.timer);
				menuToMove=tabObj.layer;
				moveMenuDir="down";
				desMenuTimer=setInterval("moveMenu();",timeDes*20);
			}
		}
	}
}

function tabDownOut(){

tabover=false;if(!nav.isNN)
var tabObj=this;else if(nav.isNN)
var tabObj=this.tabObj;if(!deslizando&&!creando){
if(window.imageTab1On!=undefined){
if(!nav.isNN)
eval("document.images['"+tabObj.name+"Down'].src=imageTab2Off.src;");else
eval(tabObj.tab2+".document.images[0].src=imageTab2Off.src;");}
}
clearInterval(desMenuTimer);}
function newHeight(height){
this.height=height;
if(this.height>(maxHeight+2*tabHeight)) {
if(!nav.isDom) {
	eval(this.tab1+v+"=\""+visible+"\";");
	eval(this.tab2+v+"=\""+visible+"\";");
	desplaza(eval(this.tab1),0,0);
	desplaza(eval(this.tab2),0,maxHeight+tabHeight);
} else {

	document.getElementById(this.tab1).style.visibility="visible";
	document.getElementById(this.tab2).style.visibility="visible";
	desplaza(document.getElementById(this.tab1),0,0);
	desplaza(document.getElementById(this.tab2),0,maxHeight+tabHeight);
}

if(!this.on)
	if(!nav.isDom) {
		desplaza(eval(this.layer),0,tabHeight);this.on=true;
	} else {
		desplaza(document.getElementById(this.layer),0,tabHeight);
		this.on=true;
	}
} else {
	if(!nav.isDom) {
		eval(this.tab1+v+"=\""+hidden+"\";");
		eval(this.tab2+v+"=\""+hidden+"\";");
		desplaza(eval(this.tab1),0,-tabHeight);
		desplaza(eval(this.layer),0,0);
	} else {
		document.getElementById(this.tab1).style.visibility="hidden";
		document.getElementById(this.tab2).style.visibility="hidden";

		desplaza(document.getElementById(this.tab1),0,-tabHeight);

		desplaza(document.getElementById(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;
} else if(nav.isDom) {
	maxHeight=self.innerHeight-tabHeight*2;
}

}
function writeNew(d,idioma){
    var now = new Date();
    var today = new Date(now.getYear(),now.getMonth(),now.getDate());
    var date = new Date(d.substring(6,10),
                        d.substring(3,5)-1,
                        d.substring(0,2));
	if (date<=today)
        return '';
	else
		return ' <IMG SRC="/cconline/menu/images/new_'+idioma+'.gif" BORDER=0>';
}

function writeImage(dinici, dfinal, imatge){

	var now = new Date();
	var today = new Date(now.getYear(),now.getMonth(),now.getDate());
	var dateInici = new Date(dinici.substring(6,10),
                        dinici.substring(3,5)-1,
                        dinici.substring(0,2));
	var dateFinal = new Date(dfinal.substring(6,10),
                        dfinal.substring(3,5)-1,
                        dfinal.substring(0,2));
	if (dateInici>today || dateFinal<today || dateFinal<dateInici) {
        	return '';
	} else {
		return ' <IMG SRC="'+imatge+'" BORDER=0>';
	}
}


var oldOption=null;
var optionSelected="";
function selectOption(option) {
	// Treiem selecció
	if(optionSelected!="" && oldOption!=option) {
		var obj=oldOption;
		var imgObj = obj.cells(0).all(obj.name+"I");
		if(imgObj!=null) {
			if(imgObj.src==imageUpWhite.src)
				imgObj.src=imageUp.src;
			else if(imgObj.src==imageDownWhite.src)
				imgObj.src=imageDown.src;
		}
		var numcells=obj.cells.length;
		if(numcells>0) {
			var objCell = eval(obj.cells(numcells-1));
			var lengthcell = objCell.all.length;
			if(lengthcell>0) {
				var imgNew = eval(objCell.all(lengthcell-1));
				if(imgNew!=null) {
					if(imgNew.src==imageNewRev.src)
						imgNew.src=imageNew.src;
					else if(imgNew.src==imageExcRev.src)
						imgNew.src=imageExc.src;
				}
			}
		}
	}

	// Afegim selecció
	oldOption=option;
	optionSelected=option.name;
}

function restore(resize){
if(resize==undefined)
resize=true;if(!isOk)
return false;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;
} else if(nav.isDom) {
	document.getElementById(tot).style.height=maxHeight+2*tabHeight;
	document.getElementById(tot).style.clip='rect(0px '+itemWidth+'px '+(maxHeight+2*tabHeight)+'px 0px)';
}
this.menu.tabs.newHeight(this.menu.tabs.height);}
if(nav.isNN&&resize){
var va=eval("parent."+linkTarget);if(va!=undefined)
va.reload=false;document.location.href=document.location.href;}
}
var activeWindowLocale;function setActiveWindowLocale(l){
if(activeWindowLocale!=undefined&&l!=activeWindowLocale)
eval("parent."+pathTarget+".history.go(0);");}
function entrarMenu(obj){
//if(!obj.contains(event.fromElement))
if(optionSelected!=obj.name) {
	//var imgObj = document.getElementById(obj.name+"I");
	var imgObj = obj.cells(0).all(obj.name+"I");
	if(imgObj!=null) {
		if(imgObj.src==imageUp.src)
			imgObj.src=imageUpWhite.src;
		else if(imgObj.src==imageDown.src)
			imgObj.src=imageDownWhite.src;
	}
	var numcells=obj.cells.length;
	if(numcells>0) {
		var objCell = eval(obj.cells(numcells-1));
		var lengthcell = objCell.all.length;
		if(lengthcell>0) {
			var imgNew = eval(objCell.all(lengthcell-1));
			if(imgNew!=null) {
				if(imgNew.src==imageNew.src)
					imgNew.src=imageNewRev.src;
				else if(imgNew.src==imageExc.src)
					imgNew.src=imageExcRev.src;
			}
		}
	}
}

obj.style.cursor="hand";obj.style.color="#CC0000"}
function salirMenu(obj){
//if(!obj.contains(event.toElement))
//var imgObj = document.getElementById(obj.name+"I");
if(optionSelected!=obj.name) {
	var imgObj = obj.cells(0).all(obj.name+"I");
	if(imgObj!=null) {
		if(imgObj.src==imageDownWhite.src)
			imgObj.src=imageDown.src;
		else if(imgObj.src==imageUpWhite.src)
			imgObj.src=imageUp.src;
	}
	var numcells=obj.cells.length;
	if(numcells>0) {
		var objCell = eval(obj.cells(numcells-1));
		var lengthcell = objCell.all.length;
		if(lengthcell>0) {
			var imgNewRev = eval(objCell.all(lengthcell-1));
			if(imgNewRev!=null) {
				if(imgNewRev.src==imageNewRev.src)
					imgNewRev.src=imageNew.src;
				else if(imgNewRev.src==imageExcRev.src)
					imgNewRev.src=imageExc.src;
			}
		}
	}
}
obj.style.cursor="default";obj.style.color="#000000"}
function MenuDescriptor(name){
var parent="";this.levels=new Array();this.parents=new Array();this.names=new Array();this.names[0]="";this.parents[0]="";this.lastLevel=0;this.lastName="";this.lastObj="";this.a=function(level,obj){
level=level-1;if(this.levels[level]==undefined||this.levels[level]=="")
this.levels[level]=new Array();if(level>this.lastLevel){
this.parents[level]=this.lastName;this.lastLevel=level;}
else
this.lastLevel=level;this.levels[level][this.levels[level].length]=[obj[0],obj[1],obj[2],obj[3],obj[4],this.parents[level]];this.lastName=obj[0];}
;this.createLevel1=function(){
var aux="";for(var i=0;i<this.levels[0].length;i++){
var obj=this.levels[0][i];var name=obj[0];var description=(obj[2]!=undefined)?obj[2]:"";if(description==""||description==undefined)
description=eval(name+"Text");
var url=(obj[1]!=undefined)?obj[1]:"";var path=obj[3];var isLaM=obj[4];eval(name+"= new Menu(name,description,url,path,isLaM);");aux+=name+",";}
if(aux!="")
eval("this.menu.addChilds(["+aux.substring(0,aux.length-1)+"]);");}
;this.createChilds=function(level,parentName){
var i=level-1;if(level<0)
return false;var parent=this.levels[i][0][5];var aux="";for(var j=0;j<this.levels[i].length;j++){
var obj=this.levels[i][j];if(obj[5]==parentName){
var name=obj[0];var description=(obj[2]!=undefined)?obj[2]:"";if(description==""||description==undefined)
description=eval(name+"Text");
if(level==3) description="&#8226&nbsp;"+description;
var url=(obj[1]!=undefined)?obj[1]:"";var path=obj[3];var isLaM=obj[4];eval(name+"= new Menu(name,description,url,path,isLaM);");eval(parentName+".addChild("+name+");");}
}
}
;this.createLevel=function(level){
var i=level-1;if(level<0)
return false;var parent=this.levels[i][0][5];var aux="";for(var j=0;j<this.levels[i].length;j++){
var obj=this.levels[i][j];var name=obj[0];var description=(obj[2]!=undefined)?obj[2]:"";if(description==""||description==undefined)
description=eval(name+"Text");
var url=(obj[1]!=undefined)?obj[1]:"";var path=obj[3];var isLaM=obj[4];eval(name+"= new Menu(name,description,url,path,isLaM);");if(obj[5]==parent){
aux+=name+",";if(j==(this.levels[i].length-1))
eval(parent+".addChilds(["+aux.substring(0,aux.length-1)+"]);");}
else{
eval(parent+".addChilds(["+aux.substring(0,aux.length-1)+"]);");aux=name+",";parent=obj[5];if(j==(this.levels[i].length-1))
eval(parent+".addChilds(["+name+"]);");}
}
}
;this.setMenu=function(menu){
this.menu=menu;}
;}
var isMenuDes=false;function createMenu(menu,m){
isMenuDes=true;menu.init();m.setMenu(menu);m.createLevel1();menu.addTabs();menu.setVisible(true);menu.end();}
//-->
