<!--
// Browser Detection 
function BrowserCheck() {
	var b = navigator.appName;	
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.version = navigator.appVersion;
	//if (this.version.indexOf('Win')>0) this.os = "PC";
	//else if (this.version.indexOf('Mac')>0) this.os = "Mac";	
	this.WinOs = (this.version.indexOf('Win')>0);
	this.v = parseInt(this.version);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v==5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (this.version.indexOf('MSIE 4')>0);
	this.ie5 = (this.version.indexOf('MSIE 5')>0);
	this.ie6 = (this.version.indexOf('MSIE 6')>0);
	this.min = (this.ns||this.ie);
}
var browser = new BrowserCheck();

var loaded = (!(navigator.userAgent.indexOf('Netscape6')+1));

//IMAGE ROLLOVERS
function imgOn(imgName) { 
	if (document.images && loaded){
		document[imgName].src = eval(imgName + "_on.src");
	} 
}
function imgOnOver(imgName) { 
	if (document.images && loaded){
		document[imgName].src = eval(imgName + "_onover.src");
	} 
}
function imgOff(imgName) { 
	if (document.images && loaded){
		document[imgName].src = eval(imgName + "_off.src"); 
	}
}
function imgOver(imgName) { 
	if (document.images && loaded){
		document[imgName].src = eval(imgName + "_over.src"); 
	}
}

//IMAGE CACHING

var oImgPath = new Object();
oImgPath.topnav = "images/";

function cacheImg(name,src,rollover,type){
	if (!type) var type = "gif";
	if (rollover==true){
		eval(name + "_off =  new Image");
		eval(name + "_off.src = \'" + src + name + "_off." + type + "\'");
		eval(name + "_on =  new Image");
		eval(name + "_on.src = \'" + src + name + "_on." + type + "\'");
		eval(name + "_onover =  new Image");
		eval(name + "_onover.src = \'" + src + name + "_onover." + type + "\'");
		eval(name + "_over =  new Image");
		eval(name + "_over.src = \'" + src + name + "_over." + type + "\'");
	} else {
		eval(name + " = new Image");
		eval(name + ".src = \'"+src+name+"."+type+"\'");
	}
}



//-----Top Nav
cacheImg('btn_vcb',oImgPath['topnav'],true);
cacheImg('btn_ourstory',oImgPath['topnav'],true);
cacheImg('btn_ind_focus',oImgPath['topnav'],true);
cacheImg('btn_products',oImgPath['topnav'],true);
cacheImg('btn_services',oImgPath['topnav'],true);
cacheImg('btn_support',oImgPath['topnav'],true);
cacheImg('btn_contactus',oImgPath['topnav'],true);

//-----Pop-Up Window Function
function popWindow(url, width, height, name, scrollbars){
	if (!scrollbars) scrollbars = false;
	if (!width) width = 500;
	if (!height) height = 500;
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (scrollbars) {
		var options = "directories=no,status=no,location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	if (!name) name = "default_window";
	
	popup = window.open(url,name,options);
	popup.focus();	
}

function imagepopWindow(url, width, height, name, scrollbars){
	if (!scrollbars) scrollbars = false;
	if (!width) width = 500;
	if (!height) height = 500;
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (scrollbars) {
		var options = "directories=no,status=no,location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	pagename = "large_image";
	
	mainUrl = "/page_includes/image_pop_window.jsp?image=" + url + "&width=" + width + "&height=" + height + "&title=" + name;
	
	popup = window.open(mainUrl,pagename,options);
	popup.focus();
}

//-----Page forwarding for the left nav dropdown
function goProduct(ctl){
	if (ctl != "null"){
		document.location=ctl;
	}
}
// -->
