//FIND DOM CODE
var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;


if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
if (document.all) {isAll = 1; isDHTML = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
}}

function findDOM(objectID,withStyle) {
	if (withStyle == 1) {
		if (isID) { return (document.getElementById(objectID).style) ; }
		else { 
			if (isAll) { return (document.all[objectID].style); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
	else {
		if (isID) { return (document.getElementById(objectID)) ; }
		else { 
			if (isAll) { return (document.all[objectID]); }
		else {
			if (isLayers) { return (document.layers[objectID]); }
		};}
	}
}




// FIND THE NESTED DOM	
// if there are nested layers e.g. <div id="1">text<div id"2">moretext</div></div>
// new dectection will need to be added to the isLayers sections to accomidate N4's bug

	
function findNestedDOM (parentID, objectID, withStyle) {
	if(withStyle == 1) 	{
		if (isID) {
			return (document.getElementById(objectID).style);
		}
		else {
			if (isAll) {
				return (document.all[objectID].style);
			}
			else {
				if (isLayers) {
					if(parentID) {
						return (document.layers[parentID].layers[objectID]);
					}
					else {
						return document.layers[objectID];
					}
				}
			}
		}
	}
	else {
		if (isID) {
			return (document.getElementById(objectID)); 
		}
		else {
			if (isAll) {
				return (document.all[objectID]);
			}		
			else {
				if (isLayers) {
					if(parentID) {
						return (document.layers[parentID].layers[objectID]);
					}
					else {
						return document.layers[objectID];
					}
				}
			}
		}
	}
}

	
// FIND DOM IMAGE
// Used when needing to sort out the proper DOM for an image manipulation 
// Used currently with swapImage()	
function findDOMimage (imagename) {
	if (isID) {
		return (document.getElementById(imagename)); 
	} 
	else {
		if (isAll) {
			return (document.all[imagename]);
		} 
		else {
			if (isLayers) {
				return (document.images[imagename]);
			}
		}
	}
}




function setStatus(displayStr) 
{ 
	window.status=displayStr;
} 

function removeBlueBox() 
{ 
	obj = window.event.srcElement; 
		if (obj.tagName == "IMG" || obj.tagName == "A") { 
		obj.blur(); 
		} 
}

// BROWSER VERSION CHECKER
	var its;
	var browserName;
	var browserNameLong;
	var browserNew;
	var preloadFlag = false;
	var Macintosh = navigator.userAgent.indexOf('Mac')>0;

	function its() {
		var n = navigator;
		var ua = ' ' + n.userAgent.toLowerCase();
		var pl = n.platform.toLowerCase();
		var an = n.appName.toLowerCase();

		// browser version
		this.version = n.appVersion;
		this.nn = ua.indexOf('mozilla') > 0;

		// 'compatible' versions of mozilla aren't navigator
		if(ua.indexOf('compatible') > 0) {
			this.nn = false;
		}

		this.opera = ua.indexOf('opera') > 0;
		this.ie = ua.indexOf('msie') > 0;
		this.major = parseInt( this.version );
		this.minor = parseFloat( this.version );

		// platform
		this.mac = ua.indexOf('mac') > 0;
		this.win = ua.indexOf('win') > 0;

		// workaround for IE5 & IE6 which both reports at version 4.0
		if(this.ie) {
			if(ua.indexOf("msie 5") || ua.indexOf("msie 6") > 1) {
			var msieIndex = navigator.appVersion.indexOf("MSIE") + 5;
			this.major = parseFloat(navigator.appVersion.substr(msieIndex,3));
			}
		}
		return this;
	}
	function browserNaming() {
		its = new its();
		// is it a DOM-enabled browser?
		if (!document.getElementById) {
			browserNew = false;
		} else {
			browserNew = true;
		}
		// need the name, too
		if (its.opera) {
			browserName = "Opera";
		}
		else if (its.ie) {
			browserName = "IE";
		}
		else {
			browserName = "NS";
		}
		// and the number
		browserNameLong = browserName + its.major;
	}

// OPEN WINDOW FUNCTION
// pulls in customized link, width, height, scrollability
function popUpNew(Page, Width, Height, Scroll) {
window.open(Page,"popUpWindow",'width='+Width+',height='+Height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+Scroll+',copyhistory=no,resizable=yes');
 }
// other changes:
// toolbar - icon bar at top of browser
// location - address bar at top of browser
// directories - links bar at top of browser
// status - progression bar at bottom of browser
// menubar - textual links (File, Edit, etc) at top of the browser
// copyhistory - new window retains history list from parent window
// resizable - allows window to be resized

// FIX N4 CSS ISSUE	
// Netscape 4 has a nasty bug of forgetting an external stylesheet is attached when the browswer is resized
// This script compensates for Netscape's shortsightedness

function reloadPage () {
		if (innerWidth != origWidth || innerHeight != origHeight) {
			location.reload();
			}
		}

if ((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4)) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reloadPage;
	}
	

//ADD N4 STYLESHEET
// Add a stylesheet that is better suited for Netscape 4 browsers, since they can not handle CSS2 properly
function addN4style () {
 if (parseInt(navigator.appVersion) < 5 && browserName == "NS") { 
 	document.write("<link rel='stylesheet' href='../css/n4under.css'>"); 
	} 
  }
  
// SWAP IMAGE
function swapImage (name, source) {
	var image;
	image = findDOMimage(name);
	image.src = source;
}  


// POP UP WINDOW HEAD QUARTERS
function hqWindow(url) {
	var optionsArray = new Array(10);
	var i, z, optionsList, optionVal, commandString;
	optionsArray[0] = ["",""];
	optionsArray[1] = ["height","325"];
	optionsArray[2] = ["width","555"];
	optionsArray[3] = ["location","no"];
	optionsArray[4] = ["menubar","no"];
	optionsArray[5] = ["resizable","no"];
	optionsArray[6] = ["scrollbars","yes"];
	optionsArray[7] = ["toolbar","no"];
	optionsArray[8] = ["status","no"];
	optionsArray[9] = ["directories","no"];
	optionsList = "";
	for ( i = 1; i < arguments.length; i++ ) {
		if (arguments[i] != 'z') {
			optionVal = arguments[i];
		} else {
			optionVal = optionsArray[i][1];
		}
		optionsList += optionsArray[i][0]+"="+optionVal+",";
	}
	for ( i = arguments.length; i < optionsArray.length; i++ ) 
	{

		optionsList += optionsArray[i][0]+"="+optionsArray[i][1]+",";

	}
	commandString = "window.open('"+url+"','new_window','"+optionsList+"');";


//	alert(commandString);

	eval(commandString);

}

// POP UP WINDOW HOSTING CENTER and PHILADELPHIA OFFICE
function hcWindow(url) {
	var optionsArray = new Array(10);
	var i, z, optionsList, optionVal, commandString;
	optionsArray[0] = ["",""];
	optionsArray[1] = ["height","125"];
	optionsArray[2] = ["width","555"];
	optionsArray[3] = ["location","no"];
	optionsArray[4] = ["menubar","no"];
	optionsArray[5] = ["resizable","no"];
	optionsArray[6] = ["scrollbars","no"];
	optionsArray[7] = ["toolbar","no"];
	optionsArray[8] = ["status","no"];
	optionsArray[9] = ["directories","no"];
	optionsList = "";
	for ( i = 1; i < arguments.length; i++ ) {
		if (arguments[i] != 'z') {
			optionVal = arguments[i];
		} else {
			optionVal = optionsArray[i][1];
		}
		optionsList += optionsArray[i][0]+"="+optionVal+",";
	}
	for ( i = arguments.length; i < optionsArray.length; i++ ) 
	{

		optionsList += optionsArray[i][0]+"="+optionsArray[i][1]+",";

	}
	commandString = "window.open('"+url+"','new_window','"+optionsList+"');";
	
	


//	alert(commandString);

	eval(commandString);

}

// POP UP WINDOW SITE MAP
function smWindow(url) {
	var optionsArray = new Array(10);
	var i, z, optionsList, optionVal, commandString;
	optionsArray[0] = ["",""];
	optionsArray[1] = ["height","500"];
	optionsArray[2] = ["width","525"];
	optionsArray[3] = ["location","no"];
	optionsArray[4] = ["menubar","no"];
	optionsArray[5] = ["resizable","no"];
	optionsArray[6] = ["scrollbars","no"];
	optionsArray[7] = ["toolbar","no"];
	optionsArray[8] = ["status","no"];
	optionsArray[9] = ["directories","no"];
	optionsList = "";
	for ( i = 1; i < arguments.length; i++ ) {
		if (arguments[i] != 'z') {
			optionVal = arguments[i];
		} else {
			optionVal = optionsArray[i][1];
		}
		optionsList += optionsArray[i][0]+"="+optionVal+",";
	}
	for ( i = arguments.length; i < optionsArray.length; i++ ) 
	{

		optionsList += optionsArray[i][0]+"="+optionsArray[i][1]+",";

	}
	commandString = "window.open('"+url+"','new_window','"+optionsList+"');";
	
	


//	alert(commandString);

	eval(commandString);

}


<!--
var menuTop = 0;
var menuLeft = 0;

var domSMenu = null;
var oldDomSMenu = null;
var t = 0;
var lDelay = 5;
var lCount = 0;
var pause = 150;

function popMenu(menuNum){
	if (isDHTML) {
///// Sets the previous menu's visibility to hidden
		t = 2;
		if (oldDomSMenu) {
			oldDomSMenu.visibility = 'hidden'; 
			oldDomSMenu.zIndex = '0'; 
			t = 2; 
			lCount = 0;
		}
///// Defines the DOMs	of the menu objects
		var idMenu = 'container';
		var domMenu = findDOM(idMenu,0);
	
		
		var idMenuOpt = 'menuHead' + menuNum;
		var domMenuOpt = findDOM(idMenuOpt,0);	


		var idSMenu = 'menu' + menuNum;
		var domSMenu = findDOM(idSMenu,1);
		

		
///// Defines the positions of the sub-menus
	if (isID || isAll) { 
	/* IE5/Mac has a problem with this line block */
		var menuLeft = (domMenuOpt.offsetLeft) + 140;
		//the amount in pixels that we should place the menu from the top. IMPORTANT
		var menuTop = (domMenuOpt.offsetTop) - 5;
		}
		if (isLayers) {
			var menuLeft = document.layers[idMenuOpt].pageX  - 5;
			var menuTop = 155;
		}

///// Positions and shows the menu
		if (oldDomSMenu != domSMenu) {
			domSMenu.left = parseInt(menuLeft) + 'px'; //IE px fix
			domSMenu.top = parseInt(menuTop) + 'px'; //IE px fix
			domSMenu.visibility = 'visible';
			domSMenu.zIndex = '100';
			oldDomSMenu = domSMenu;
		}

///// Resets oldDom if it is the same as the current DOM
		else { oldDomSMenu = null; }
	}

////// Returns a 'null' value for non-DHTML Browsers 
	else { return null; }
}

function delayHide() {
///// Checks to see if there is a menu showing and whether 
///// the global variable 't' has been set to 0
    if ((oldDomSMenu) && (t == 0)) {

///// Hides the old menu, resets menu conditions, 
///// and stops the function running
        oldDomSMenu.visibility = 'hidden'; 
        oldDomSMenu.zIndex = '0';
        oldDomSMenu = null;
        lCount = 0; 
        return false;
    }

///// Interupts the function if another menu is opened
    if (t == 2) { lCount = 0; return false; }

///// Repeats the function adding 1 to lCount each time until 
///// lCount is equal to lDelay and then sets 't' to 0 so that 
///// the menu will hide when it runs again
    if (t == 1) { 
        lCount = lCount + 1;
        if (lDelay <= lCount) { t = 0; }
        if (lDelay >= lCount) { setTimeout('delayHide(' + t + ')',pause); }
    }
}
// -->

///// Pop up for jpegs and gifs
<!--
		function popUpPic(sPicURL) {    
			window.open( "popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");    
		}  
		//--> 