// JavaScript Document
function frm_submit(frm_getquote){

 	if (document.frm_getquote.name.value==""  || empty(stripSpaces(document.frm_getquote.name.value))){
			alert("Specify your name");
			document.frm_getquote.name.focus();
			return false;
	}
	
 	if (document.frm_getquote.name.value==""  || empty(stripSpaces(document.frm_getquote.name.value))){
			alert("Specify your name");
			document.frm_getquote.name.focus();
			return false;
	}
	
	if (document.frm_getquote.email.value==""  || empty(stripSpaces(document.frm_getquote.email.value))){
			alert("Email Address left blank");
			document.frm_getquote.email.focus();
			return false;
	}
		
	if (echeck(document.frm_getquote.email.value)==false){
			document.frm_getquote.email.focus();
			return false
	}
	
	if (document.frm_getquote.confirm_email.value==""  || empty(stripSpaces(document.frm_getquote.confirm_email.value))){
			alert("Re-type email address");
			document.frm_getquote.confirm_email.focus();
			return false;
	}
	
	if (document.frm_getquote.email.value != document.frm_getquote.confirm_email.value){
			alert("Email-ids don't match.");
			document.frm_getquote.confirm_email.focus();
			return false;
	}
	
	if (document.frm_getquote.company_name.value==""  || empty(stripSpaces(document.frm_getquote.company_name.value))){
			alert("Company Name left blank.");
			document.frm_getquote.company_name.focus();
			return false;
	}
	
	if (document.frm_getquote.company_type.options.selectedIndex == 0){
			alert("Company Type left blank.");
			document.frm_getquote.company_type.focus();
			return false;
	}

	if (document.frm_getquote.phone.value==""  || empty(stripSpaces(document.frm_getquote.phone.value))){
			alert("Phone left blank.");
			document.frm_getquote.phone.focus();
			return false;
	}

	if (document.frm_getquote.preferred_contact_method.selectedIndex==0){
			alert("Preferred Contact Method left empty");
			document.frm_getquote.preferred_contact_method.focus();
			return false;
	}

	if (document.frm_getquote.frames_per_month.value==""  || empty(stripSpaces(document.frm_getquote.frames_per_month.value))){
			alert("How many frames do you sell, per month, currently?");
			document.frm_getquote.frames_per_month.focus();
			return false;
	}
	
	if (document.frm_getquote.frames_prod_inhouse[0].checked == false && document.frm_getquote.frames_prod_inhouse[1].checked == false){
			alert("Are the frames produced in-house?");
			return false;
	} 
	
	if (document.frm_getquote.frames_prod_inhouse[0].checked == true){
			if (document.frm_getquote.desc_current_prod.value == ""){
				alert("Describe your current production.");
				document.frm_getquote.desc_current_prod.focus();
				return false;
			}	
	}
		
	if (document.frm_getquote.largest_height.value==""  || empty(stripSpaces(document.frm_getquote.largest_height.value))){
			alert("What is the largest profile to be cut?");
			document.frm_getquote.largest_height.focus();
			return false;
	}
	
	if (document.frm_getquote.largest_width.value==""  || empty(stripSpaces(document.frm_getquote.largest_width.value))){
			alert("What is the largest profile to be cut?");
			document.frm_getquote.largest_width.focus();
			return false;
	}

	if (document.frm_getquote.smallest_height.value==""  || empty(stripSpaces(document.frm_getquote.smallest_height.value))){
			alert("What is the smallest profile to be cut?");
			document.frm_getquote.smallest_height.focus();
			return false;
	}
	
	if (document.frm_getquote.smallest_width.value==""  || empty(stripSpaces(document.frm_getquote.smallest_width.value))){
			alert("What is the smallest profile to be cut?");
			document.frm_getquote.smallest_width.focus();
			return false;
	}
	
	if (document.frm_getquote.metal_cut[0].checked == false && document.frm_getquote.metal_cut[1].checked == false){
			alert("Will any metal be cut with the saw?");
			return false;
	}
	
	if (document.frm_getquote.metal_cut[0].checked == true){
			if (document.frm_getquote.percent_cuts.value == ""){
				alert("What percent of the frames will be metal?");
				document.frm_getquote.percent_cuts.focus();
				return false;
			}	
	}
	
	if (document.frm_getquote.timeframe[0].checked == false && document.frm_getquote.timeframe[1].checked == false  && document.frm_getquote.timeframe[2].checked == false  && document.frm_getquote.timeframe[3].checked == false  && document.frm_getquote.timeframe[4].checked == false){
			alert("Whats the timeframe to acquire the new machine?");
			return false;	
	}
		
	return true;
}