var m2Timeout1;
var m2Timeout2;var strLinks
var MaxVRBug;
function clic(url)
	{
	if(strLinks) 
		{
	  	var str = "height=120,innerHeight=120,width=440,innerWidth=440";
		if (window.screen) 
			{
			var ah = screen.availHeight - 30;
			var aw = screen.availWidth - 10;
			var xc = (aw - 400) / 2;
			var yc = (ah - 120) / 2-50;
			str += ",left=" + xc + ",screenX=" + xc;
			str += ",top=" + yc + ",screenY=" + yc;
			}
		pop = window.open(strPath + "/exit.jsp?url="+url,"pop",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,' + str);
		return;			
		}
	else 
		{
		window.location = url
		}
	}

function init()
	{
	initlayers();
	
	

			// Nav Left positioning
			y = cfg_lmenuy;
	for(navLeft=0; navLeft <= cfg_lmenulength ; navLeft++)
		{		
		var tmpL = eval("l" + navLeft);
		tmpL.menuid='l';		tmpL.menu = navLeft;		tmpL.color2=cfg_lmbgcolor2;		tmpL.color1=cfg_lmbgcolor1;		tmpL.color3=cfg_lmbgcolor3;
		
		if (navLeft==2)
		{		tmpL.menupos1 = 1;		tmpL.onmouseover = oversecL3;
		tmpL.onmouseout = outsecL3;}
		else
		{
		tmpL.menupos1 = 1;		tmpL.onmouseover = oversecL;
		tmpL.onmouseout = outsecL;
		}		tmpL.setbgcolor(tmpL.color1);
		tmpL.sety(y);
		tmpL.show();

		if(!strLinks) 
			{				
			var tmpMenuL = eval("l" + navLeft + "menu");
			tmpMenuL.menuid = 'l';
		tmpMenuL.color2=cfg_lmbgcolor2;		tmpMenuL.color1=cfg_lmbgcolor1;		tmpMenuL.color3=cfg_lmbgcolor3;
		tmpMenuL.menupos1=1;			tmpMenuL.menu = navLeft;
			tmpMenuL.onmouseover = oversecL;
			tmpMenuL.onmouseout = outsecL;
			tmpMenuL.setbgcolor(cfg_lmbgcolor4);
			tmpMenuL.sety(y-1);
			}
			
			y += tmpL.getheight();
								}							//l2mbg1.sety(l2.gety());			var y=l2.gety()-1;			for(navLeft=0; navLeft <= 3 ; navLeft++)
			{						var tmpm=eval('l2m'+navLeft);
		
			tmpm.color2=cfg_lmbgcolor2;		
		
			tmpm.color1=cfg_lmbgcolor1;			tmpm.color3=cfg_lmbgcolor3;
			tmpm.subm=eval('l2m'+navLeft+'m0');
			tmpm.subm.sety(y);
			tmpm.currmenu=tmpm;
						tmpm.onmouseover = oversecL2;
			tmpm.onmouseout = outsecL2;			tmpm.setbgcolor(tmpL.color1);
			//tmpm.setbgcolor(tmpm.color1);
						tmpm.sety(y);			y=y+tmpm.getheight();			tmpm.subm.parentmenu=tmpm;
			tmpm.subm.onmouseover=oversecL4;			tmpm.subm.onmouseout=outsecL4;
			tmpm.subm.setbgcolor(cfg_lmbgcolor4);
			}	//alert(l2.gety());						// ====================== Nav right positioning
	y = cfg_rmenuy;
	for(navRight=0; navRight < cfg_rmenulength ; navRight++)
		{
		var tmpR = eval("rm" + navRight);
		tmpR.menupos1=2;
		tmpR.color2=cfg_rmbgcolor2;		tmpR.color1=cfg_rmbgcolor1;		tmpR.color3=cfg_rmbgcolor3;		
		tmpR.menu = navRight;		tmpR.menuid='rm';
		tmpR.onmouseover = oversecL;
		tmpR.onmouseout = outsecL;
		tmpR.setbgcolor(cfg_rmbgcolor1);
		tmpR.sety(y);
		tmpR.show();

		if(!strLinks) 
			{				
			var tmpmenuR = eval("rm" + navRight + "menu");
		tmpmenuR.color2=cfg_rmbgcolor2;		tmpmenuR.color1=cfg_rmbgcolor1;		tmpmenuR.color3=cfg_rmbgcolor3;
			tmpmenuR.menuid = 'rm';			tmpmenuR.menu = navRight;
			tmpmenuR.onmouseover = oversecL;
			tmpmenuR.onmouseout = outsecL;
			tmpmenuR.setbgcolor(cfg_rmbgcolor4);
			tmpmenuR.sety(y-1);
			}
			
			y += tmpR.getheight();
			}							
	// detect for the map Of MaxVR	
	if(isie) MaxVRBug = (document.all.maxvrmap) ? (isie55up) ? 0 : 1 : 0;
		else MaxVRBug = 0;
	
	
	highlightSection();			}
	

function oversecL4()
{clearTimeout(m2Timeout1);this.parentmenu.setbgcolor(cfg_lmbgcolor3);

}function oversecL3()
{//alert('333333333');
dehighlightSection(this);
l2.setbgcolor(this.color3);
//alert('oversecl3');clearTimeout(m2Timeout1);l2m0.show();l2m1.show();l2m2.show();l2m3.show();l2m0m0.hide();l2m1m0.hide();l2m2m0.hide();l2m3m0.hide();
}


function outsecL3()
{clearTimeout(m2Timeout1);m2Timeout1=setTimeout("l2m0.hide();l2m1.hide();l2m2.hide();l2m3.hide()",1000);tmp = eval(this.menuid + this.menu);tmp.setbgcolor(this.color2);
}

function outsecL4()
{clearTimeout(m2Timeout1);m2Timeout1=setTimeout("l2m0.hide();l2m1.hide();l2m2.hide();l2m3.hide();l2m0m0.hide();l2m1m0.hide();l2m2m0.hide();l2m3m0.hide();highlightSection();",1000);
l2m0.setbgcolor(cfg_lmbgcolor1);
l2m1.setbgcolor(cfg_lmbgcolor1);
l2m2.setbgcolor(cfg_lmbgcolor1);
l2m3.setbgcolor(cfg_lmbgcolor1);}
function highlightSection()
{	// dddddd highlight current section		if(cfg_highlightleft!='')		{
			tmp=eval(cfg_highlightleft)
			tmp.setbgcolor(cfg_lmbgcolor5);		}				if(cfg_highlightright!='')		{	//alert(cfg_highlightright +'menu')			tmp=eval(cfg_highlightright);			tmp.setbgcolor(cfg_rmbgcolor5);		}
}function dehighlightSection(subobj)
{	clearTimeout(m2Timeout2);	//alert(subobj.menupos1);
	// dddddd highlight current section		if(cfg_highlightleft!='' && subobj.menupos1==1)		{   //alert(cfg_highlightleft);
			tmp=eval(cfg_highlightleft)
			tmp.setbgcolor(cfg_lmbgcolor1);		}					if(cfg_highlightright!='' && subobj.menupos1==2)		{
			tmp=eval(cfg_highlightright)
			tmp.setbgcolor(cfg_rmbgcolor1);		}
}

