﻿//Start Header Buttons
if(document.images){ 
	image1off=new Image();
	image1off.src="global/images/header/home.gif";
	image2off=new Image();
	image2off.src="global/images/header/equip.gif";
	image3off=new Image();
	image3off.src="global/images/header/catches.gif";
	image4off=new Image();
	image4off.src="global/images/header/pricing.gif";
	image5off=new Image();
	image5off.src="global/images/header/contact.gif";

	image1on=new Image();
	image1on.src="global/images/header/home_mo.gif";
	image2on=new Image();
	image2on.src="global/images/header/equip_mo.gif";
	image3on=new Image();
	image3on.src="global/images/header/catches_mo.gif";
	image4on=new Image();
	image4on.src="global/images/header/pricing_mo.gif";
	image5on=new Image();
	image5on.src="global/images/header/contact_mo.gif";
}

function changeImages(){ 
	if(document.images){ 
		for(var i=0;i<changeImages.arguments.length;i+=2){ 
			document[changeImages.arguments[i]].src=eval(changeImages.arguments[i+1]+".src");
		}
	}
}
//End Header Buttons


function TabNext(obj,event,len,next_field) {
var field_length=0;
	if (event == "down") {
		field_length=obj.value.length;
		}
	else if (event == "up") {
		if (obj.value.length != field_length) {
			field_length=obj.value.length;
			if (field_length == len) {
				next_field.focus();
				}
			}
		}
	}


function openWindow(url,name,width,height,attributes){  	   
	var winLeft=(screen.width-width)/2;
	var winTop=(screen.height-height)/2;
	var winAttributes='height='+height+',width='+width+',top='+winTop+',left='+winLeft+','+attributes+',';
	var newWin=window.open(url,name,winAttributes);  
	if(parseInt(navigator.appVersion)>= 4){
		newWin.window.focus();
	}
}

function parentURLFocus(url){								
	javascript:opener.location.href=url;
	javascript:opener.focus();
}

function infoWindow(url){
	openWindow(url,'info','765','400','scrollbars, resizable, menubar, location, toolbar');
}


function featureWindow(url){
	openWindow(url,'features','600','400');
}


// Netscape fix resize bug Ns4
function WM_netscapeCssFix(){
	if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth ||
	document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight){
		document.location = document.location;
	}
}

function WM_netscapeCssFixCheckIn(){
	if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)){
		if (typeof document.WM == 'undefined'){
			document.WM = new Object;
		}
		if (typeof document.WM.WM_scaleFont == 'undefined'){
			document.WM.WM_netscapeCssFix = new Object;
			document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
			document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
		}
		window.onresize = WM_netscapeCssFix;
	}
}

WM_netscapeCssFixCheckIn();

// catch all errors...
function stopError(){
	return true;
}

window.onerror=stopError;