// JavaScript Document
var timerID = null; 
var timerOn = false; 
var timecount = 400; // Change this to the time delay that you desire 
var timerIDSub = null; 
var timerOnSub = false; 
var timecountSub = 400; // Change this to the time delay that you desire 

function btn(obj){
	var target = obj.getElementsByTagName('a')[0];
	alert(target);
	window.location = target;
}

function over(layerName){
	hideAll();
	showLayer(layerName);
	stopTime();
}

function out(){
	startTime();
}

function subOver(layerName){
	hideAllSub(); 
	showLayer(layerName); 
	stopTimeSub();
}

function subOut(){
	startTimeSub();
}

function showLayer(layerName) {  

	document.getElementById(layerName).style.visibility="visible";  
}

function hideLayer(layerName) {  

	document.getElementById(layerName).style.visibility="hidden";  
}
function hideAll() {  
	hideLayer('lodg');
	hideLayer('zio');
	hideLayer('golf');
	hideLayer('act');
	hideLayer('ent');
	hideLayer('area-maps');
	hideLayer('gal');
	hideLayer('meet');
	hideLayer('town');
	hideLayer('vis');
//Put all layers used in the nav here.  
} 
function hideAllSub() {  
	hideLayer('lodg-stg');
	hideLayer('lodg-spring');
	hideLayer('lodg-hur');
	hideLayer('lodg-cen');
	hideLayer('lodg-ent');
	hideLayer('lodg-lee');
	hideLayer('lodg-pin');
	hideLayer('lodg-wash');
	hideLayer('lodg-vey');
	hideLayer('act-out');
	hideLayer('act-sport');
	hideLayer('act-tour');
	hideLayer('town-city');
//Put all layers used in the nav here.  
} 
function startTime() {  
	if (timerOn == false) {  
	timerID=setTimeout( "hideAll()" , timecount);  
	timerOn = true;  
	}  
}
function stopTime() {  
	if (timerOn) {  
	clearTimeout(timerID);  
	timerID = null;  
	timerOn = false;  
	}
}
function startTimeSub() {  
	if (timerOnSub == false) {  
	timerIDSub=setTimeout( "hideAllSub()" , timecountSub);  
	timerOnSub = true;  
	}  
}

function stopTimeSub() {  
	if (timerOnSub) {  
	clearTimeout(timerIDSub);  
	timerIDSub = null;  
	timerOnSub = false;  
	}
}  

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function BM_openOpener(theURL){
	self.opener.location = theURL;
}