function oversecL()
	{l2m0.hide();l2m1.hide();l2m2.hide();l2m3.hide();l2m0m0.hide();l2m1m0.hide();l2m2m0.hide();l2m3m0.hide();	dehighlightSection(this);	//alert(this.color3)
	//alert(this.menuid)
	//alert("l"+this.menu);
	//tmp = eval("l" + this.menu);	tmp = eval(this.menuid + this.menu);
	//alert('color3:' + this.color3);	tmp.setbgcolor(this.color3);	//alert('m:'+submnu1.gety());
	if(!strLinks) 
		{
		//tmp = eval("l" + this.menu + "menu");		tmp = eval(this.menuid + this.menu + "menu");
		//alert(this.menuid + this.menu + "menu");		tmp.show();
		}

	if((MaxVRBug) && (this.menu == 11)) document.all.maxvrmap.style.visibility = "hidden";
	}	

function oversecL2()
	{clearTimeout(m2Timeout1);	l2.setbgcolor(cfg_lmbgcolor3);
	//alert('22222222');	 l2m0m0.hide();
     l2m1m0.hide();
     l2m2m0.hide();l2m3m0.hide();			dehighlightSection(this);	
		tmp = this.currmenu;
		tmp.setbgcolor(this.color3);	tmp=this.subm;
	tmp.show();	
			//if(!strLinks) 
	//	{
	//	tmp = eval(this.menuid + this.menu + "menu");
	//	tmp.show();
	//	}
//
//	if((MaxVRBug) && (this.menu == 11)) document.all.maxvrmap.style.visibility = "hidden";
	}			
function outsecL()
	{//return false;
	//tmp = eval("l" + this.menu);	tmp = eval(this.menuid + this.menu);	
	tmp.setbgcolor(this.color2);
	//tmp = eval("l" + this.menu + "menu");	tmp = eval(this.menuid + this.menu + "menu");
	tmp.hide();//alert(this.color2);

	m2Timeout2=setTimeout("highlightSection();",80);
				if((MaxVRBug) && (this.menu == 11)) document.all.maxvrmap.style.visibility = "visible";
	}				function outsecL2()
	{	tmp=this.currmenu;
	tmp.setbgcolor(this.color1);	//
	//tmp = eval("l" + this.menu);	tmp = this.subm;	m2Timeout1=setTimeout("tmp.hide();l2m0.hide();l2m1.hide();l2m2.hide();l2m3.hide();",1000);	return false;
	tmp.setbgcolor(this.color2);
	//tmp = eval("l" + this.menu + "menu");	tmp = eval(this.menuid + this.menu + "menu");
	tmp.hide();//alert(this.color2);
	
	m2Timeout2=setTimeout("highlightSection();",80);
				if((MaxVRBug) && (this.menu == 11)) document.all.maxvrmap.style.visibility = "visible";
	}

function popWin(url,w,h,scroll,name)
	{
  	var str = "height=" + h + ",innerHeight=" + h;
	str += ",width=" + w + ",innerWidth=" + w;
	if(!name) name = "pop";
	if (window.screen) 
		{
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;

		var xc = (aw - w) / 2;
		var yc = (ah - h) / 2;

		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
		}
		pop = window.open(url,name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=' + scroll + ',resizable=0,' + str);
	}
