


function validate_quote(thefrm){
	
	var email = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; 
	var msg = "";
	if(isEmpty(thefrm.Customer_Name.value)){
		alert("Please enter your name.");
	thefrm.Customer_Name.focus();
		return false;
	}
	else if(isEmpty(thefrm.Pick_Up_Date.value)){
		alert("Please enter the Pick Up Date .");
	thefrm.Pick_Up_Date.focus();
		return false;
	}	
	else if(isEmpty(thefrm.Pick_Up_Time.value)){
		alert("Please enter the Pick Up Time.");
	thefrm.Pick_Up_Time.focus();
		return false;
	}	
	else if(isEmpty(thefrm.Pick_Up_Location.value)){
		alert("Please enter the Pick up Location.");
	thefrm.Pick_Up_Location.focus();
		return false;
	}	
	else if(isEmpty(thefrm.Drop_Off_Location.value)){
		alert("Please enter the Drop Off Location.");
	thefrm.Drop_Off_Location.focus();
		return false;
	}
	else if(isEmpty(thefrm.Daytime_Phone.value) || !IsInteger(thefrm.Daytime_Phone.value) ){
		alert("Please enter a valid Daytime Phone number.");
		thefrm.Daytime_Phone.focus();
		return false;
	}
		else if(isEmpty(thefrm.Daytime_Phone.value) || !IsInteger(thefrm.Daytime_Phone.value) ){
		alert("Please enter a valid Daytime Phone number.");
		thefrm.phone.focus();
		return false;
	}
	else if(isEmpty(thefrm.Vehicle_Type.value)){
		alert("Please select a Vehicle Type.");
		thefrm.Vehicle_Type.focus();
		return false;
	}
	else if(isEmpty(thefrm.EMail.value) || !email.test(thefrm.EMail.value)  ){
		alert("Please enter valid email address.");
		thefrm.EMail.focus();
		return false;
	}
	else
		return true;


}


///////////////////////////
function IsInteger(snum)
{
	var reInteger = /^\d+$/
    return reInteger.test(snum)
}

// Check whether string s is empty.
function isEmpty(s)
{   
	return ((s == null) || (s.length == 0) || (s.substr(0,1) == " "))
}