<!-- ########################## Show / Hide Layers ########################## -->
window.onerror = null;
var menuActive = 0;
var menuOn = 0;
var onLayer;
var timeOn = null;
ns=navigator.appName==("Netscape");
ns4=(ns &&(navigator.appVersion.indexOf("4.")!=-1));

function showLayer(layerName){		
	if (timeOn != null) {
		clearTimeout(timeOn);
		hideLayer(onLayer);
	}
	if (layerName !='hideAll') {
		MM_showHideLayers(layerName,'','show');
		onLayer = layerName;
	}
 }
function hideLayer(layerName){
	if (menuActive == 0) {
		MM_showHideLayers(layerName,'','hide');
		titleOff();
	}
}
function btnTimer() {
	timeOn = setTimeout("btnOut()",4000);
}
function btnOut(layerName) {
	if (menuActive == 0) {
		hideLayer(onLayer);
	}
}
function menuOver() {
	clearTimeout(timeOn);
	menuActive = 1;
}
function menuOut() {
	menuActive = 0;
	timeOn = setTimeout("hideLayer(onLayer)", 400);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  	if ((obj=MM_findObj(args[i]))!=null) { 
		v=args[i+2];
    	if (obj.style) { 
			gerObj = obj;
			obj=obj.style; 
			v=(v=='show')?'visible':(v='hide')?'hidden':v; 
		}
    	obj.visibility=v; 
		<!-- gos 11/4/02 - REMOVE WHEN WE NO LONGER SUPPORT NN4.x --> 
		<!-- fixes alignment div problem in drop down menus -->
		if (ns4){
			obj.top=28;
			if (args[0] == 'company'){
				obj.left=168;
			} else if (args[0] == 'catalogue'){
				obj.left=240;
			} else if (args[0] == 'support'){
				obj.left=320;
			} else if (args[0] == 'performance'){
				obj.left=390;
			}
		}
	}
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(appVersion<4.75)&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


<!-- ########################## COLOR FADER ########################## -->

var startColor = '649C93';
var endColor = '2C5C55';
var titleEndColor = '3E8479';
var thisColor = startColor;
var maxCount = 20;
var cycleTime = 40;
var thisObject = null;
var counter = 1;
var hexChars = "0123456789ABCDEF";
var timeoutID =null;
var red, grn, blu, red_int, grn_int, blu_int;
titleOver = null;

// calculate the amount of decimal reduction on each color group r g b as a decimal
calcHexEroder(startColor, endColor, maxCount);

// sets current color from hex startColor to decimal startColor e.g. FFFFFF => 255,255,255
var thisRed = red;
var thisGrn = grn;
var thisBlu = blu;
//alert(red + " " + grn + " " + blu + " eroders = " + red_int+ ", " + grn_int+ ", " + blu_int);

// this function just resets variables and clears thisObject
function resetVars() {
	counter = 1;
	thisColor = startColor;
	thisRed = red;
	thisGrn = grn;
	thisBlu = blu;
	thisObject = null;
	timeoutID = null;
	//document.form1.textfield2.value = thisObject;
}
function changeCSS(st) {
	if (st == 't') {
		startColor = '6D8596';
		endColor = '2C5C55';
		titleEndColor = '45627D';
	} else {
		startColor = '649C93';
		endColor = '2C5C55';
		titleEndColor = '3E8479';
	}
}
// mouse action calls this function - redirects depending on type of mouse call
function initState(me, mouseState) {
	//make sure there is no other object waiting to be colorised
	if (timeoutID != null) {
		clearTimeout(timeoutID);
		resetVars();
	}

	thisObject = me;
	if (mouseState == 'over') {  //mouseOver
		changeColor();
		menuOver(); //this call makes sure we dont timeout our current dropdown
	}else {  //mouseOut
		thisObject.bgColor = startColor;
		resetVars();
		menuOut();
		return;
	}
}
// this function is called by title menu drop down it hilights the table bckgrnd
function initStateTitle(me, state) {
	if (titleOver != null) titleOff();
	titleOver = me;
	titleOver.bgColor = titleEndColor;
}
function titleOff(){
	if (titleOver == null) return;
	titleOver.bgColor = startColor;
	titleOver = null;
}
function changeColor() {
	//make sure our object wasn't deleted by a mouseOut during setTimeout
	timeoutID = null;
	if (counter == maxCount) {
		thisObject.bgColor = endColor;
		resetVars();
		return;
	}
	thisColor = fade();
	thisObject.bgColor = thisColor;
	counter++;
	timeoutID = setTimeout("changeColor()", cycleTime);
}
function calcHexEroder (begin, end, steps) {   
	redA     = begin.charAt(0) + begin.charAt(1);
	red_valA = parseInt(redA,'16');
	redB     = end.charAt(0) + end.charAt(1);
	red_valB = parseInt(redB,'16');
	red_int  = ((red_valB - red_valA) / steps) * -1;
	grnA     = begin.charAt(2) + begin.charAt(3);
	grn_valA = parseInt(grnA,'16');
	grnB     = end.charAt(2) + end.charAt(3);
	grn_valB = parseInt(grnB,'16');
	grn_int  = ((grn_valB - grn_valA) / steps) * -1;
	bluA     = begin.charAt(4) + begin.charAt(5);
	blu_valA = parseInt(bluA,'16');
	bluB     = end.charAt(4) + end.charAt(5);
	blu_valB = parseInt(bluB,'16');
	blu_int  = ((blu_valB - blu_valA) / steps) * -1;
	
	red = red_valA;
	grn = grn_valA;
	blu = blu_valA;
}
function fade(){
	thisRed -= red_int;
	red_round = Math.round(thisRed);
	red_hex = Dec2Hex(thisRed);
	thisGrn -= grn_int;
	grn_round = Math.round(thisGrn);
	grn_hex = Dec2Hex(thisGrn);
	thisBlu -= blu_int;
	blu_round = Math.round(thisBlu);
	blu_hex = Dec2Hex(thisBlu);
	
	thisNewColor = red_hex + grn_hex + blu_hex;
	return thisNewColor;
}
function Dec2Hex (Dec)
 {
  var a = Dec % 16;
  var b = (Dec - a)/16;
  hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
  return hex;
}
//loadStyleSheets(4,2)
function loadStyleSheets(cssNumber,cssToLoad){
	if(document.styleSheets){
		for(var i=0;i<cssNumber;i++){
		    if(i!=cssToLoad){
				document.styleSheets[i].disabled = true;
			}
		    else{
				document.styleSheets[i].disabled = false;
			}
		}
	}
}
<!-- ########################## MISC ########################## -->

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showHidden(oid, st) {
  if(st == null)st = 'visible';
  var thisHiddenObj = document.getElementById(oid);
  thisHiddenObj.style.visibility = st;
}

function checkForm(highlight){	

	if (highlight == 'password'){
			var thisTDObj = document.getElementById('password');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	} else if (highlight == 'confirmpassword'){
			var thisTDObj = document.getElementById('confirmpassword');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box'); 
	} else if (highlight == 'firstname'){
			var thisTDObj = document.getElementById('firstname');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	} else if (highlight == 'middlename'){
			var thisTDObj = document.getElementById('middlename');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	} else if (highlight == 'lastname'){
			var thisTDObj = document.getElementById('lastname');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	} else if (highlight == 'phone'){
			var thisTDObj = document.getElementById('phone');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	} else if (highlight == 'email'){
			var thisTDObj = document.getElementById('email');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	} else if (highlight == 'title'){
			var thisTDObj = document.getElementById('title');
			thisTDObj.style.backgroundColor = '#FF9900';
			showHidden('error_box');
	}
}

var msXmlValidProgId = "";

// Check to see if there is in-built browser support for HTTP requests
function CheckHTTPAvailable()
{
	if (window.XMLHttpRequest) {
		return(true);
	}
	else if (window.ActiveXObject){
		var httpRequest = GetHttpRequestObject();
		
		if (httpRequest){
			httpRequest = null;
			
			return(true);
		}
	}			
	
	return(false);
}

// Create the HTTP request object and return it
function GetHttpRequestObject()
{
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
    }
	else if ((msXmlValidProgId == "") && (window.ActiveXObject)){
		// List of possible prog ids
		var msXmlProgIdCollection = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "MICROSOFT.XMLHTTP.1.0", "MICROSOFT.XMLHTTP.1", "MICROSOFT.XMLHTTP"];
	
		// Iterate xml prog ids in search for the correct one to use
		for (var i=0; i < msXmlProgIdCollection.length; i++) {
			// Try the iterated engine
			try {
				// Create the object. An error is automatically thrown if it doesn't exist or in any other way isn't allowed to be created
				obj = new ActiveXObject(msXmlProgIdCollection[i]);
				
				// Still here? Well, then it seems like the activex object was created successfully. Store the current engine and exit the loop.
				msXmlValidProgId = msXmlProgIdCollection[i];
	  
				obj = null;
				
				break;
			} catch (ex) {
				// Doh! The currently tested engine didn't work. We might still be in the loop though so no despair yet...
			}
		}
	}
	
	if (window.ActiveXObject && !window.XMLHttpRequest && (msXmlValidProgId != "")) {
		var httpRequest = null;
		
		httpRequest = new ActiveXObject(msXmlValidProgId);
		
		return(httpRequest);
	}
	else if (!window.ActiveXObject && window.XMLHttpRequest) {
		return new XMLHttpRequest();
    }
    else{
		return null;
	}
}