<!--

// testing variable
var testing = true;

 window.onerror = null;
 var bName = navigator.appName;
 var bPlatform = navigator.platform;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer == 4);
 var MZ5 = (bName == "Mozilla" && bVer == 5);
 var NS6 = (bName == "Netscape" && bVer == 5);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer == 4);
 var IE5 = (bName == "Microsoft Internet Explorer" && bVer == 5);
 // variable can be set from within search pages to trigger search page 
 // specific code to hide the SELECT elements when menu is drawn over top.
 var hideSearch = false;
 
 // Special case for explorer 4 on the Mac - it doesn't support Layers well at all!
 if (bPlatform == "MacPPC" && IE4 != "") {
 	IE4 = "";
 }
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 var menuActive = 0;
 var menuOn = 0;
 var onLayer;
 var onMomma;
 var childVisible = null;
 var parentTimeOn = null;
 var timeOn = null;
 var loaded = 0;
 var a0, a1, b0, b1, f0, f1, d0, d1, e0, e1;
 var LayerUsed = null; 
 
// MENU COLOR VARIABLE
var menuColor = "#E7E4DD"
var borderColor = "black"



// LAYER SWITCHING CODE
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
  layerStyleRef="layer.";
  layerRef="document.layers";
  styleSwitch="";
  }else{
  layerStyleRef="layer.style.";
  layerRef="document.all";
  styleSwitch=".style";
 }
}
  
// SHOW MENU
function showLayer(layerName, momma){
  if (loaded == 1) {
    if (NS4 || IE4 || MZ5 || IE5 || NS6) {
      if (timeOn != null) {
		clearTimeout(timeOn)
		if (momma == "") {
			hideLayer(onLayer)
			if (onMomma != "") {
				hideLayer(onMomma)
			}
			if (childVisible != null && childVisible != "") {
				hideLayer(childVisible)
			}			
		} else if (onLayer != momma) {
			hideLayer(onLayer)
		} else if (layerName != childVisible && childVisible != null && childVisible != "") {
			hideLayer(childVisible)
		}
      }
      if (NS4 || IE4) {
        eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
      } else if (MZ5 || NS6 || IE5) {
        var strlayer = document.getElementById(layerName)
        strlayer.style.display = "block";    
        strlayer.style.visibility = "visible";
      } 
      // special case to call search page specific function that will make
      // select elements invisible to avoid layering problem with menu - 
      // search page will set hideSearch to true to activate this function call
      if ((IE4 || IE5) && (hideSearch)) {
        hideSearchElements(layerName);
      }
      if (momma != "") {
	  	onLayer = momma;
      	onMomma = momma;
	    childVisible = layerName;
	  } else {
	  	onLayer = layerName;
      	onMomma = "";
	  }
	  LayerUsed = true;
    }
  }
}

// HIDE MENU
function hideLayer(layerName){
  if (loaded == 1 && LayerUsed != null) {
    if (menuActive == 0) {
      if (NS4 || IE4) {
        eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
      } else if (MZ5 || NS6 || IE5) {
        var strlayer = document.getElementById(layerName)
        strlayer.style.display = "none";    
      }
      // special case to call search page specific function that will make
      // select elements visible - search page will set hideSearch to true
      // to activate this function call
      if ((IE4 || IE5) && (hideSearch)) {
        showSearchElements(layerName);
      }
    }
  }
}

// TIMER FOR BUTTON MOUSE OUT
function btnTimer() {
 timeOn = setTimeout("btnOut()", 1250)
}

// BUTTON MOUSE OUT
function btnOut(layerName) {
 if (menuActive == 0) {
  hideLayer(onLayer)
  if (childVisible != null && childVisible != "") {
	hideLayer(childVisible)
  }
 }
}

// MENU MOUSE OVER  
function menuOver(itemName) {
if (loaded == 1)
{
 clearTimeout(timeOn)
 if (childVisible != null && childVisible != "" && childVisible != itemName) {
	hideLayer(childVisible);
	childVisible = null;
 }
 menuActive = 1
}
}

// MENU MOUSE OUT 
function menuOut(itemName) {
if (loaded == 1 && onLayer != "")
{
  menuActive = 0 
  timeOn = setTimeout("btnOut(onLayer)", 1250)
 }
}

// Creates menu object
function menuLink(title, url, momma, otherurl) {
 this.title = title
 this.url = url
 this.momma = momma
 this.otherurl = otherurl
}

