// FRAME ELIMINATOR
// Checks to see if the site is being framed, and pulls the site out.
if (window.location!=top.location) {
	top.location = window.location;
}


// 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');
  }
// the rest...
// toolbar - icons;  location - URL address bar;  directories - links bar;   status - progress bar at bottom;
// menubar - File, Edit, etc;  copyhistory - retains history list from parent window;  resizable - allows resizing



// 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
if (document.layers) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	}

function reloadPage () {
	if (innerWidth != origWidth || innerHeight != origHeight) {
		location.reload();
		}
	}

if (document.layers) onresize = reloadPage;




// SCROLLBAR CHANGES COLOR  
// Makes the color of the scrollbars match the background, if color entered correctly
function changeScrollbarColor(C) {
   if (document.all) {
      document.body.style.scrollbarBaseColor = C;
   }
}

  
// SWAP IMAGE
function swapImage (name, source) {
	var image;
	image = findDOMimage(name);
	image.src = source;
}  



//SET NEW Z-INDEX LEVEL
//Change a DIVs Z Level on the page
function setZIndex(objectName, newIndex) {
	var refObject = findDOM(objectName,1);
	refObject.zIndex = newIndex;

}

//DROPDOWN URL CHANGER
function chgURL(formName,optName) {
			var URL = document.formName.optName.options[document.formName.optName.selectedIndex].value;
			window.location.href = URL;
}

	
// ANTI-SPAM
	function antispam(name,domain) {
    	document.location = "mailto:" + name + "@" + domain;
	}


	
//LOWER BROWSER BORDER FIX
//Remove the blue border around linked images
	function submitbuttonwithborderfix() {
		document.write('<input type="image" src="/private/images/button-go.gif" alt="Go" id="goButton" name="goButton" align="middle" onmouseover="this.src=\'/private/images/button-go-over.gif\';" onmouseout="this.src=\'/private/images/button-go.gif\';"');
		if (ns4) {
			document.write(' border = "0"');
		}
		
		document.write('>');
		
	}
	
//CLAMSHELLMENU Script
//Hides and displays something with the block style
function toggleClamShellMenu(objectID, imgName) {
			if (isAll || isID) {
				
				domStyle = findDOM(objectID,1);
				tempImg = findDOMimage(imgName);
				
				if (domStyle.display =='block') {
					 domStyle.display='none';
					 tempImg.src="/images/" + imgName + "-up.gif";
				} else {
					domStyle.display='block';
					tempImg.src = "/images/" + imgName + "-down.gif";
				}
			}
			else {
				destination = objectID + '.asp';
				self.location = destination;
			}
			return;
}

function hideMenu(objectID, imgName) {
	if (isAll || isID) {
				
				domStyle = findDOM(objectID,1);
				tempImg = findDOMimage(imgName);
				
				if (domStyle.display =='block') {
					 domStyle.display='none';
					 tempImg.src="/images/" + imgName + "-up.gif";
				}
			}
			else {
				destination = objectID + '.asp';
				self.location = destination;
			}
			return;
}



//SHOWBLOCK Script
//Used in conjunction with clamshellmenu to stop all this silly double-click stuff
function showBlock(objectName, imgName)  {
	obj = findDOM(objectName, 1);
	obj.display = 'block';
	tempImg = findDOMimage(imgName);
	tempImg.src="/images/" + imgName + "-down.gif";
}

function menuMap() {
		var blockArray = new Array();
		
		blockArray[0] = "";
		blockArray[1] = "";
		
		for (var i = 0; i < blockArray.length; i++) {
				showBlock(blockArray[i]);
		}
}

//DROPDOWN URL CHANGER
	function chgURL() {
		var url = document.navForm.menu[document.navForm.menu.selectedIndex].value;
		document.location.href = url;
	}
// -->

	
// -->