
//window.onerror=null; // I don't know what this does!

// Browser detection
var N = navigator.appName;
var V = parseInt(navigator.appVersion);
var loaded=0;
var n3 = ((N == "Netscape") && (V < 4));
var i3 = ((N == "Microsoft Internet Explorer") && (V < 4));
var n4 = ((N == "Netscape") && (V >= 4));
var i4 = ((N == "Microsoft Internet Explorer") && (V >= 4));
// diagnostic - what is being passed in?
// alert("N = " + N + "\nV = " + V + "\nn3 = " + n3 + "\ni3 = " + i3 + "\nn4 = " + n4 + "\ni4 = " + i4);


// Set up style references per browser
if (n4 || i4) {
	if(N == "Netscape") {

		layerStyleRef = "layer.";
		layerRef="document.layers";
		styleSwitch="";
	}
	else {
		layerStyleRef = "";
		layerRef = "document.all";
		styleSwitch=".style";
	}
}

//IE HOME PAGE FUNCTIONS
function ShowProductInformationSubs(){
		hideLayers("divProductInformation", "divCustomerService", "divCompanyProfile"); 
		document.images.customer_service.src='images/homepage/customer_service.gif';
		document.images.company_profile.src='images/homepage/company_profile.gif';
		showLayer("divProductInformation"); 
}

function ShowCustomerServiceSubs(){
		hideLayers("divProductInformation", "divCustomerService", "divCompanyProfile"); 
		document.images.product_information.src='images/homepage/Product_Information.gif';
		document.images.company_profile.src='images/homepage/company_profile.gif';
		showLayer("divCustomerService"); 
}

function ShowCompanyProfileSubs(){
		hideLayers("divProductInformation", "divCustomerService", "divCompanyProfile"); 
		document.images.product_information.src='images/homepage/Product_Information.gif';
		document.images.customer_service.src='images/homepage/customer_service.gif';
		showLayer("divCompanyProfile"); 
}

function hideLayers(){// alert("In layersOff");

	if (n4 || i4) {
	
		for(i=0; i< hideLayers.arguments.length; i++){
		
				hideLayer(hideLayers.arguments[i]);
		}
	}
}
//END IE HOME PAGE FUNCTIONS

//NETSCAPE HOME PAGE FUNCTIONS
function N_ShowProductInformationSubs(){
		document.images.product_information.src='images/homepage/Product_Information_on.gif';
		document.images.customer_service.src='images/homepage/customer_service.gif';
		document.images.company_profile.src='images/homepage/company_profile.gif';
		document.layers[0].visibility="hide";
		document.layers[1].visibility="hide";
		document.layers[2].visibility="show";
}

function N_ShowCustomerServiceSubs(){
		document.images.customer_service.src='images/homepage/customer_service_on.gif';
		document.images.product_information.src='images/homepage/Product_Information.gif';
		document.images.company_profile.src='images/homepage/company_profile.gif';
		document.layers[0].visibility="hide";
		document.layers[1].visibility="show";
		document.layers[2].visibility="hide";
}

function N_ShowCompanyProfileSubs(){
		document.images.company_profile.src='images/homepage/company_profile_on.gif';
		document.images.product_information.src='images/homepage/Product_Information.gif';
		document.images.customer_service.src='images/homepage/customer_service.gif';
		document.layers[0].visibility="show";
		document.layers[1].visibility="hide";
		document.layers[2].visibility="hide";
}

function N_HideSubs(){
		document.images.customer_service.src='images/homepage/customer_service.gif';
		document.images.company_profile.src='images/homepage/company_profile.gif';
		document.images.product_information.src='images/homepage/Product_Information.gif';
		document.layers[0].visibility="hide";
		document.layers[1].visibility="hide";
		document.layers[2].visibility="hide";
}
//END NETSCAPE HOME PAGE FUNCTIONS


//MULTI-USE FUNCTIONS
function layersOff(){// alert("In layersOff");

	if (n4 || i4) {
	
		for(i=0; i< layersOff.arguments.length; i++){
		
				hideLayer(layersOff.arguments[i]);
		}
	}
}

function showLayer(layerName) {//alert("in show layer.  layername=" + layerName);

	if(n4 || i4) {
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
	}
}

function hideLayer(layerName) {
	if(n4 || i4) {
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
	}
}

//END MULTI-USE FUNCTIONS