// Builds menu TABLE
function menuMaker(menuArray) {
var id, strurl
id = eval(menuArray + ".imgname")

 n = ""
 j = eval(menuArray + ".length") - 1;
 numCols = 4
 
 topTable = "<div ID='" + eval(menuArray + ".id") + "'><TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' width='161'><tr><td bgcolor='" + borderColor +"' height='1' colspan='" + numCols +"'><IMG src='/images/spacer.gif' height='1' width='161'></td></tr>"
 btmTable = "<tr><td bgcolor='" + borderColor +"' height='1' colspan='" + numCols +"'><IMG src='/images/spacer.gif' height='1' width='161'></td></tr></TABLE></div>"
 n += topTable
 for (var i = 0; i <=j; i++) {
	strurl = eval(menuArray + "[" + i + "].url")
	otherurl = eval(menuArray + "[" + i + "].otherurl")
	
	
	if (strurl == "") {

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}

		bgnrow = "<TR><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD><TD width=144 height=20 nowrap bgcolor='" + menuColor +"'>";
		n += bgnrow + "&nbsp;&nbsp;<A HREF='"+ otherurl +"' class='menus' onMouseOver='menuOver(\"" + id + "\")' onMouseOut='menuOut(\"" + id + "\")' TARGET='_top'>" + eval(menuArray + "[" + i + "].title") + "</a>";
		endrow = "<br></TD><TD width=15 height=20 nowrap bgcolor='" + menuColor +"'><img src='/images/spacer.gif' border='0'></TD><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD></TR><tr><td bgcolor='" + borderColor +"' height='1' colspan='" + numCols +"'><IMG src='/images/spacer.gif' height='1' width='161'></td></tr>";
		n += endrow;

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}
	
	} else if (strurl.indexOf('>>') != -1) {

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}
		
		bgnrow = "<TR><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD><TD width=144 height=20 nowrap bgcolor='" + menuColor +"'>";
  		n += bgnrow + "&nbsp;&nbsp;<A HREF='"+ otherurl +"' class='menus' onMouseOut='btnTimer();' onMouseOver='showLayer(\"" + strurl.substring(strurl.indexOf('>>')+2, strurl.length) + "\", \"" + id + "\")'>" + eval(menuArray + "[" + i + "].title") + "</a>";
		endrow2 = "<br></TD><TD width=15 height=20 nowrap bgcolor='" + menuColor +"'>&gt;</TD><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD></TR><tr><td bgcolor='" + borderColor +"' height='1' colspan='" + numCols +"'><IMG src='/images/spacer.gif' height='1' width='161'></td></tr>";
		n += endrow2;

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}

	} else if (strurl.indexOf('http://') != -1) {

 		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}
 		
		bgnrow = "<TR><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD><TD width=144 height=20 nowrap bgcolor='" + menuColor +"'>";
  		n += bgnrow + "&nbsp;&nbsp;<A HREF='" + strurl + "' class='menus' onMouseOver='menuOver(\"" + id + "\")' onMouseOut='menuOut(\"" + id + "\")' TARGET='_blank'>" + eval(menuArray + "[" + i + "].title") + "</a>";
		endrow = "<br></TD><TD width=15 height=20 nowrap bgcolor='" + menuColor +"'><img src='/images/spacer.gif' border='0'></TD><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD></TR><tr><td bgcolor='" + borderColor +"' height='1' colspan='" + numCols +"'><IMG src='/images/spacer.gif' height='1' width='161'></td></tr>";
		n += endrow;

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}

	} else {

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}

		bgnrow = "<TR><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD><TD width=144 height=20 nowrap bgcolor='" + menuColor +"'>";
  		n += bgnrow + "&nbsp;&nbsp;<A HREF='" + strurl + "' class='menus' onMouseOver='menuOver(\"" + eval(menuArray + ".id") + "\")' onMouseOut='menuOut(\"" + eval(menuArray + ".id") + "\")'>" + eval(menuArray + "[" + i + "].title") + "</a>";
		endrow = "<br></TD><TD width=15 height=20 nowrap bgcolor='" + menuColor +"'><img src='/images/spacer.gif' border='0'></TD><TD bgcolor='" + borderColor +"' width='1'><IMG src='/images/spacer.gif' height='1' width='1'></TD></TR><tr><td bgcolor='" + borderColor +"' height='1' colspan='" + numCols +"'><IMG src='/images/spacer.gif' height='1' width='161'></td></tr>";
		n += endrow;

		if (eval(menuArray + "[" + i + "].momma") != "") {
			menuColor = "#E7E4DD"
		}
	}
 }
 n += btmTable
 
 return n
}

function NSRefresh() {
	if (NS4) {
		self.location.reload();
	}
}

//-->



