<!--
NS4 = (document.layers);
NS6 =  ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 5))
IE4 = (document.all);
MAC45 = (navigator.appVersion.indexOf("MSIE 4.5") != -1)
ver4 = (NS4 || IE4);   
isMac = (navigator.appVersion.indexOf("Mac") != -1);
menuHeight=-30;
menuOffset=5;
var overmenu = false;
var openmenu = null;
var overcheck = null;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function stripCharsNotInBag (s, bag)   {   
	var i;
	var returnString = "";
	
	// Search through string's characters one by one.
	// If character is in bag, append to returnString.
	for (i = 0; i < s.length; i++)  {   
	    // Check that current character isn't whitespace.
	    var c = s.charAt(i);
	    if (bag.indexOf(c) != -1) returnString += c;
	} // end for
	return returnString;
} // end stripCharsNotInBag()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
function getRealLeft(img) {
	// Find Position of Image File
	xPos = img.offsetLeft;
	tempEl = img.offsetParent;
  	while (tempEl != null) {
  		xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	} // end while
	return xPos;
} // end getRealLeft()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function getRealTop(img) {
	// Find Position of Image File
	yPos = img.offsetTop;
	tempEl = img.offsetParent;
	while (tempEl != null) {
  		yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
	if (MAC45) yPos=menuOffset;
	return yPos;
} // end getRealTop()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function findloc (imgname)  {
	// Find Position of Image File
	var holdingImage = document.images[imgname];
	var canvasLeft = (NS4 && !NS6) ? holdingImage.x : getRealLeft(holdingImage);
	var canvasTop = (NS4 && !NS6) ? holdingImage.y : getRealTop(holdingImage);
	var canvasWidth = holdingImage.width;
	var canvasHeight = holdingImage.height;
	return ([canvasLeft,canvasTop]);
} // end findloc()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function showMenu(imgname)  {
	// Show Menu Layer
	if (NS6) 
		menu=document.getElementById(imgname+"layer")
	else if (NS4)
		menu=eval("document.layers."+imgname+"layer")
	else
		menu=eval(imgname+"layer");
	if (NS4) menu.visibility = "show"
	else menu.style.visibility = "visible"
	openmenu=imgname;
} // end showMenu()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function hideMenu()  {
	// Hide Menu Layer
	if (openmenu != null)  {
		if (NS6) 
			menu=document.getElementById(openmenu+"layer")
		else if (NS4)
			menu=eval("document.layers."+openmenu+"layer")
		else
			menu=eval(openmenu+"layer");
		if (NS4) menu.visibility = "hide"
		else menu.style.visibility = "hidden"
		img_inact(openmenu)
	} // end outer if
} // end hideMenu()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function popup (imgname)  {
	// Pop Up Menu
	if (NS6) 
		menu=document.getElementById(imgname+"layer")
	else if (NS4)
		menu=eval("document.layers."+imgname+"layer")
	else
		menu=eval(imgname+"layer");
	if (NS4)  {
		menu.top = findloc(imgname)[1]-1-menuHeight;
		menu.left = findloc(imgname)[0];
	}
	else if (NS6)  {
		menu.style.top = findloc(imgname)[1]-1-menuHeight;
		menu.style.left = findloc(imgname)[0];
	}
	else  {
		menu.style.pixelTop = findloc(imgname)[1]-1-menuHeight;
		menu.style.pixelLeft = findloc(imgname)[0];
	}
	showMenu(imgname);
} // end popup()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function checkmenu (openmenu,check)  {
	// Check to see if menu is open but not used, if so it is closed
	if ((overmenu == 0) && (check == overcheck))  {
		if (NS6) 
			menu=document.getElementById(openmenu+"layer")
		else if (NS4)
			menu=eval("document.layers."+openmenu+"layer")
		else
			menu=eval(openmenu+"layer");
		if (NS4) menu.visibility = "hide"
		else menu.style.visibility = "hidden"
		img_inact(openmenu)
	} // end outer if
} // end checkmenu()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function menutimeout (openmenu)  {
	// Set a half second timeout when the menu is not being used to close
	if (IE4)  {
		overcheck=overcheck+1;
		setTimeout("checkmenu(openmenu,"+overcheck+")",500);
	} // end if
} // end menutimeout()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function tocItem (name) {
	this.on = new Image();
	this.on.src = "images/" + name + "_on.gif"
	this.off = new Image();
	this.off.src = "images/" + name + "_off.gif"
} // end tocItem()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function toc_new (name) {
	tocItem[name] = new tocItem(name);
} // end toc_new()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function img_act (imgName, openmenu)  {
	// Show Image
	if (document.images) {
		if ((openmenu == null) || (IE4) || (NS6))
			document[imgName].src = tocItem[imgName].on.src
		else  {
			image= eval("document.layers."+openmenu+"layer.document.images['"+imgName+"']");
			image.src = tocItem[imgName].on.src;
		} // end inner if|else
	} // end outer if
} // end img_act()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function img_inact (imgName, openmenu)  {
	// Hide Image
	if (document.images)  {
		if ((openmenu == null) || (IE4) || (NS6))
			document[imgName].src = tocItem[imgName].off.src
		else  {
			image= eval("document.layers."+openmenu+"layer.document.images['"+imgName+"']");
			image.src = tocItem[imgName].off.src;
		} // end inner if|else
	} // end outer if
} // end img_inact()

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if (document.images != null) {
	toc_new('menu01');
	toc_new('menu01_popup01');
	toc_new('menu01_popup02');
	toc_new('menu01_popup03');
        toc_new('menu01_popup04');
        toc_new('menu01_popup05');
}
//-->