// BROWSER DETECTION
// check for old browswers (3.x and lower)
var browserVer = parseInt ( navigator.appVersion );
if (browserVer < 4 ) {
	window.location = ("/errors/unsupported_browser.asp");
}

var agt=navigator.userAgent.toLowerCase();
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav4 = (is_nav && (browserVer == 4));
var is_ns5= (navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion>=5);


// CSS Platform Specific Javascript
var plat = navigator.platform;

document.write("<LINK REL='STYLESHEET' HREF='/css/style_all.css' TYPE='text/css'>\n");
/*if (plat.indexOf("Mac") != -1) {
	document.write("<LINK REL='STYLESHEET' HREF='/css/style_mac.css' TYPE='text/css'>\n");
	if (is_ns5) {
		document.write("<LINK REL='STYLESHEET' HREF='/css/style_mac5.css' TYPE='text/css'>\n");
	}
} else if (navigator.appName=="Netscape") {
	document.write("<LINK REL='STYLESHEET' HREF='/css/style_all.css' TYPE='text/css'>\n");
	if (is_nav4) {
		document.write("<LINK REL='STYLESHEET' HREF='/css/style_pc_ne4.css' TYPE='text/css'>\n");
	}
}*/

//POPUP CODE
function popup_win (url) {
	child = window.open(url,"popup","scrollbars=yes,resizable=yes,directories=no,status=1,location=0,favorites=0,toolbar=0,width=690,height=450");
	child.focus();
}

var path = "/images/";  // PATH TO IMAGES FOLDER FROM THIS PAGE
var path2 = "/images/tn/";
var path3 = "/images/tb/";
var path4 = "/images/ar/";
var path5 = "/images/btn/";
var imageSuffix = ".gif"; // SUFFIX FOR THE IMAGE TYPE
var statusMessage = "";
var ifHi = 1; // CHANGE TO 1 IF IMAGES HAVE ROLLOVERS
var list = new Array();
var currentImg= "";


// preload("imagename", "statusText", ifHi, path, imageSuffix);
preload("site_index","Site Index", ifHi, path2, imageSuffix);
preload("contact_us","Contact Us", ifHi, path2, imageSuffix);
preload("home","Home", ifHi, path3, imageSuffix);
preload("about","About", ifHi, path3, imageSuffix);
preload("markets","Markets", ifHi, path3, imageSuffix);
preload("products","Products & Services", ifHi, path3, imageSuffix);
preload("partners","Partners", ifHi, path3, imageSuffix);
preload("support","Support", ifHi, path3, imageSuffix);
preload("press","Press Room", ifHi, path3, imageSuffix);
preload("go_to_det","Go To Details", ifHi, path5, imageSuffix);
preload("arrow1","", ifHi, path4, imageSuffix);
preload("arrow2","", ifHi, path4, imageSuffix);
preload("arrow3","", ifHi, path4, imageSuffix);
preload("arrow4","", ifHi, path4, imageSuffix);
preload("arrow5","", ifHi, path4, imageSuffix);
preload("arrow6","", ifHi, path4, imageSuffix);



function preload(name, statusText, ifHi, path, imageSuffix) {
	if (document.images) {
		list[name] = new Object();
		list[name].message = statusText;
		list[name].off = new Image();
		list[name].off.src = path + name + ".off" + imageSuffix;
		if (ifHi == 1) {
			list[name].hi = new Image();
			list[name].hi.src = path + name + ".hi" + imageSuffix;
		}
	}
}


function switchHi(imgName,layer) {


 	if (document.layers && document.images && list[imgName].hi && (currentImg != imgName)  && layer!='null') {
		document.layers[layer].document.images[imgName].src = list[imgName].hi.src;
		} else if (document.images && list[imgName].hi && (currentImg != imgName)) {
		document.images[imgName].src = list[imgName].hi.src;
		}

 		window.status = list[imgName].message;
 	

	}

function switchOff(imgName,layer) {

		
		if (document.layers && document.images && (currentImg != imgName)  && layer!='null') {
			document.layers[layer].document.images[imgName].src = list[imgName].off.src;
		} else if (document.images && list[imgName].hi && (currentImg != imgName)) {

 		document.images[imgName].src = list[imgName].off.src;

        }
		window.status = "";

	}

