var imgarr = new Array(21);
imgarr[0]=new Image(); imgarr[0].src=rootPath + "images/s.gif";
imgarr[1]=new Image(); imgarr[1].src=rootPath + "images/nav_hom.gif";
imgarr[2]=new Image(); imgarr[2].src=rootPath + "images/nav_hom_o.gif";
imgarr[3]=new Image(); imgarr[3].src=rootPath + "images/nav_cnf.gif";
imgarr[4]=new Image(); imgarr[4].src=rootPath + "images/nav_cnf_o.gif";
imgarr[5]=new Image(); imgarr[5].src=rootPath + "images/nav_exh.gif";
imgarr[6]=new Image(); imgarr[6].src=rootPath + "images/nav_exh_o.gif";
imgarr[7]=new Image(); imgarr[7].src=rootPath + "images/nav_gal.gif";
imgarr[8]=new Image(); imgarr[8].src=rootPath + "images/nav_gal_o.gif";
imgarr[9]=new Image(); imgarr[9].src=rootPath + "images/nav_arc.gif";
imgarr[10]=new Image(); imgarr[10].src=rootPath + "images/nav_arc_o.gif";
imgarr[11]=new Image(); imgarr[11].src=rootPath + "images/nav_prs.gif";
imgarr[12]=new Image(); imgarr[12].src=rootPath + "images/nav_prs_o.gif";
//imgarr[13]=new Image(); imgarr[13].src=rootPath + "images/nav_tvl.gif";
//imgarr[14]=new Image(); imgarr[14].src=rootPath + "images/nav_tvl_o.gif";
imgarr[15]=new Image(); imgarr[15].src=rootPath + "images/nav_cus.gif";
imgarr[16]=new Image(); imgarr[16].src=rootPath + "images/nav_cus_o.gif";
imgarr[17]=new Image(); imgarr[17].src=rootPath + "images/nav_spo.gif";
imgarr[18]=new Image(); imgarr[18].src=rootPath + "images/nav_spo_o.gif";
imgarr[19]=new Image(); imgarr[19].src=rootPath + "images/nav_reg.gif";
imgarr[20]=new Image(); imgarr[20].src=rootPath + "images/nav_reg_o.gif";
imgarr[21]=new Image(); imgarr[21].src=rootPath + "images/nav_faq.gif";
imgarr[22]=new Image(); imgarr[22].src=rootPath + "images/nav_faq_o.gif";

function swap(imgref, imgto)
	{
	eval ('document.' + imgref + '.src = imgarr[' + imgto + '].src');
	return true;
	}

function goTo(thisCode)
	{
	if (thisCode.length == 5) {
		if (thisCode == "2_NWS") 
			self.location.href = rootPath + 'scripts/publish/headlines.asp?eventid=1&code=' + thisCode; 
		else
			self.location.href = rootPath + 'scripts/publish/information.asp?eventid=1&code=' + thisCode;
		}
	else 
		self.location.href = rootPath + thisCode;
	}	

function hideAll(but,ro,submenu)
	{
	//hide everything
	showHide('shu1','','hide');
	showHide('shu2','','hide');
	//showHide('sub1','','hide');
	showHide('sub2','','hide');
	showHide('sub3','','hide');
	//showHide('sub4','','hide');
	//showHide('sub5','','hide');
	//showHide('sub6','','hide');
	//showHide('sub7','','hide');
	//showHide('sub8','','hide');
	showHide('sub9','','hide');
	swap('nav1',1);
	swap('nav2',3);
	swap('nav3',5);
	swap('nav4',7);
	swap('nav5',17);
	swap('nav6',11);
	//swap('nav7',13);
	swap('nav8',15);
	swap('nav9',9);
	swap('nav10',19);
	swap('nav11',21);

	//but show this button
	if (but > '')
		{
		swap(but,ro);

		//show negative layers if there is a submenu
		if (submenu > '')
			showHide(submenu,'','show','shu1','','show','shu2','','show');
		else if (submenu == 0)
			showHide('shu1','','show','shu2','','show');
		}
	}

function findObj(n, d)
	{
	var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
	}

function tmt_findObj(n)
	{
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
	}

function showHide()
	{
		var i,p,v,obj,args=showHide.arguments;
		if(document.getElementById){
			for (i=0; i<(args.length-2); i+=3){
				obj=tmt_findObj(args[i]);
				v=args[i+2];
				v=(v=='show')?'visible':(v='hide')?'hidden':v;
				if(obj) obj.style.visibility=v;
			}
		} else {
			for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { 
				v=args[i+2];
				if (obj.style) {
					obj=obj.style; 
					v=(v=='show')?'visible':(v='hide')?'hidden':v; 
				}
				obj.visibility=v; 
			}
		}
	}