<!-- 
// load on and off arrow images
/*if (document.images){
	var arrowOn = new Image();
	var arrowOff = new Image();

	arrowOn.src = arrowOnImg;
	arrowOff.src = arrowOffImg;
}
*/
/* print layerOne menu */
function layerOne(){
 	var numItems = 0;
 	var arrayName;
	var colspan;
	var menucode="";
	var tmpheight=headerHeight;
	var tdClass = ""
	
	for (var i = 1; i <=numSection; i++){
		if(i<=menu1_end){
			tmpheight=headerHeight;
			tdClass="One"
		}else if(i<=menu2_end){
			tmpheight=headerHeight1;
			tdClass="Two"
		}else{
			tmpheight=headerHeight2;
			tdClass="Three"
		}
	  if (sectionArray[i-1].hasChild>0){
		menucode="<div id=\"s" + i + "\" style=\"position:absolute; left:" + layer1X + "; top:" + tmpheight + "px; z-index:1; visibility:hidden\" class=\"layerOne\">";
		menucode+="\n<table width=\"120\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
		arrayName = "s" + i + "Array";
		numItems = eval(arrayName).length;
		for (var j = 0; j< numItems; j++){
			var iName = "s" + i + "Array\133" + j + "\135";
			if (eval(iName).hasChild > 0){	
				menucode+="\n\t<tr id=\"si" + i + "." + (j+1) + "\">";
				menucode+="\n\t\t<td class=\""+tdClass+"\"><a id=\"sa" + i + "." + (j+1) + "\" href=\"" + eval(iName).itemUrl + "\" onmouseover=\"showLayer('layerOne','Y','s" + i + "." + (j+1) + "')\" onmouseout=\"menuTimer('layerOne','Y','s" + i + "." + (j+1) + "')\" class=\"hasChild\">" + eval(iName).itemName + "</a></td>";
			}else{	
				menucode+="\n\t<tr id=\"si" + i + "." + (j+1) + "\">";
				menucode+="\n\t\t<td class=\""+tdClass+"\"><a id=\"sa" + i + "." + (j+1) + "\" href=\"" + eval(iName).itemUrl + "\" onmouseover=\"showLayer('layerOne','N','s" + i + "." + (j+1) + "')\" onmouseout=\"menuTimer('layerOne','N','s" + i + "." + (j+1) + "')\">" + eval(iName).itemName + "</a></td>";
			}
			menucode+="\n\t</tr>";
			
		} // j loop
		
		menucode+="\n</table>";
		menucode+="\n</div>";
		//document.write("<textarea>"+menucode+"</textarea>");
		document.write(menucode);
		menucode="";
	  }//hasChild	
		if (sectionArray[i-1].hasChild>0){
			/*if (isIE) {
				document.all["s"+i].style.position="absolute";
				document.all["s"+i].style.left=layer1X;
				document.all["s"+i].style.zIndex="1";
				document.all["s"+i].style.visibility="hidden";
			} else if (isNS){
				document.getElementById("s"+i).style.visibility="hidden";
				document.getElementById("s"+i).style.left=layer1X;
				document.getElementById("s"+i).style.zIndex="1";
			}*/
		}				
	} // i loop
}


/* print layerTwo menu */
function layerTwo(){
	var subarrayName;
	var arrayName;
	var subarrayItem;
	var menucode="";
	var tdClass=""
	
	for (var i = 1; i<=numSection; i++){
		if(i<=menu1_end){
			tdClass="One"
		}else if(i<=menu2_end){
			tdClass="Two"
		}else{
			tdClass="Three"
		}
		if (sectionArray[i-1].hasChild > 0){
			arrayName = 's' + i + 'Array';
			numItems = eval(arrayName).length;
			for (var j = 0; j <numItems; j++){
				itemName = arrayName + '[' + j + ']';
				if (eval(itemName).hasChild > 0){
					menucode="<div id=\"s" + i + "." + (j+1) + "\" style=\"position:absolute; left:" + layer2X + "; top:" + headerHeight + "px; z-index:1; visibility:hidden\" class=\"layerTwo\">";
					menucode+="\n\t<table width=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
					subarrayName = 's'+i+'_'+(j+1)+'Array';			
					for (var k = 0; k<eval(subarrayName).length; k++){
						iName = 's'+i+'_'+(j+1)+'Array['+k+']';
						if (eval(iName).hasChild > 0) {
							menucode+="\n\t<tr id=\"si" + i + "." + (j+1) + "." + (k+1) + "\">";
							menucode+="\n\t\t<td class=\""+tdClass+"\"><a id=\"sa" + i + "." + (j+1) + "." + (k+1) + "\" href=\"" + eval(iName).itemUrl + "\" onmouseover=\"showLayer('layerTwo','Y','s" + i + "." + (j+1) + "." + (k+1) + "')\" onmouseout=\"menuTimer('layerTwo','Y','s" + i + "." + (j+1) + "." + (k+1) +"')\" class=\"hasChild\">" + eval(iName).itemName + "</a></td>";
						}
						else {
							menucode+="\n\t<tr id=\"si" + i + "." + (j+1) + "." + (k+1) + "\">";
							menucode+="\n\t\t<td class=\""+tdClass+"\"><a id=\"sa" + i + "." + (j+1) + "." + (k+1) + "\" href=\"" + eval(iName).itemUrl + "\" onmouseover=\"showLayer('layerTwo','N','s" + i + "." + (j+1) + "." + (k+1) + "')\" onmouseout=\"menuTimer('layerTwo','N','s" + i + "." + (j+1) + "." + (k+1) + "')\">" + eval(iName).itemName + "</a></td>";
						}
					}//for k
					menucode+="\n\t</table>";
					menucode+="\n</div>";
					document.write(menucode);
					/*if (isIE) {
						document.all["s" + i + "." + (j+1)].style.position="absolute";
						document.all["s" + i + "." + (j+1)].style.left=layer2X;
						document.all["s" + i + "." + (j+1)].style.zIndex="1";	
						document.all["s" + i + "." + (j+1)].style.visibility="hidden";
					} else if (isNS){
						document.getElementById("s" + i + "." + (j+1) ).style.visibility="hidden";
						document.getElementById("s" + i + "." + (j+1) ).style.left=layer2X;
						document.getElementById("s" + i + "." + (j+1) ).style.zIndex="1";
					}*/
				}// hasChild
			}// for j
		}// if section hasChild
	}// for i*/
} // end function

