//UDMv2.1.1// filter for undefined menus and essential variablesfor (f=0;f<mainItem.length;f++) {	if (!subProps[f]) { subProps[f] = new Array(mainItem[f][2],mainItem[f][3],mainItem[f][3]); }	if (!subItem[f]) { subItem[f] = new Array; }	}if (absTOP<0) { absTOP = 0; }if (absLEFT<0) { absLEFT = 0; }// appreviated base image pathvar bh = baseHREF;// find the inner width and height of the browser windowvar bWid = window.innerWidth; var bHeight = window.innerHeight; // compensate for lack of scrollbar if applicableif (mz7) {	if (document.width < (innerWidth-17)) { bWid-=17; }	} else if (ns6) {	if (document.width <= (innerWidth-30)) { bWid-=14; }	}// find the nav width and horizontal spacevar endSpace = 0;var navSpace = 0;for (j=0;j<mainItem.length;j++) { 	if (mainItem[j][2]=="") { mainItem[j][2]=10; }	if (mainItem[j][1]=="") { mainItem[j][1]='&nbsp;'; 		}	navSpace+=mainItem[j][2]+bSIZE; 	}endSpace = bWid-navSpace-bSIZE;if (bWid<navSpace) { menuALIGN="left"; absLEFT=0; stretchMENU=false; showBORDERS=false; }// find the nav heightvar navHeight = fSIZE+5+vPADDING;var actualHeight = navHeight+(bSIZE*2); // find the subnav item heightvar subnavHeight = sfSIZE+5+svPADDING;var actualsubHeight = subnavHeight+(sbSIZE*2); // set values for different alignmentsvar stAdjust=0; var absRIGHT; var relLEFT; var ralign=false;if (menuALIGN=="right") { 	ralign=true;	absRIGHT = absLEFT; 	absLEFT = endSpace-absRIGHT;	relLEFT = absLEFT;	if (relLEFT<0) { relLEFT=0; }	absLEFT=0;	}var calign=false;if (menuALIGN=="center") { 	calign=true;	absLEFT = parseInt(endSpace/2);	relLEFT = absLEFT;	if (relLEFT<0) { relLEFT=0; }	absLEFT=0;	}var lalign=false;if (menuALIGN=="left") { 	lalign = true;	absRIGHT = absLEFT;	relLEFT = absLEFT; 	if ((op5||stretchMENU)&&absRIGHT>0) { stAdjust = absRIGHT+(2*bSIZE); }	if (relLEFT<0) { relLEFT=0; }	if (stretchMENU) { absLEFT=0; }	}var subLEFT = relLEFT;if (ralign) { subLEFT-=absRIGHT; }if (lalign) { subLEFT+=absRIGHT; }	// how many main nav itemsvar ntl = 0;for (intl=0;intl<mainItem.length;intl++) { if (mainItem[intl][1]!="") { ntl++; }}var cStyle = 'cursor:hand';// do nothingfunction doNothing() { }// find background colors or imagesvar back_defs = new Array(mCOLOR,bCOLOR,rCOLOR,smCOLOR,sbCOLOR,srCOLOR);var useIMG = new Array(false,false,false,false,false,false)var backers = new Array;for (b=0;b<6;b++) {	backers[b] = 'bgcolor=' + back_defs[b];	if ((back_defs[b].indexOf('.gif') != -1) || (back_defs[b].indexOf('.jpg') != -1) || back_defs[b]=='') { useIMG[b] = true; }	if (useIMG[b]) { 		backers[b] = 'background="' + bh + back_defs[b] + '"'; 		}	if (back_defs[b]=='') { backers[b]=''; } 	}// clear submenusvar previousId = 0;function clearMenus(num) {d.getElementById("grid").style.visibility = 'hidden';if (vOFFSET>0) { d.getElementById('gridblocker' + previousId).style.visibility = 'hidden'; }if (shCOLOR!="") { d.getElementById('shadow' + previousId).style.visibility = 'hidden'; }d.getElementById('subnav' + previousId).style.visibility = 'hidden'; d.getElementById('sublinks' + previousId).style.visibility = 'hidden'; d.getElementById('roll' + previousId).style.visibility = 'hidden'; }// open selected submenuvar num;var gridOkay = false;function openMenu(num) {d.getElementById("grid").style.visibility = 'visible';if (subItem[num]!="") { 	d.getElementById('subnav' + num).style.visibility = 'visible'; 	d.getElementById('sublinks' + num).style.visibility = 'visible'; 	if (vOFFSET>0) { d.getElementById('gridblocker' + num).style.visibility = 'visible'; }	if (shCOLOR!=""&&subItem[num]!='') { d.getElementById('shadow' + num).style.visibility = 'visible'; }	}previousId = num;}//alert("assemble main nav");var tSTR='';var tFrame = '<table cellpadding=0 cellspacing=0 border=0>';// event capturing layertSTR+='<span id="grid" style="visibility:hidden\; position:absolute\; top:0\; left:0\; width:' + bWid + '\; height:' + bHeight + '\; z-index:' + zORDER + '" onmouseover="clearMenus()"></span>';// nav stretching and event capturing layervar stbSize = bSIZE;tSTR+='<span id="stretchnav" ';if (showBORDERS) {	if (useIMG[1]) { tSTR+='style="background-image:url(' +  bh + bCOLOR + ')\; z-index:' + (zORDER+1) + '\; position:absolute\; top:' + absTOP + '\; left:0\;">'; }	else { tSTR+='style="background:' + bCOLOR + '\; z-index:' + (zORDER+1) + '\; position:absolute\; top:' + absTOP + '\; left:0\;">'; }	} else {	tSTR+='style="z-index:' + (zORDER+1) + '\; position:absolute\; top:' + absTOP + '\; left:0\;">'; 	stbSize = 0;	}var stretchLayer = '';if (stretchMENU) { stretchLayer = backers[0]; }if (mz7) { stretchHeight-=(2*bSIZE); }tSTR+='<table cellpadding=0 cellspacing=' + stbSize + ' border=0 width=' + bWid + '  height=' + actualHeight + '><tr><td ' + stretchLayer + ' onmouseover="clearMenus()">&nbsp;</td></tr></table>';tSTR+='</span>';// open frameif (useIMG[1]) { tSTR+='<span id="mainnav" style="background-image:url(' +  bh + bCOLOR + ')\; z-index:' + (zORDER+2) + '\; position:absolute\; top:' + absTOP + 'px\; left:' + relLEFT + 'px\;"><table cellpadding=0 cellspacing=' + bSIZE + ' border=0><tr>';  }else { tSTR+='<span id="mainnav" style="background-color:' + bCOLOR + '\; z-index:' + (zORDER+2) + '\; position:absolute\; top:' + absTOP + 'px\; left:' + relLEFT + 'px\;"><table cellpadding=0 cellspacing=' + bSIZE + ' border=0><tr>';  }// linksvar linkHover = ' onmouseover="this.style.color=\''+aHOVER+'\'" onmouseout="this.style.color=\''+aLINK+'\'"';if (aHOVER=='') { linkHover=''; }for (i=0;i<mainItem.length;i++) { 	var space = ' left:0px\;';	if (mainItem[i][3]=="left") { space = ' left:' + tINDENT + 'px\;'; }	if (mainItem[i][3]=="right") { space = ' left:-' + tINDENT + 'px\;'; }	if(mainItem[i][1]!="") { 		if (mainItem[i][0]=="") {  mainItem[i][0] = "javascript:doNothing()"; cStyle = 'cursor:default'; } else { cStyle = 'cursor:hand'; }		tSTR+='<td onmouseover="clearMenus()\; this.firstChild.style.visibility=\'visible\'\; openMenu(' + i + ')" class=menubarTD height=' + navHeight + ' ' + backers[0] + ' onmouseout="if(!keepLIT){this.firstChild.style.visibility=\'hidden\'}" width="' + (mainItem[i][2]) + '"><table id="roll' + i + '" style="position:relative\; background-image:url(' + bh + rCOLOR + ')\; background-color:' + rCOLOR + '\; visibility:hidden\;" onmouseout="if(!keepLIT){this.style.visibility=\'hidden\'}" cellpadding=0 cellspacing=0 border=0 width="' + (mainItem[i][2]) + '" height="100%"><tr><td align="' + mainItem[i][3] + '"><a href="' + mainItem[i][0] + '" target="' + mainItem[i][4] + '" style="' + cStyle + '\; visibility:visible\; position:relative\; top:' + vtOFFSET + '\; ' + space + '" ' + linkHover + '>' + mainItem[i][1] + '</a></td></tr></table></td>'; 		}	}// right spacer// close frametSTR+='</tr></table></span>'; // assemble submenusvar mSTR='';var SUBabsLEFT=0;for (count=0;count<mainItem.length;count++) {	var mzSubAbsTop = sbSIZE;		// text alignment and indentation	var space = ' left:0px\;';	if (subProps[count][2]=="left") { space = ' left:' + stINDENT + 'px\;'; }	if (subProps[count][2]=="right") { space = ' left:-' + stINDENT + 'px\;'; }		// find next submenu position	if (count==0) { 		SUBabsLEFT=relLEFT+bSIZE;		}	else { SUBabsLEFT+=mainItem[(count-1)][2]+bSIZE; }		// specify edge alignemnt	var actualLEFT = SUBabsLEFT+hOFFSET;	if (subProps[count][1]=="right") { 		actualLEFT = SUBabsLEFT-(subProps[count][0]-mainItem[count][2])-hOFFSET;		}				// grid blocking image for vertical offset	if (vOFFSET>0) { mSTR+='<div id="gridblocker' + count + '" style="width:' + subProps[count][0] + 'px\; height:' + vOFFSET + '\; visibility:hidden\; z-index:' + (zORDER+1) + '\;position:absolute\; top:' + (absTOP+actualHeight) + 'px\; left:' + actualLEFT + 'px\;"></div>'; }		// container cells	mSTR+='<span id="subnav' + count + '" style="visibility:hidden\; z-index:' + (zORDER+4) + '\; position:absolute\; top:' + (absTOP+actualHeight+vOFFSET) + 'px\; left:' + actualLEFT + 'px\;"><table cellpadding=0 cellspacing=0 width="' + subProps[count][0] + '" border=0 ' + backers[4] + '>'; 	for (i=0;i<subItem[count].length;i++) { 		if (subItem[count][i][0]!=''&&subItem[count][i][1]!='') {			var subParent = 'subnav' + count;			mSTR+='<tr><td><table cellpadding=0 cellspacing=0 ' + backers[3] + ' border=0 style="position:relative\; margin-top:' + sbSIZE + '\; margin-left:' + sbSIZE + '\; margin-right:' + sbSIZE + '\; height:' + (subnavHeight) + '\;" width="' + (subProps[count][0]-(sbSIZE*2)) + '"><tr><td class=SUBmenubarTD align="' + subProps[count][2] + '"><table id="subroll' + count + i + '" style="position:relative\; background-image:url(' + bh + srCOLOR + ')\; background-color:' + srCOLOR + '\; visibility:hidden\;" cellpadding=0 cellspacing=0 border=0 width="' + (subProps[count][0]-(sbSIZE*2)) + '" height=' + subnavHeight + '><tr><td align="' + subProps[count][2] + '">&nbsp;</td></tr></table></td></tr></table></td></tr>'; 			}		}	mSTR+='<tr><td><div style="width:2px\; height:' + sbSIZE + 'px\;"></div></td></tr>';	mSTR+='</table></span>';	// links	var sublinkHover = ' onmouseover="this.style.color=\''+saHOVER+'\'" onmouseout="this.style.color=\''+saLINK+'\'"';	if (saHOVER=='') { sublinkHover=''; }	mSTR+='<span id="sublinks' + count + '" style="visibility:hidden\; z-index:' + (zORDER+5) + '\; position:absolute\; top:' + (absTOP+actualHeight+vOFFSET) + 'px\; left:' + actualLEFT + 'px\;"><table cellpadding=0 cellspacing=0 width="' + subProps[count][0] + '" border=0>'; 	for (i=0;i<subItem[count].length;i++) { 		if (subItem[count][i][0]!=''&&subItem[count][i][1]!='') {			var subParent = 'subnav' + count;			mSTR+='<tr><td><table cellpadding=0 cellspacing=0 border=0 style="position:relative\; top:' + mzSubAbsTop + '\; margin-top:0\; margin-left:' + sbSIZE + '\; margin-right:' + sbSIZE + '\; " onmouseover="d.getElementById(\'subroll' + count + i + '\').style.visibility=\'visible\'" onmouseout="d.getElementById(\'subroll' + count + i + '\').style.visibility=\'hidden\'"><tr><td class=SUBmenubarTD align="' + subProps[count][2] + '" width="' + (subProps[count][0]-(sbSIZE*2)) + '" height=' + subnavHeight + '><a href="' + subItem[count][i][0] + '" id="sublink' + count + i + '" target="' + subItem[count][i][2] + '" style="position:relative\; top:' + (svtOFFSET) + '\; ' + space + '" ' + sublinkHover + ' onmouseover="d.getElementById(\'subroll' + count + i + '\').style.visibility=\'visible\'">' +  subItem[count][i][1] + '</a></td></tr></table></td></tr>';			// correct for positioning discrepancy			if (mz7) { mzSubAbsTop += sbSIZE; }			}		}	mSTR+='<tr><td><div style="width:2px\; height:' + sbSIZE + 'px\;"></div></td></tr>';	mSTR+='</table></span>';	// drop shadow if (shCOLOR!="") { mSTR+='<span id="shadow' + count + '" style="visibility:hidden\; -moz-opacity:' + (shOPACITY/100) + '\; background-image:url(' + bh + shCOLOR + ')\; background-color:' + shCOLOR + '\; z-index:' + (zORDER+3) + '\; position:absolute\; top:' + (absTOP+actualHeight+vOFFSET+shSIZE) + 'px\; left:' + (actualLEFT+shSIZE) + 'px\; width:' + subProps[count][0] + '\; height:1\;"></span>'; }}// resize / reload trapfunction nsinit() { setTimeout("window.onresize = redo", 1000); }function redo() { window.location.reload(); }if (mz7) { window.onload = nsinit; }else { window.onresize=new Function("window.location.reload()") }// static positioning properties from Dynamic Drive// http://www.dynamicdrive.com/dynamicindex1/davidmenu.htmvar staticObj;function makeStatic() {d.getElementById("grid").style.top=window.pageYOffset; d.getElementById("stretchnav").style.top=window.pageYOffset+absTOP; d.getElementById("mainnav").style.top=window.pageYOffset+absTOP; for (s=0;s<mainItem.length;s++) {	d.getElementById('subnav' + s).style.top=window.pageYOffset+(absTOP+actualHeight+vOFFSET); 	d.getElementById('sublinks' + s).style.top=window.pageYOffset+(absTOP+actualHeight+vOFFSET); 	if (subItem[num]!=""&&shCOLOR!="") { d.getElementById('shadow' + s).style.top=window.pageYOffset+(absTOP+actualHeight+vOFFSET+shSIZE); }	if (vOFFSET>0) { d.getElementById('gridblocker' + s).style.top=window.pageYOffset+(absTOP+actualHeight); }	}setTimeout("makeStatic()",0); }// draw main nav d.write(tSTR);// draw submenusd.write(mSTR);// find shadow heightsvar foundthem = false;function findHeights() {if (!foundthem) { 	for(h=0;h<mainItem.length;h++) {		d.getElementById('shadow' + h).style.height = d.getElementById('subnav' + h).offsetHeight;		}	}foundthem = true;if (staticMENU==true) { makeStatic(); }}d.onmouseover = findHeights;