 // <![CDATA[
// usage onrollover=rollover(this) onrollout=rollove(this)
function rollover( e )
{
	var img_src = e.childNodes[0].src ;
	
	
	var img_split = img_src.split("_off") ;

	if ( img_split.length == 1 )
	{
		img_split = img_src.split("_on") ;
		e.childNodes[0].src = img_split[0] + '_off' + img_split[1] ;
	}
	else
	{
		e.childNodes[0].src = img_split[0] + '_on' + img_split[1] ;
	}
	
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=442,height=500,left = 439,top = 134');");
}



if (document.images){
	pic1= new Image(176,23); 
	pic1.src="images/btn_applications_on.gif"; 
	pic2= new Image(192,23); 
	pic2.src="images/btn_contact_on.gif"; 
	pic3= new Image(176,23); 
	pic3.src="images/btn_home_on.gif"; 
	pic4= new Image(176,23); 
	pic4.src="images/btn_order_on.gif"; 
	pic5= new Image(176,23); 
	pic5.src="images/btn_sitemap_on.gif"; 
	pic6= new Image(176,23); 
	pic6.src="images/btn_specs_on.gif"; 
}


////////////////////
// start phone verify...
function CheckPhoneNumber(TheNumber) {
var valid = 1
var GoodChars = "0123456789()-+ "
var i = 0
if (TheNumber=="") {
// Return false if number is empty
valid = 0
}
for (i =0; i <= TheNumber.length -1; i++) {
if (GoodChars.indexOf(TheNumber.charAt(i)) == -1) {
// Note: Remove the comments from the following line to see this
// for loop in action.
// alert(TheNumber.charAt(i) + " is no good.")
valid = 0
} // End if statement
} // End for loop
return valid
}
// end phone verify...
////////////////////

/////////////////////////////////////////////////////
// start verifyZip()
//
function verifyZip(){

errorMessage = "Please correct the following errors:\n\n";
error = 0;

var zip = document.form1.order_zip.value;
var phone = document.form1.order_phone.value;

if((!CheckPhoneNumber(phone)) || phone == "" || phone == null){
errorMessage += "* Please enter your phone number.\n";
error = 1;
}

if(zip == "" || zip == null){
errorMessage += "* Please enter your zip code.\n";
error = 1;
}

if(error){
alert(errorMessage);
return false;
}else{
return true;
}}
// end verifyZip()
/////////////////////////////////////////////////////

/////////////////////////////////////////////////////
//
// CONTROLS THE VIDEO PLAYER WINDOW
function videoPlayer() {
var win = new Window({id: "video", className: "spread", resizable: false, title: "The Ultimate Sawhorse LLC. Demonstration Video", width:480, height:435, showEffect:Effect.BlindDown, hideEffect: Effect.BlindUp});
win.setURL('video.html');
win.setDestroyOnClose(); 
win.setConstraint(true, {left:0, right:0, top: 25, bottom:0})
win.showCenter();
win.toFront();
}
// end Video Player window controls
/////////////////////////////////////////////////////

// ]]>