// layers code

var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
if ((browserName == "Netscape") && (browserVer == 4)) {
	version="n4";
} else if (browserName == "Netscape" && browserVer >= 5) {
	version="n5";
} else if ((browserName == "Microsoft Internet Explorer" && browserVer >= 4)) {
	version="ie4";
}

if (version == "n4") {
	layerStyleRef = "document.layers";
	layerRef = "document.layers";
	styleSwitch = "";
}

if (version == "n5") {
	layerStyleRef = "layer.";
	layerRef = "document.getElementById";
	styleSwitch = ".style";
}

if (version == "ie4") {
	layerStyleRef = "layer.style.";
	layerRef = "document.all";
	styleSwitch = ".style";
}

function showLayer(layerName) {
	if (version == "n5") {
		eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="visible"');
	} else if (version == "n4") {
		layerName = layerStyleRef.toString() +'[' + '\"' + layerName.toString() + '\"' + ']';
		eval(layerName + '.visibility = \'show\'');
	} else {
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
	}
}

function hideLayer(layerName) {
	//document.getElementById('layer1').style.visibility = 'hidden';
	if (version == "n5") {
		eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="hidden"');
	} else if (version == "n4"){
		layerName = layerStyleRef.toString() +'[' + '\"' + layerName.toString() + '\"' + ']';
		eval(layerName + '.visibility = \'hide\'');
	} else {
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
	}
}

// mouseover code

function newImage(imageName, imageLocation) {
	if (document.images) {
		imageName = new Image();
		imageName.src = imageLocation;
	}
}

var preloaded = 0;

function preloadImages() {
	if (document.images) {
		newImage("search", "/images/popup_search2.gif");
		newImage("guide", "/images/popup_guide.gif");
		newImage("services", "/images/popup_services.gif");
		preloaded = 1;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];}
	}
}

// action code

function resetAll(exceptFor) {
	if (exceptFor != 'search') {
		hideLayer('SearchDiv');
		changeImages('search', '/images/popup_search2.gif');
	}
	if (exceptFor != 'guide') {
		hideLayer('GuideDiv');
		changeImages('guide', '/images/popup_guide.gif');
	}
	if (exceptFor != 'services') {
		hideLayer('ServicesDiv');
		changeImages('services', '/images/popup_services.gif');
	}
}
// launcher code
function launchContact(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=460,height=480');
	else top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=460,height=480');top.NaviWin.focus();
}
function launchGame(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400');
	else top.NaviWin=window.open(url,'popup','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400');top.NaviWin.focus();
}
function launchGrabba(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=410,height=480');
	else top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=430,height=480');top.NaviWin.focus();
}
function launchGreatidea(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=480');
	else top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=480');top.NaviWin.focus();
}
function launchIndustry(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=yes,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=480');
	else top.NaviWin=window.open(url,'popup','toolbar=yes,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=480');top.NaviWin.focus();
}
function launchPrivacy(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=460,height=480');
	else top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=460,height=480');top.NaviWin.focus();
}
function launchRecipe(url) {
	if (top.browser=="explorer") top.NaviWin=window.open(url,'popup','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=480');
	else top.NaviWin=window.open(url,'popup','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=480');top.NaviWin.focus();
}
function openNaviSm(url) { 
	if(top.browser=="explorer") {
		top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=258');
	}
	else {
	top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=nno,resizable=no,copyhistory=no,width=320,height=258');top.NaviWin.focus();
	}
}
function openNaviMd(url) {
	if(top.browser=="explorer")	{
		top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=460,height=510');
	}
	else {
	top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=460,height=510');top.NaviWin.focus();
	}
}
function openNaviLGR(url) {
	if(top.browser=="explorer") {
		top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=605,height=400');
	}
	else {
	top.NaviWin=window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=605,height=400');
	top.NaviWin.focus();
	}
}