// JavaScript Document
<!--
//################################################################################################//
//NAV FUNCTIONS
//################################################################################################//
function xShowSubNav(id) {
	if (document.getElementById && !document.all) { //current standards
		var theObject = document.getElementById(id);
		theObject.style.visibility = 'visible';
	}else if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + id + ".style.visibility = 'visible'");
	}else if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[id].visibility = 'visible';
	}
}
function xHideSubNav(id) {
	if (document.getElementById && !document.all) { //current standards
		var theObject = document.getElementById(id);
		theObject.style.visibility = 'hidden';
	}else if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + id + ".style.visibility = 'hidden'");
	}else if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[id].visibility = 'hidden';
	}
}
//################################################################################################//
//NAV TIMER
//################################################################################################//
var secs;
var timerID = null;
var timerRunning = false;
var delay = 1000;
var theMenu; //the menu to hide
var showMenu; //the menu to show after hiding

function InitializeTimer(xMenu, xShowMenu) {
	theMenu = xMenu;
	showMenu = xShowMenu;
	secs = 1;
	StopTheClock();
	StartTheTimer();
}

function StopTheClock() {
	if(timerRunning) {
		clearTimeout(timerID);
		timerRunning = false;
	}
}

function StartTheTimer() {	
	if (secs==0) {
		StopTheClock();
		//NORMAL MENU HIDE
		if(theMenu == "both") {
			xHideSubNav('subNav_aboutUs'); //hide subnav
			xHideSubNav('subNav_lifestyleProperties'); //hide subnav
		}
		if (theMenu == "aboutUs") {
			xHideSubNav('subNav_aboutUs'); //hide subnav
		}
		if (theMenu == "lifestyleProperties") {
			xHideSubNav('subNav_lifestyleProperties'); //hide subnav
		}
		//SPECIAL MENU HIDE
		if (theMenu == "lifestyleProperties" && showMenu == "aboutUs") {
			xHideSubNav('subNav_lifestyleProperties'); //hide subnav
			xShowSubNav('subNav_aboutUs'); //hide subnav
		}
		if (theMenu == "aboutUs" && showMenu == "lifestyleProperties") {
			xHideSubNav('subNav_aboutUs'); //hide subnav
			xShowSubNav('subNav_lifestyleProperties'); //hide subnav
		}
	} else {
		self.status = secs;
		secs = secs - 1;
		timerRunning = true;
		timerID = self.setTimeout("StartTheTimer()", delay);
	}
}
//################################################################################################//
//-->