function init(){
  if (ns){
		// Pacific Northwest
		pacificNwDiv = document.container.document.pacificNw;
    	pacificNwRollDiv=document.container.document.pacificNw.document.pacificNwRoll;
		pacificNwOpenDiv=document.container.document.pacificNw.document.pacificNwOpen;
		pacificNwMenuDiv=document.container.document.pacificNwMenu;
		// Pacific Southwest
		pacificSwDiv = document.container.document.pacificSw;
		pacificSwRollDiv=document.container.document.pacificSw.document.pacificSwRoll;
		pacificSwOpenDiv=document.container.document.pacificSw.document.pacificSwOpen;
		pacificSwMenuDiv=document.container.document.pacificSwMenu;
		// Mexico
		mexicoDiv=document.container.document.mexico;
		mexicoRollDiv=document.container.document.mexico.document.mexicoRoll;
		mexicoOpenDiv=document.container.document.mexico.document.mexicoOpen;
		mexicoMenuDiv=document.container.document.mexicoMenu;
		// Panama
		panamaDiv=document.container.document.panama;
		panamaRollDiv=document.container.document.panama.document.panamaRoll;
		panamaOpenDiv=document.container.document.panama.document.panamaOpen;
		panamaMenuDiv=document.container.document.panamaMenu;
		// Chile
		chileDiv=document.container.document.chile;
		chileRollDiv=document.container.document.chile.document.chileRoll;
		chileOpenDiv=document.container.document.chile.document.chileOpen;
		chileMenuDiv=document.container.document.chileMenu;
		// Atlantic
		atlanticDiv=document.container.document.atlantic;
		atlanticRollDiv=document.container.document.atlantic.document.atlanticRoll;
		atlanticOpenDiv=document.container.document.atlantic.document.atlanticOpen;
		atlanticMenuDiv=document.container.document.atlanticMenu;
		// Gulf
		gulfDiv=document.container.document.gulf;
		gulfRollDiv=document.container.document.gulf.document.gulfRoll;
		gulfOpenDiv=document.container.document.gulf.document.gulfOpen;
		gulfMenuDiv=document.container.document.gulfMenu;
		// Vietnam
		vietnamDiv=document.container.document.vietnam;
		vietnamRollDiv=document.container.document.vietnam.document.vietnamRoll;
		vietnamOpenDiv=document.container.document.vietnam.document.vietnamOpen;
		vietnamMenuDiv=document.container.document.vietnamMenu;
  }
  if (ns6){
		// Pacific Northwest
		pacificNwDiv=document.getElementById("pacificNw").style;
    	pacificNwRollDiv=document.getElementById("pacificNwRoll").style;
	 	pacificNwOpenDiv=document.getElementById("pacificNwOpen").style;
		pacificNwMenuDiv=document.getElementById("pacificNwMenu").style;
		// Pacific Southwest
		pacificSwDiv=document.getElementById("pacificSw").style;
		pacificSwRollDiv=document.getElementById("pacificSwRoll").style;
		pacificSwOpenDiv=document.getElementById("pacificSwOpen").style;
		pacificSwMenuDiv=document.getElementById("pacificSwMenu").style;
		// Mexico
		mexicoDiv=document.getElementById("mexico").style;
		mexicoRollDiv=document.getElementById("mexicoRoll").style;
		mexicoOpenDiv=document.getElementById("mexicoOpen").style;
		mexicoMenuDiv=document.getElementById("mexicoMenu").style;
		// Panama
		panamaDiv=document.getElementById("panama").style;
		panamaRollDiv=document.getElementById("panamaRoll").style;
		panamaOpenDiv=document.getElementById("panamaOpen").style;
		panamaMenuDiv=document.getElementById("panamaMenu").style;
		// Chile
		chileDiv=document.getElementById("chile").style;
		chileRollDiv=document.getElementById("chileRoll").style;
		chileOpenDiv=document.getElementById("chileOpen").style;
		chileMenuDiv=document.getElementById("chileMenu").style;
		// Atlantic
		atlanticDiv=document.getElementById("atlantic").style;
		atlanticRollDiv=document.getElementById("atlanticRoll").style;
		atlanticOpenDiv=document.getElementById("atlanticOpen").style;
		atlanticMenuDiv=document.getElementById("atlanticMenu").style;
		// Gulf
		gulfDiv=document.getElementById("gulf").style;
		gulfRollDiv=document.getElementById("gulfRoll").style;
		gulfOpenDiv=document.getElementById("gulfOpen").style;
		gulfMenuDiv=document.getElementById("gulfMenu").style;
		// Vietnam
		vietnamDiv=document.getElementById("vietnam").style;
		vietnamRollDiv=document.getElementById("vietnamRoll").style;
		vietnamOpenDiv=document.getElementById("vietnamOpen").style;
		vietnamMenuDiv=document.getElementById("vietnamMenu").style;
  }
  if (ie){
		// Pacific Northwest
		pacificNwDiv=pacificNw.style; 
    	pacificNwRollDiv=pacificNwRoll.style;
		pacificNwOpenDiv=pacificNwOpen.style;
		pacificNwMenuDiv=pacificNwMenu.style;
		// Pacific Southwest
		pacificSwDiv=pacificSw.style; 
		pacificSwRollDiv=pacificSwRoll.style;
		pacificSwOpenDiv=pacificSwOpen.style;
		pacificSwMenuDiv=pacificSwMenu.style;
		// Mexico
		mexicoDiv=mexico.style; 
		mexicoRollDiv=mexicoRoll.style;
		mexicoOpenDiv=mexicoOpen.style;
		mexicoMenuDiv=mexicoMenu.style;
		// Panama
		panamaDiv=panama.style; 
		panamaRollDiv=panamaRoll.style;
		panamaOpenDiv=panamaOpen.style;
		panamaMenuDiv=panamaMenu.style;
		// Chile
		chileDiv=chile.style; 
		chileRollDiv=chileRoll.style;
		chileOpenDiv=chileOpen.style;
		chileMenuDiv=chileMenu.style;
		// Atlantic
		atlanticDiv=atlantic.style; 
		atlanticRollDiv=atlanticRoll.style;
		atlanticOpenDiv=atlanticOpen.style;
		atlanticMenuDiv=atlanticMenu.style;
		// Gulf
		gulfDiv=gulf.style; 
		gulfRollDiv=gulfRoll.style;
		gulfOpenDiv=gulfOpen.style;
		gulfMenuDiv=gulfMenu.style;
		// Vietnam
		vietnamDiv=vietnam.style; 
		vietnamRollDiv=vietnamRoll.style;
		vietnamOpenDiv=vietnamOpen.style;
		vietnamMenuDiv=vietnamMenu.style;
  }
	menuArray=['pacificNwMenu','pacificSwMenu','mexicoMenu','panamaMenu','chileMenu','atlanticMenu','gulfMenu','vietnamMenu']
	
	for(i=0;i<menuArray.length;i++){
		menu1 =menuArray[i];
		positionMenu(menu1);
	}
	
  loaded=1
}

