
var sections ;
var literalSections ;
var theSection ;
var section ;
var literalSection ;

if (top.location != self.location) {
	top.location.replace(self.location)
}
		 
function initPage(argLiteralSections,argSections) {
	literalSections = argLiteralSections ;
	sections = argSections ;
	section = sections.split(" ") ;
	literalSection = literalSections.split(" ") ;
	var currentPage = window.location.href ;
	for (i in literalSection) {
		var theTempSection = literalSection[i] ;
		if (currentPage.indexOf(theTempSection) != -1) {
			theSection = literalSection[i] ;
		}
	}
	resetMenuLayers() ;
}
function menuSelect(btn) {
	//Reset all button images and layers
	resetMenuLayers() ;
	
	//set layer visibility
	var theLayer = btn + "menu" ; // the section drop-down menu
	if (window.document.layers) //Netcsape DOM
		window.document.layers[theLayer].visibility='show' ;
	else if (window.document.getElementById) //NN 6 & IE 5 DOM
		window.document.getElementById(theLayer).style.visibility='visible' ;
	else if (window.document.all) //IE 4 DOM
		window.document.all[theLayer].style.visibility='visible' ;
}
function resetMenuLayers() {
	//Reset each Layer
	for (i in section) {
		var theLayer = section[i] + "menu" ;
		if (window.document.layers) //Netcsape DOM
			window.document.layers[theLayer].visibility='hide' ;
		else if (window.document.getElementById) //NN 6 & IE 5 DOM
			window.document.getElementById(theLayer).style.visibility='hidden' ;		
		else if (window.document.all) //IE 4 DOM
			window.document.all[theLayer].style.visibility='hidden' ;
	}	
}
function imgSwap(imgDomPath) {
	var imgHREF = imgDomPath.src ;
	var oldImgFlag = imgHREF.substring(imgHREF.length - 7,imgHREF.length - 4) ;
	var newImageFlag ;
	if (oldImgFlag == "_mo")
		newImgFlag = "_00" ;
	else
		newImgFlag = "_mo" ;
	var newImg = imgHREF.replace(oldImgFlag, newImgFlag) ;
	imgDomPath.src = newImg ;				
}
function gotoSelectedSite() {
	if (window.document.formGoToSite.gotoSite.options[window.document.formGoToSite.gotoSite.selectedIndex].value != "#") {
		newWin = window.open(window.document.formGoToSite.gotoSite.options[window.document.formGoToSite.gotoSite.selectedIndex].value) ;
	}
}

function gotoSelectedGISSite() {
	if (window.document.formGoToGISSite.gotoGISSite.options[window.document.formGoToGISSite.gotoGISSite.selectedIndex].value != "#") {
		newWin = window.open(window.document.formGoToGISSite.gotoGISSite.options[window.document.formGoToGISSite.gotoGISSite.selectedIndex].value) ;
	}
}

function openMap(url) {
	var w = 800 ;
	var h = 600 ;
	if (window.screen) {
		w = screen.width * 0.9 ;
		h = screen.height * 0.8 ;
	}
	if (w > 1024) w = 1024 ;
	if (h > 768) h = 768 ;
	var temp = "left=0,top=0,directories=0,fullscreen=0,screenx=0,screeny=0,toolbar=0,location=0,resizable=1,status=1,scrollbars=1,height=" + h + ",width=" + w ;
	var win = window.open("","imfMap",temp) ;
	win.focus() ;
	win.location.href = url ;
}

function openMapUpdate(url) {
	var w = 800;
	var h = 600;
	if (window.screen) {
		w = screen.width * 0.9;
		h = screen.height * 0.8;
	}
	if (w > 1024) w = 1024;
	if (h > 768) h = 768;
	var temp = "left=0,top=0,directories=0,fullscreen=0,screenx=32,screeny=32,toolbar=0,location=0,resizable=1,status=1,scrollbars=1,height=" + h + ",width=" + w;
	var win = window.open("","mapUpdate",temp);
	win.focus();
	win.location.href = url ;
}
