/* NOTE: This file uses functions defined in 'qs.js'. If you include this file in your HTML, then you need to include 'qs.js' as well. */ function licensePop(comp, domain) { if (comp && domain) { var exitpop_url = cb_url + "/global/html/license.html?comp=" + escape(comp) + "&domain=" + domain; window.open(exitpop_url, "LicenseAgreement", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=600,top=300,left=0"); } } /***************************************************************************************************************************************/ function submit2LrsForm(loan_type, mail_stateprov) { if (populated == 0) { populateForm('applyForm'); } if (getQueryValue("CID")) { document.applyForm.CID.value = getQueryValue("CID"); } else if (getQueryValue("cid")) { document.applyForm.CID.value = getQueryValue("cid"); } document.applyForm.loan_type.value = loan_type; document.applyForm.mail_stateprov.value = mail_stateprov; if (document.applyForm.OID.value == "4401" || document.applyForm.OID.value == "4400"){ if(document.applyForm.property_type.value == "mobile" || document.applyForm.property_type.value == "manufactured"){ document.getElementById('applyForm').method = "get"; document.getElementById('applyForm').action = "error.html"; } } CheckInvalidState(''); document.applyForm.submit(); } /***************************************************************************************************************************************/ function submitLrsForm4940( loan_type, mail_stateprov ) { document.applyForm.HSID.value = "F1Submit"; if (loan_type == "refinance"){ document.applyForm.HSID.value = "tabRefi"; } else if (loan_type == "home_equity"){ document.applyForm.HSID.value = "tabHE"; } else if (loan_type == "improvement"){ document.applyForm.HSID.value = "tabHI"; } else if (loan_type == "debt_consolidate"){ document.applyForm.HSID.value = "tabDebt"; } else if (loan_type == "purchase"){ document.applyForm.HSID.value = "tabHP"; } submit2LrsForm(loan_type, mail_stateprov); return 0; } function CheckInvalidState() { if (document.getElementById('mail_stateprov').value == "MT" || document.getElementById('mail_stateprov').value == "RI") { document.getElementById('applyForm').method = "get"; document.getElementById('applyForm').action = "error.html"; } return true; } function CheckOID() { if (document.applyForm.OID.value == "4401" || document.applyForm.OID.value == "4400") { if(document.applyForm.property_type.value == "mobile" || document.applyForm.property_type.value == "manufactured"){ document.getElementById('applyForm').method = "get"; document.getElementById('applyForm').action = "error.html"; } return true; } return true; } function FlagstarXsell() { if (document.applyForm.OID.value == "4912" || document.applyForm.OID.value == "4750" || document.applyForm.OID.value == "4940" ) { if(document.applyForm.property_type.value == "manufactured"){ document.getElementById('applyForm').method = "get"; document.getElementById('applyForm').action = "error.html"; } return true; } return true; }