function positionMenu(menu){
	bias = 56;
	if(ns){
		winHeight = window.innerHeight - bias;
		menuTop =document.container.document[menu].top;
		menuHeight = document.container.document[menu].document.height;
		menuPos = document.container.document[menu];
	}
	if(ns6){
		winHeight = window.innerHeight - bias;
		menuTop = document.getElementById(menu).offsetTop;
		menuHeight = document.getElementById(menu).offsetHeight;
		menuPos = document.getElementById(menu).style;
	}
	if(ie){
		winHeight = document.body.clientHeight - bias;
		menuTop = eval(menu).offsetTop;
		menuHeight = eval(menu).offsetHeight;
		menuPos = eval(menu).style;
	}
	
	menuTotal = menuHeight+menuTop
	difference = menuTop-(menuTotal-winHeight);
	
	if(menuHeight < winHeight-10){
		if(menuTotal > winHeight){
			if(difference+menuHeight-18 > menuTop){
				menuPos.top = difference;
			}else{
				menuPos.top = menuTop-menuHeight+18;
			}
		}
	}else{
		menuPos.top = 10;
	}
}

lastDiv = "";
lastSwap = "";

function swapDepths(div1){
	if(div1 != "hide"){
		eval(div1+"OpenDiv").visibility="visible";
		eval(div1+"MenuDiv").visibility="visible";
		eval(div1+"Div").zIndex = 30;
	}
	if(lastSwap != ""){
		eval(lastSwap+"OpenDiv").visibility="hidden";
		eval(lastSwap+"MenuDiv").visibility="hidden";
		eval(lastSwap+"Div").zIndex = 20;
	}
	if(div1 == lastSwap || div1 == "hide"){
		lastSwap = "";
	}else if (div1 != "hide"){
		lastSwap = div1;
	}
}

function showDiv(div,state,status){
  if (loaded){
		if (state == 1){	
			eval(div).visibility="visible";
		}else{
			eval(div).visibility="hidden";
		}
		window.status = status
  }
}

lastDiv = "";

function hideDiv(){
	if(lastDiv != ""){
		lastDiv.visibility="hidden";
	}
}