compat = false;
if( parseInt( navigator.appVersion ) >= 3 ) { compat = true; }

nav1_home_normal = new Image();
nav1_home_normal.src = "images/nav1_home_normal.gif";
nav1_home_over = new Image();
nav1_home_over.src = "images/nav1_home_over.gif";

nav1_reachus_normal = new Image();
nav1_reachus_normal.src = "images/nav1_reachus_normal.gif";
nav1_reachus_over = new Image();
nav1_reachus_over.src = "images/nav1_reachus_over.gif";

nav1_sitemap_normal = new Image();
nav1_sitemap_normal.src = "images/nav1_sitemap_normal.gif";
nav1_sitemap_over = new Image();
nav1_sitemap_over.src = "images/nav1_sitemap_over.gif";

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ns6 = document.getElementById && !document.all
ver4 = (NS4 || IE4) ? 1 : 0;
var flag=0;
var gotlayers=0;
function moveLayers() {
	if (gotlayers==1) {
		if (NS4) {
			screenWidth = window.innerWidth;
			document.layers['nav21l'].left = 186;
			document.layers['nav21l'].top = 99;
			
			document.layers['nav22l'].left = 301;
			document.layers['nav22l'].top = 99;

			document.layers['nav23l'].left = 422;
			document.layers['nav23l'].top = 99;

			document.layers['nav24l'].left = 541;
			document.layers['nav24l'].top = 99;

			document.layers['nav25l'].left = 609;
			document.layers['nav25l'].top = 99;
			
		} else if(IE4){
			screenWidth = document.body.clientWidth + 18;
			document.all['nav21l'].style.pixelLeft = 186;
			document.all['nav21l'].style.pixelTop = 99;
			
			document.all['nav22l'].style.pixelLeft = 301;
			document.all['nav22l'].style.pixelTop = 99;

			document.all['nav23l'].style.pixelLeft = 422;
			document.all['nav23l'].style.pixelTop = 99;

			document.all['nav24l'].style.pixelLeft = 541;
			document.all['nav24l'].style.pixelTop = 99;

			document.all['nav25l'].style.pixelLeft = 609;
			document.all['nav25l'].style.pixelTop = 99;
						
		}else{
			var other = document.getElementById('nav21l');
			other.style.left= 186;
			other.style.top = 99;
			
			var other = document.getElementById('nav22l');
			other.style.left= 301;
			other.style.top = 99;

			var other = document.getElementById('nav23l');
			other.style.left= 422;
			other.style.top = 99;

			var other = document.getElementById('nav24l');
			other.style.left= 541;
			other.style.top = 99;		

			var other = document.getElementById('nav25l');
			other.style.left= 609;
			other.style.top = 99;		

		}
	}
}

function popUp(menuName,on) {
	if (gotlayers==1) {
		if (on) {
			moveLayers();
			if (NS4) {
				document.layers[menuName].visibility = "show";
			} else if(IE4){
				document.all[menuName].style.visibility = "visible";
			}else{
				document.getElementById(menuName).style.visibility = "visible";
			}
		} else {
			if (NS4) {
				document.layers[menuName].visibility = "hide";
			} else if(IE4)  {
				document.all[menuName].style.visibility = "hidden";
			}else{
				document.getElementById(menuName).style.visibility = "hidden";
			}
		}
	}
}

function hideall()
{
	if (flag==0)
	{
		popUp('nav21l',false);
		popUp('nav22l',false);
		popUp('nav23l',false);
		popUp('nav24l',false);
		popUp('nav25l',false);
	}
}

function cleanup()
{
	if (NS4)
		setInterval("hideall()",4000);
	else
		setInterval("hideall()",1000);
}

function mouseon()
{
	flag=1;
}
function mouseout()
{
	flag=0;
}


function Swapon(x,y)
{	
	
	if( compat ) 
	{ 
	document.images[x].src = eval(y+".src"); 
	}
}
function Swapout(x,y)
{	
	
	if( compat ) 
	{ 
	document.images[x].src = eval(y+".src"); 
	}
}

function starttour(linkfullname)
{
	if (screen.width==1024)
	{
		open(linkfullname,menubar='no', 'left=212, top=130,width=594, height=600', resizable='yes');	
	}
	else
	{
		open(linkfullname,menubar='no', 'left=100, top=20,width=594, height=600', resizable='yes');
	}

}

function quicklinksgo(frm)
{
	if (frm.to.options[frm.to.selectedIndex].value=='n' || frm.to.options[frm.to.selectedIndex].value=='starttour')
	{
		if (frm.to.options[frm.to.selectedIndex].value=='starttour')
			starttour();

		return false;
	}
	else
	{
		return true;
	}
}
function CheckForm () {

	//Check for a word to search
	if (document.frmSiteSearch.search.value==""){
		alert("Please enter at least one keyword to search");
		document.frmSiteSearch.search.focus();
		return false;
	}
	
	return true
}
function CheckForml () {

	//Check for a word to search
	if (document.frmSiteSearchl.search.value==""){
		alert("Please enter at least one keyword to search");
		document.frmSiteSearchl.search.focus();
		return false;
	}
	
	return true
}