function layerThree(){
	var subarrayName;
	var arrayName;
	var subarrayItem;
	var subsubarrayItem;
	var menucode="";
	
	for (var i = 1; i<=numSection; i++){
		if (sectionArray[i-1].hasChild > 0){
			arrayName = 's' + i + 'Array';
			numItems = eval(arrayName).length;
			for (var j = 0; j <numItems; j++){
				itemName = arrayName + '[' + j + ']';
				if (eval(itemName).hasChild > 0){
					subarrayName = 's'+i+'_'+(j+1)+'Array';			
					for (var k = 0; k<eval(subarrayName).length; k++){
						subarrayItem = 's'+i+'_'+(j+1)+'Array['+k+']';
						if (eval(subarrayItem).hasChild > 0){
							menucode="<div id=\"s" + i + "." + (j+1) + "." + (k+1) + "\" style=\"position:absolute; left:" + layer3X + "; top:" + headerHeight + "px; z-index:2; visibility:hidden\" class=\"layerThree\">";
							menucode+="\n\t<table width=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
							subsubarrayItem = 's' + i + '_' + (j+1) +'_' + (k+1) + 'Array';
							for (var m = 0; m < eval(subsubarrayItem).length; m++) {
								menucode+="\n\t\t<tr id=\"si" + i + "." + (j+1) + "." + (k+1) + "." + (m+1) + "\">";
								menucode+="\n\t\t\t<td><a id=\"sa" + i + "." + (j+1) + "." + (k+1) + "." + (m+1) + "\" href=\"" + eval(subsubarrayItem + '[' + m +']').itemUrl +"\" onmouseover=\"showLayer('layerThree','Y','s" + i + "." + (j+1) + "." + (k+1) + "." + (m+1) + "')\" onmouseout=\"menuTimer('layerThree','Y','s" + i + "." + (j+1) + "." + (k+1) + "." + (m+1)+ "')\">" + eval(subsubarrayItem + '[' + m + ']').itemName + "</a></td>";
								menucode+="\n\t\t</tr>";
							}
							menucode+="\n\t</table>";
							menucode+="\n</div>";
							document.write(menucode);
							/*if (isIE) {
								document.all["s" + i + "." + (j+1) + "." + (k+1)].style.position="absolute";
								document.all["s" + i + "." + (j+1) + "." + (k+1)].style.left=layer3X;
								document.all["s" + i + "." + (j+1) + "." + (k+1)].style.zIndex="1";	
								document.all["s" + i + "." + (j+1) + "." + (k+1)].style.visibility="hidden";
							} else if (isNS){
								document.getElementById("s" + i + "." + (j+1) + "." + (k+1)).style.visibility="hidden";
								document.getElementById("s" + i + "." + (j+1) + "." + (k+1)).style.left=layer3X;
								document.getElementById("s" + i + "." + (j+1) + "." + (k+1)).style.zIndex="1";
							}*/
						}
					}//for k
/*
					document.write(menucode);
*/
				}// hasChild
			}// for j
		}// if section hasChild
	}// for i*/
} // end function

// write the sub menu layers for NS6 and IE5 or above.
if (isIE || isNS) {
	layerOne();
	layerTwo();
	layerThree();
}

//-->
