function validate() {

if (document.form1.companyname.value == "") { 
alert("You must enter a company name."); 
document.form1.companyname.focus(); 
return 0; 
} 

if (document.form1.contact.value == "") { 
alert("You must enter a contact name."); 
document.form1.contact.focus(); 
return 0; 
}

if (document.form1.address.value == "") { 
alert("You must enter your address."); 
document.form1.address.focus(); 
return 0; 
}

if (document.form1.city.value == "") { 
alert("You must enter your city."); 
document.form1.city.focus(); 
return 0; 
}

if (document.form1.zip.value == "") { 
alert("You must enter your zip code."); 
document.form1.zip.focus(); 
return 0; 
}


if (document.form1.phone.value == "" && document.form1.email.value == "") { 
alert("You must enter your phone # or email address."); 
document.form1.phone.focus(); 
return 0; 
}

if (document.form1.email.value != "") { 

var str = document.form1.email.value;
	    var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	    if (!str.match(re)) {
	        alert("Your email address is invalid. Please verify that you have entered it correctly.");
			document.form1.email.focus(); 
			return 0;
	    }
	}


/*if (document.form1.po.value == "") { 
alert("You must enter po #."); 
document.form1.po.focus(); 
return 0; 
}
*/ 
var bottom_recess = document.form1.bottom_recess.options[document.form1.bottom_recess.selectedIndex].value;

var slide_mounting = document.form1.slide_mounting.options[document.form1.slide_mounting.selectedIndex].value;

var slide_type = document.form1.slide_type.options[document.form1.slide_type.selectedIndex].value;

var purchase_slides = document.form1.purchase_slides.options[document.form1.purchase_slides.selectedIndex].value;

var finish = document.form1.finish.options[document.form1.finish.selectedIndex].value;

var assembly = document.form1.assembly.options[document.form1.assembly.selectedIndex].value;

var pullouts = document.form1.pullouts.options[document.form1.pullouts.selectedIndex].value;
/*
var fileslots = document.form1.fileslots.options[document.form1.fileslots.selectedIndex].value;

var filebars = document.form1.filebars.options[document.form1.filebars.selectedIndex].value;
*/


if(bottom_recess==""){
alert("you must select a bottom recess size.");
document.form1.bottom_recess.focus();
return 0;
}

if(slide_mounting==""){
alert("you must select a slide mounting option.");
document.form1.slide_mounting.focus();
return 0;
}

if(slide_type==""){
alert("you must select a slide type.");
document.form1.slide_type.focus();
return 0;
}

if(purchase_slides==""){
alert("you must select a purchase slides option.");
document.form1.purchase_slides.focus();
return 0;
}

if(finish==""){
alert("you must select a finish option.");
document.form1.finish.focus();
return 0;
}

if(assembly==""){
alert("you must select an assembly option.");
document.form1.assembly.focus();
return 0;
}

if(pullouts==""){
alert("you must select a pullouts option.");
document.form1.pullouts.focus();
return 0;
}
/*
if(fileslots==""){
alert("you must select a fileslots option.");
document.form1.fileslots.focus();
return 0;
}

if(filebars==""){
alert("you must select a file bars option.");
document.form1.filebars.focus();
return 0;
}
*/
	document.form1.submit();
}													
// JavaScript Document