if (is.nav4) document.write("<style type='text/css'>.menuLabel { position:absolute; visibility:hidden; overflow:hidden; font-family: verdana,arial,sans-serif; font-size: 12px; font-weight:bold; color:#00259B; 	background: #transparent; width:75px; margin:0px; padding:2px;border:1px;	text-align : center;}</style>");
	else document.write("<style type='text/css'>.menuLabel {position:absolute;	visibility:hidden;	overflow:hidden;	font-family: verdana,arial,sans-serif;	font-size: 12px;	font-weight:bold;	color:#00259B;	background: transparent;	width:75px;	height:20px;	clip:rect(0px,75px,20px,0px);	margin:0px;	padding:2px;	border:1px;	text-align : center;}</style>");
			
	var menuCount=7, menuAnchor, menuArray, activeMenu=2, menuOpen=false, activeColor='#B5556B', inactiveColor=''; 
	var logoWidth = 124; menuRightBlankSpace = 100; topSpace = 150; bottomSpace = 19;
	function windowOnload()
	{
	  menuAnchor = cbeGetElementById('menuAnchor').cbe;
	  menuArray = new Array();
	  window.cbe.addEventListener("resize", resizeListener);
	  document.cbe.addEventListener("click", menuHide);
	  setTimeout("init()", 250);
	}
	
	function resizeListener(e) {
	  init();
	  document.images['verticalSpacer'].height = getAvailableHeight();
	  //status = document.images['verticalSpacer'].height;
	}
	
	function calcSize(direction) {
	  var myWidth = 0, myHeight = 0;
	  //var tableWidth = '100%';
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight;
	  } else {
	    if( document.documentElement &&
	        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	      //IE 6+ in 'standards compliant mode'
	      myWidth = document.documentElement.clientWidth;
	      myHeight = document.documentElement.clientHeight;
	    } else {
	      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	        //IE 4 compatible
	        myWidth = document.body.clientWidth;
	        myHeight = document.body.clientHeight;
	      }
	    }
	  }
	  if(direction == "w"){
		  return myWidth;
	  }else{
	  	 return myHeight;
	  }
	}
	
	function getAvailableHeight(){
		var winHeight = calcSize("h");
		return winHeight - topSpace - bottomSpace;
	}
	
	
	function getMenuLabelWidth(){
		var winWidth = calcSize("w");
		var menuWidth = winWidth - logoWidth - menuRightBlankSpace;
		var menuLabelWidth = menuWidth / menuCount;
		return menuLabelWidth;
	}
	
	function init() {
	  var i, menuX, menuY, menuLabel;
	  menuX=menuAnchor.pageX();
	  menuY=menuAnchor.pageY();
	  for (i = 1; i <= menuCount; ++i) {
	    menuLabel = cbeGetElementById('menuLabel'+i).cbe;
	    menuLabel.zIndex(1);
		
		/*switch(i){
			case 1: myWidth = 130; break;
			case 2: myWidth = 90; break;
			case 3: myWidth = 90; break;
			case 4: myWidth = 90; break;	
			case 5: myWidth = 90; break;	
			case 6: myWidth = 90; break;	
			case 7: myWidth = 60; break;
		}*/
	    menuLabel.resizeTo(getMenuLabelWidth(),20);
	    menuLabel.moveTo(menuX, menuY);
	    menuLabel.show();
	    menuArray[i] = cbeGetElementById('menu'+i).cbe;
	    menuArray[i].moveTo(menuX, menuY + menuLabel.height()+5);
	    menuArray[i].menuLabel = menuLabel;
	    menuArray[i].zIndex(2);
	    menuX += getMenuLabelWidth();
	  }
	}
	
	function menuShow(mn)
	{
	  if (mn == activeMenu && menuOpen) {
	    closeMenu();
	    return;
	  }  
	  menuArray[activeMenu].hide()
	  //for (i = 1; i <= menuCount; ++i) {
	  //  menuArray[i].menuLabel.background(inactiveColor);
	  //}
	  menuArray[mn].show();
	  //menuArray[mn].menuLabel.background(activeColor);
	  activeMenu = mn;
	  menuOpen = true;
	}
	
	function menuHide(e)
	{
	  if (!menuOpen) return;
	  var x = e.pageX;
	  var y = e.pageY;
	  if (!menuArray[activeMenu].contains(x,y,-2,0,0,0)
	      && !menuArray[activeMenu].menuLabel.contains(x,y,0,20,0,0)) {
	    closeMenu();
	  }
	}
	
	function closeMenu() {
	  menuArray[activeMenu].hide();
	  //menuArray[activeMenu].menuLabel.background(inactiveColor);
	  menuOpen = false;
	  activeMenu = 1;
	}
