var isNS = document.layers;
	var isIE = document.all;
	var isIE55 = false;
	var coll, styleObj;
	var LeftPos=0;
	var browserVer = navigator.appVersion;
	var arrLayerCode = new Array();
	var arrOffSet = new Array();
	var CWidth, CTop;
	var fixedTWidth=250;
	var submenuheight = 219; // height of sub menus from the TOP.
	var OffCenterPosition = -38;
	
	if (isIE)
	{
	
		browserVer = browserVer.substring(browserVer.indexOf("MSIE")+5, browserVer.lastIndexOf(";"));
		if ((browserVer == "5.5") || (browserVer == "6.0b") ||  (browserVer == "6.0"))
			isIE55 = true;
	 
	document.write("<body>");
	CWidth = getWidth();
	document.write("</body>");
	}
	
	function getWidth()
	{
		if (isIE)
			return document.body.clientWidth;
		else
			return window.innerWidth;
	}
	
	
	function openMenu(on, id)
	{
	 //if (currSubMenu == arrLayerCode[id]){ return;}
	 var currSubMenu = arrLayerCode[id];
	 var offset=0;
	 
	 if (CWidth > fixedTWidth)
	 {
	 	if (isIE55) {
	 		offset=(Math.floor((CWidth-fixedTWidth)/2));
	 	}else{
	 		offset=(Math.floor((CWidth-fixedTWidth)/2));
	 	}
	 	
		eval ("LeftPos = OffCenterPosition + offset + arrOffSet[" + id + "]")
	 }
	 else
	 {
	 	if (isIE55) {
	 		offset=0;
	 	}else{
	 		offset=0;
	 	}
	 	eval ("LeftPos = OffCenterPosition + offset + arrOffSet[" + id + "]")
	 }
	 if (on)
	 {
	  document.all[currSubMenu].style.top = submenuheight;
	  document.all[currSubMenu].style.left = parseInt(LeftPos);
	  document.all[currSubMenu].style.display = "block";
	 }
	 else
	 { 
	  document.all[currSubMenu].style.display = "none";
	 }
	}
	
	
	//****************************************************
	if (isNS)
	{
		window.captureEvents(Event.RESIZE)
		window.onResize = DoResize;
	}
	else
	{
		window.onresize = DoResize
	}
	
	function DoResize()
	{
		location.reload()
		return false
	}
	function setarrLayerCode(id, code , OffSet)
	{
	 id = parseInt(id);
	 arrLayerCode[id] = code;
	 arrOffSet[id] = OffSet
	}
	
        var browserVer;
		browserVer = browserVer.substring(browserVer.indexOf("MSIE")+5, browserVer.lastIndexOf(";"));
				
		//alert(browserVer);
		
		//****** Define IE Version ******//
		if (browserVer == "5.5")
			isIE55 = true;
		function version4() {
			if(navigator.appVersion.charAt(0) >= 4) return true
				return false
		}		
		function getWidth2(){
			if (isIE)
				return document.body.clientWidth;
			else
				return (window.innerWidth-17);
		}
		CWidth2=getWidth2();
		if (CWidth2>728) {
		  Xmove=((CWidth2-728)/2);
		  Xmove=Math.floor(Xmove);	
		}else{
		  Xmove=0;
		}