
var myTop;
var myLeft;
var count = 0;
var myClass;

if(!document.layers){

	for(x in myMenu){
	
		if (myMenu[x][1]!="Home"){
			
		myTop = getY(eval("document.images['leftNavDnArrow_" + x + "']"));
		myLeft = getX(eval("document.images['leftNavDnArrow_" + x + "']")) + 12;
		
		document.write('<div id="div' + x + '" style="background-image:url(images/subMenuBG0.gif); position:absolute; top:' + myTop + 'px; left:' + myLeft + 'px; visibility:hidden; z-index:100;" OnMouseOut="delayhide(\'' + x + '\');" OnMouseOver="showdiv(\'' + x + '\');">');
	
		// Submenus for active menuitem
		for(y in mySubMenu){
			
			strWindowlocation = "window.location.assign";if(mySubMenu[y][2].indexOf("new")!=-1)strWindowlocation = "window.open";
			currParentSubPath = "../"; if (mySubMenu[y][0].indexOf("http")!=-1)currParentSubPath = "";
			
			if(mySubMenu[y][3] == x){
				count++;
				if (count == 1) {myClass="subMenuLinkBtnTop"}else{myClass="subMenuLinkBtn"}
				document.write('<div class="' + myClass + '" onClick="javascript:' + strWindowlocation + '(\'' + currParentSubPath + mySubMenu[y][0] + '\');return false;"><a href="' + currParentSubPath + mySubMenu[y][0] + '"><span><img src="images/spacer.gif" width="10" height="14" border="0" alt="" align="bottom">' + mySubMenu[y][1].replace(/<br>/i,"") + '</span></a></div>');
			}
		}
		if(count!=0)document.write('<img src="images/subMenuBot0.gif" width="185" height="2" border="0"><br>');
		document.write('</div>');
		count = 0;
		
		}
	}

}