function checkSubmit() {
    aMandatory["first_name"] = new Array("First Name", "Text", "");
    aMandatory["last_name"] = new Array("Last Name", "Text", "");
    aMandatory["email"] = new Array("E-Mail", "Text", "");
    aMandatory["phone"] = new Array("Phone", "Text", "");
  
    if(document.quick_quote_form.name != undefined) {
    	bRetVal = chkMandatory(document.quick_quote_form);
      	if (bRetVal) bRetVal = validEmail(document.quick_quote_form.email);
      	if (bRetVal) bRetVal = chkPhoneNo(document.quick_quote_form.phone);

		if (!bRetVal) return false;

    	bRetVal = true;

    	if (bRetVal) disableButtons(document.quick_quote_form);
    	return bRetVal;
  	}
  	return false;
}
//The following regular expression is used to verify that the user entered phone number is in the correct format i.e 10digit +- ext followed by numbers.
var phfilter= /^(\+?1\s*[-\/\.]?)?(\((\d{3})\)|(\d{3}))\s*[-\/\.]?\s*(\d{3})\s*[-\/\.]?\s*(\d{4})\s*(([xX]|[eE][xX][tT])\.?\s*(\d+))*$/
function chkph() {
	var phv = document.quick_quote_form.phone.value;
	var returnval1=phfilter.test(phv)
	if (returnval1==false) {
		alert("Please enter a valid phone number.")
		document.quick_quote_form.phone.focus();
		//p.select()
	}
	return returnval1
}
//end of the phone validation
function minAmount(objLoan_Amount) {
	var valid = 1;
	var validchar = "$0123456789,."; 
	var i = 0; 
	var amountDelimiters = "$,"; 
	var normalizedAmount = phoneStripCharsInBag(objLoan_Amount.value, amountDelimiters); 
	if (normalizedAmount < 50000) { 
		alert('Please enter a Loan Amount of $50,000 or more.'); 
		objLoan_Amount.select(); 
		objLoan_Amount.focus(); 
		return false; 
	} 
	for (i=0; i <= objLoan_Amount.value.length -1; i++) { 
		if (validchar.indexOf(objLoan_Amount.value.charAt(i)) == -1) { 
			alert('Invalid character ' + objLoan_Amount.value.charAt(i) + ' entered.'); 
			objLoan_Amount.value = ""; 
			objLoan_Amount.select(); 
			objLoan_Amount.focus(); 
			return false; 
		} 
	} 
	return true; 
} 