// JavaScript Documentvar w3c = document.getElementById ? true : false;
var iex = document.all ? true : false;
var ns4 = document.layers ? true : false;

function fixNetscape(){
	if(origWidth != window.innerWidth || origHeight != window.innerHeight){
		window.location.reload();
	}	
}
if(ns4){
	origWidth = window.innerWidth;
	origHeight = window.innerHeight;
	window.onresize = fixNetscape;
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_about = newImage('assets/images/aboutus_over.gif');
		nav_products = newImage('assets/images/products_over.gif');
		nav_faqs = newImage('assets/images/faqs_over.gif');
		nav_registration = newImage('assets/images/storelocator_over.gif');
		nav_contact = newImage('assets/images/contactus_over.gif');
		nav_home = newImage('assets/images/home_over.gif');
		preloadFlag = true;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function popWindow(thisUrl,thisWidth,thisHeight,thisTop,thisLeft,thisName) {
optionString = ('width=' + thisWidth + ',height=' + thisHeight + ',top=' + thisTop + ',left=' + thisLeft + ',status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');

mainWin = window.open(thisUrl,'infowin',optionString);
} 

function checkform ( form )
{
   // ** REQUIRED START **
    if (form.EMAIL.value == "" || form.EMAIL.value == "Email Address") {
        alert( "Please enter your Email." );
        form.EMAIL.focus();
        return false ;
    }  
    if (form.FirstName.value == "" || form.FirstName.value == "First Name") {
        alert( "Please enter your First Name." );
        form.FirstName.focus();
        return false ;
    }  
    if (form.ZipCode.value == "" || form.ZipCode.value == "Zip Code") {
        alert( "Please enter your Zip Code." );
        form.ZipCode.focus();
        return false ;
    }  
    // ** REQUIRED END **
 return true ;
}
