//<script>

var menuArray = new Array();

function menuObj(lay,nr){
	if(bw.ns4){
		this.lay = document.layers[lay];
		this.lay.parentNr = nr;
		this.lay.write = writeLay;
		this.lay.hide = hideLay;
		this.lay.show = showLay;
	}else{
		if(bw.ie4)
			this.lay = document.all[lay];
		else
			this.lay = document.getElementById(lay);
		this.lay.parentNr = nr;
		this.lay.write = writeLayIE;
		this.lay.hide = hideLayIE;
		this.lay.show = showLayIE;
	}
	this.lay.onmouseover = menuLayOver;
	this.lay.onmouseout = menuLayOut;
}
function menuLayOver(){if(!bw.ns4) selVis("hidden");clipMenu(this.parentNr);hideAll();this.show();}
function menuLayOut(){this.hide();hideMarker();if(!bw.ns4) selVis("visible");}

function writeLay(txt){this.document.write(txt);this.document.close();}
function writeLayIE(txt){this.innerHTML = txt + '<div></div>';}
function hideLay(){this.visibility = "hide";}
function showLay(){this.visibility = "show";}
function hideLayIE(){this.style.visibility = "hidden";}
function showLayIE(){this.style.visibility = "visible";}
function selVis(vis){ }
function hideAll() {
	for(var i=0;i < menuArray.length;i++)
		menuArray[i].lay.hide();
}
function hideMenus(){hideAll();hideMarker();if(!bw.ns4) selVis("visible");}

function showMenu(nr){
	if(menuArray.length>0){ // menus created
		if(!bw.ns4) selVis("hidden");
		clipMenu(nr);
		hideAll();
		menuArray[nr].lay.show();
	}
}

function drawMenu(){
	for(var i=0;i<menuTxt.length;i++){
		menuArray[i] = new menuObj('divsubmenu'+i,i);
		var mTxt = "";
		for(var n=0;n<menuTxt[i].length;n++){
			if(document.getElementById)
				mTxt += '<tr><td height="15" bgcolor="#ffffff" onmouseover="lOver(this)" onmouseout="lOut(this)" ';
			else
				mTxt += '<tr><td height="15" bgcolor="#ffffff" ';
			if(!bw.ns4) 
				mTxt += 'style="cursor:hand"';
			mTxt += 'onclick="goLink(\''+ menuTxt[i][n][1] +'\');return false"><span class="clsmenuitem"><A href="'+menuTxt[i][n][1]+'">&nbsp;'+menuTxt[i][n][0]+'</A>&nbsp;</span></td></tr>';
		}
		menuArray[i].lay.write('<table cellspacing="0" cellpadding="0" border="0"><tr><td><img src="/img/subnav_leftwing.gif" width="5" height="116" border="0" /></td><td bgcolor="#ffffff" align="left" valign="top"><table cellspacing=0 border=0>'+mTxt+'</table></td><td><img src="/img/subnav_rightwing.gif" width="5" height="116" border="0" /></td></tr></table>');
	}
}
function lOver(obj){
	if(!bw.ns4){ 
		obj.style.backgroundColor = "#F4F5F4";
		if(obj.children)
			obj.children[0].children[0].style.color = "#ff4000";
	}
}
function lOut(obj){
	if(!bw.ns4){
		obj.style.backgroundColor = "#FFFFFF";
		if(obj.children)
			obj.children[0].children[0].style.color = "#000000";
	}
}

function clipMenu(indx){
	if(indx < menuclipArea.length){
		if(bw.ns4)
			var mLay = document.layers['divmenuhi'];
		else if(bw.ie4)
			var mLay = document.all['divmenuhi'];
		else
			var mLay = document.getElementById('divmenuhi');
		mLay.setClip = bw.ns4?setClip:setClipIE;
		mLay.show = bw.ns4?showLay:showLayIE;
		mLay.setClip(menuclipArea[indx][0], 0, menuclipArea[indx][1], 29);
		mLay.show();
	}
}
function hideMarker(){
	if(bw.ns4)
		var mLay = document.layers['divmenuhi'];
	else if(bw.ie4)
		var mLay = document.all['divmenuhi'];
	else
		var mLay = document.getElementById('divmenuhi');
	mLay.hide = bw.ns4?hideLay:hideLayIE;
	mLay.hide();
}
function setClip(x, y, x2, y2){
	this.clip.left = x;
	this.clip.top = y;
	this.clip.right = x2;
	this.clip.bottom = y2;
}
function setClipIE(x, y, x2, y2){
	this.style.clip = "rect("+y+" "+x2+" "+y2+" "+x+")";
}
function goLink(linkStr){
	window.location = linkStr;
}
