if(l || ie || dom){
	strMainDiv = new String("");
	strSub = new String("");
	strTemp = new String("");
	var br;
	for(j=0;j<arrLen;j++){
		strMainDiv = "<div id=\"MENU"+j+"\" class=\"menuT\"><a href=\""+arrMenuContents[j][3]+"\"><img src=\""+picFolderSrc+""+arrMenuContents[j][0]+"\" name=\"swap"+j+"\" width=\""+arrMenuContents[j][2]+"\" height=\""+entryHeight+"\" alt=\"\" border=\"0\"></a></div>"; // Main divs HTML
		document.write(strMainDiv);
		// constructing sub divs
		if(arrMenuContents[j][4]!=null){
			tempArr = arrMenuContents[j][4];	
			strSub = "<div id=\"MENU"+j+"S\" class=\"menuS\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\""+subMenuW+"\"><tr><td width=\"1\" bgcolor=\""+subMenuLineColor+"\"><img src=\""+picFolderSrc+""+blankPic+"\" width=\"1\" height=\"1\" alt=\"\"></td><td width=\""+(subMenuW-2)+"\" bgcolor=\""+subMenuBgColor+"\"><img src=\""+picFolderSrc+""+blankPic+"\" width=\""+(subMenuW-2)+"\" height=\""+subMenuTopPadding+"\" border=\"0\"><br>";
			for(k=0;k<tempArr.length;k++){
				strSub += "<a href=\""+tempArr[k][1]+"\" class=\"menulink\"><img src=\""+picFolderSrc+""+subMenuArrowPath+"\" width=\""+subMenuArrowW+"\" height=\""+subMenuArrowH+"\" border=\"0\" vspace=\"0\" alt=\"\">";
				strTemp = tempArr[k][0];
				br = strTemp.indexOf("<br>");
				if(br != -1){
					br+=4;
					strSub += strTemp.substring(0,br);
					strSub += "<img src=\""+picFolderSrc+""+blankPic+"\" width=\""+subMenuArrowW+"\" height=\""+(subMenuArrowH-5)+"\" border=\"0\" hspace=\"0\" alt=\"\">";
					strSub += strTemp.substring(br,strTemp.length);
				}
				else {
					strSub += strTemp;
				}				
				strSub += "</a><br>";
			}
			strSub += "</td><td width=\"1\" bgcolor=\""+subMenuLineColor+"\"><img src=\""+picFolderSrc+""+blankPic+"\" width=\"1\" height=\"1\" alt=\"\"></td></tr><tr><td colspan=\"3\"><img src=\""+picFolderSrc+""+subMenuBottomPath+"\" width=\""+subMenuBottomW+"\" height=\""+subMenuBottomH+"\" border=\"0\" alt=\"\"></td></tr></table></div>";
			document.write(strSub);
			strSub = "";
		}
	}
}
