function ratesCheck(){	var missing = "";	var thisForm = document.forms["rates_form"];	var thisState = thisForm.RatesState.value;	var thisLoan = thisForm.LoanType.value;	var thisPoints = thisForm.UserPoints.value;	var thisAmount = thisForm.LoanAmount.value.replace(/[^0-9]/g,'');	if (thisState=="" && thisLoan=="" && thisPoints=="" && thisAmount=="") { 	missing = "state, loan type, points, and loan amount";	} else if (thisState=="") {	missing = "state";	} else if (thisLoan=="") {	missing = "loan type";	} else if (thisPoints=="") {	missing = "points";	} else if (thisAmount=="") {	  //missing = "numerical amount";	  thisForm.amount.value = '$150,000';	}	if (missing!="") {	alert("Please select a "+missing+" to compare rates.");	} else {	thisForm.action="/interest_rates/loan_state_rates";	thisForm.submit();	}}function zipCheck(formIndex){var val = true;var which = "loans_home_broker"+formIndex;var zipFrm = document.forms[which];var zipFromForm = zipFrm.zipcode.value;for (var i=0; i<zipFromForm.length;i++) {if (zipFromForm.substring(i,i+1) < "0" || zipFromForm.substring(i,i+1) > "9") {val = false;break;}}if (zipFromForm.length < 5) val = false;if (val) {zipFrm.action="https://www.loanstore.com/loans/contact_info";zipFrm.submit();}else {alert("Please provide your zip code. Then click \"Get Free Quote\" again.");}}function showLoansPrompt(theSrc, theWidth, theHeight) {//We're using LS popups, use LoansPromptIFrameObj=eval('document.getElementById("LoansPrompt")');if (IFrameObj==null) {return false};IFrameObj.style.visibility="visible";IFrameObj.src = theSrc;IFrameObj.style.left=380-(theWidth/2);IFrameObj.style.top=document.body.scrollTop;IFrameObj.style.border='2';IFrameObj.style.borderColor='#406399';IFrameObj.style.borderStyle='solid';if (!isIE()) {theWidth = (theWidth/1)-5;theHeight = (theHeight/1)-5;}IFrameObj.style.width = theWidth;IFrameObj.style.height = theHeight;}function closeLoansPrompt() {IFrameObj=eval('document.getElementById("LoansPrompt")');IFrameObj.style.visibility="hidden";IFrameObj.src = "<page:href>/loans/blank.htm</page:href>";}// Need to add a sniffer for IE 5 and set it to use DOM as well.function isIE() {if (navigator.appName == "Microsoft Internet Explorer")return true;else return false;}