var siteUrl = 'http://www.theloanpost.com/'; /* * Ext JS Library 2.0 Alpha 1 * Copyright(c) 2006-2007, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ var tabs = null; var loanModEvent = 0; var loanModWin = null; var datefield3 = null; var userFormWin = null; var datefield4 = null; var hardshipWaitMsg = "

Please wait while the system saves your hardship information. This may take up to a minute...

"; var libDIYPackageId = 110; /*** Get center position of Browser ***/ var winw = "600"; //############# How wide should your window be (pixels) var winh = "350"; //############# How tall should the window be (pixels) var ie=(document.all); var ns=(document.layers); var ns6=(document.getElementById && !ie); var scrolly = typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement.scrollTop; var scrollx = typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement.scrollLeft; var distance = 100; var scrolly = (scrolly+distance); var scrollx = (scrollx+distance); function centerElement(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } /*** Loan Modification Tab ***/ function showLoanModTabs(){ tabs = new Ext.TabPanel({ renderTo: 'modTabs', width:lmrWdth, activeTab: tabVal, frame:true, plain:true, defaults:{autoHeight: true}, items:[ {contentEl:'prequalInfo', title: '
1. Borrower Info
',disabled:false,numb:0, listeners: {activate: navigateToNextTab}}, {contentEl:'incomeInfo', title: '
2. Income/Expense
',disabled:disableIncomeVal,numb:1, listeners: {activate: navigateToNextTab}}, {contentEl:'hardshipInfo', title: '
3. Hardship
',disabled:disableHardshipVal,numb:2, listeners: {activate: navigateToNextTab}}, {contentEl:'QAInfo', title: '
4. Q+A
',disabled:disableQAVal,numb:3, listeners: {activate: navigateToNextTab}}, {contentEl:'uploadDocInfo', title: '
5. Docs
',disabled:disableUploadVal,numb:4, listeners: {activate: navigateToNextTab}} ] }); loanModEvent++; focusTop(); } function showLoanModTabsForProposal(){ tabs = new Ext.TabPanel({ renderTo: 'modTabs', width:lmrWdth, activeTab: tabVal, frame:true, plain:true, defaults:{autoHeight: true}, items:[ {contentEl:'prequalInfo', title: '
1. Borrower Info
',disabled:false,numb:0, listeners: {activate: navigateToNextTab}}, {contentEl:'incomeInfo', title: '
2. Income/Expense
',disabled:disableIncomeVal,numb:1, listeners: {activate: navigateToNextTab}}, {contentEl:'hardshipInfo', title: '
3. Hardship
',disabled:disableHardshipVal,numb:2, listeners: {activate: navigateToNextTab}}, {contentEl:'QAInfo', title: '
4. Q+A
',disabled:disableQAVal,numb:3, listeners: {activate: navigateToNextTab}}, {contentEl:'proposalInfo', title: '
5. Proposals
',disabled:disableProposalVal,numb:4, listeners: {activate: navigateToNextTab}}, {contentEl:'approvalInfo', title: '
6. Approvals
',disabled:disableApprovalVal,numb:5, listeners: {activate: navigateToNextTab}}, {contentEl:'uploadDocInfo', title: '
7. Docs
',disabled:disableUploadVal,numb:6, listeners: {activate: navigateToNextTab}} ] }); loanModEvent++; focusTop(); } function enableTabs(enableOpt) { document.getElementById('overlayout').className = ""; } function showCoBorrowerDiv(opt,divId,cnt) { if(opt == 'show') { displayOpt = "block"; } else { displayOpt = "none"; } for(var cl=1;cl<=cnt;cl++) { try { eval("document.getElementById('"+divId+"Div"+cl+"').style.display = displayOpt"); } catch(e) {} } if(opt == 'show') { try { eval("document.getElementById('coBorTable').className = 'clsBgLMR'"); } catch(e) {} } else { try { eval("document.getElementById('coBorTable').className = ''"); } catch(e) {} clearCoBorrowerInfo(); } } /* * Clear Co-Borrower Info. */ function clearCoBorrowerInfo() { try { document.loanModForm.coBorrowerFName.value = ""; } catch(e) {} try { document.loanModForm.coBorrowerLName.value = ""; } catch(e) {} try { document.loanModForm.coBSsn1.value = ""; document.loanModForm.coBSsn2.value = ""; document.loanModForm.coBSsn3.value = ""; } catch(e) {} try { document.loanModForm.coBorrowerDOB.value = ""; } catch(e) {} try { document.loanModForm.coBPhNo1.value = ""; document.loanModForm.coBPhNo2.value = ""; document.loanModForm.coBPhNo3.value = ""; document.loanModForm.coBExt.value = ""; } catch(e) {} try { document.loanModForm.coBAltPhNo1.value = ""; document.loanModForm.coBAltPhNo2.value = ""; document.loanModForm.coBAltPhNo3.value = ""; document.loanModForm.coBAltExt.value = ""; } catch(e) {} try { document.loanModForm.coBCellNo1.value = ""; document.loanModForm.coBCellNo2.value = ""; document.loanModForm.coBCellNo3.value = ""; } catch(e) {} try { document.loanModForm.coBFax1.value = ""; document.loanModForm.coBFax2.value = ""; document.loanModForm.coBFax3.value = ""; } catch(e) {} try { document.loanModForm.coBorrowerEmail.value = ""; } catch(e) {} try { document.loanModForm.coBWorkNo1.value = ""; document.loanModForm.coBWorkNo2.value = ""; document.loanModForm.coBWorkNo3.value = ""; } catch(e) {} } function showMortgageDiv(opt,divId) { if(opt == 'show') { if(divId == "adjustDate") { try { document.getElementById("adjustDateDiv1").style.display ="block"; } catch(e) {} try { document.getElementById("adjustDateDiv2").style.display ="block"; } catch(e) {} try { document.getElementById("adjustDateDiv3").style.display ="block"; } catch(e) {} try { document.getElementById("adjustDateDiv4").style.display ="block"; } catch(e) {} } else { try { document.getElementById(divId).style.display ="block"; } catch(e) {} try { document.getElementById("mortgageDiv1").style.display ="block"; } catch(e) {} try { document.getElementById("mortgageDiv2").style.display ="block"; } catch(e) {} } } else { if(divId == "adjustDate") { try { document.getElementById("adjustDateDiv1").style.display ="none"; } catch(e) {} try { document.getElementById("adjustDateDiv2").style.display ="none"; } catch(e) {} try { document.getElementById("adjustDateDiv3").style.display ="none"; } catch(e) {} try { document.getElementById("adjustDateDiv4").style.display ="none"; } catch(e) {} } else { try { document.getElementById(divId).style.display ="none"; } catch(e) {} try { document.getElementById("mortgageDiv1").style.display ="none"; } catch(e) {} try { document.getElementById("mortgageDiv2").style.display ="none"; } catch(e) {} } } } function getLoanTypes() { var len = 0, chk = false, selVal = "", loanType = "",ll = 0, armOpt = false; try { len = document.loanModForm.loanType.length; } catch(e) {} for(var l=0;l < len;l++) { var chk = false,selVal = ""; try { eval("chk = document.loanModForm.loanType["+l+"].checked"); } catch(e) {} if(chk) { try { eval("selVal = document.loanModForm.loanType["+l+"].value"); } catch(e) {} if(selVal == "ARM") { armOpt = true; } if(ll == 0) { loanType = selVal; } else { loanType += ", "+selVal; } ll++; } } if(armOpt) { showMortgageDiv('show','adjustDate'); } else { showMortgageDiv('hide','adjustDate'); } try{ document.loanModForm.borrowerLoanType.value = loanType; } catch(e) {} } /*** Thank You Popup ***/ try { loanModWin = new Ext.Window({ el:'loanMod-win', layout:'fit', width:570, height:250, closeAction:'hide', plain: true, defaults: {autoScroll:true}, items: new Ext.TabPanel({ el: 'loanMod-tabs', autoTabs:true, activeTab:0, deferredRender:false, border:false }) }); } catch(e) {} function showThankYouPopUp() { if(siteName == "TLP") { } else { if (ie){ documentWidth = (centerElement().offsetWidth)/2+centerElement().scrollLeft-(winw/2); documentHeight = (centerElement().offsetHeight)/2+centerElement().scrollTop-(winh/2); } else if (ns){ documentWidth=window.innerWidth/2+window.pageXOffset-(winw/2); documentHeight=window.innerHeight/2+window.pageYOffset-(winh/2); } else if (ns6){ documentWidth=self.innerWidth/2+window.pageXOffset-(winw/2); documentHeight=self.innerHeight/2+window.pageYOffset-(winh/2); } try { loanModWin.setPosition( documentWidth,documentHeight ); } catch(e) {} } try { loanModWin.show(); loanModWin.focus(); document.getElementById("loanMod-win").focus(); } catch(e) {} } /* Datepicker */ function showDate(){ var datefield = new Ext.form.DateField({ labelWidth: 100, // label settings here cascade unless overridden frame:false, title: 'Datepicker', width: 100, defaults: {width: 220}, defaultType: 'datefield', format: 'm-d-Y', id: 'myDate', tabIndex : '35', items: [{ fieldLabel: 'Date', name: 'date', hiddenName: 'date' } ] }); datefield.render('datefield'); } function checkLMRBrokerEmailExist() { var brokerDetails = new Array(); var brokerNumber = 0; var brokerFirstName = "", brokerCompany = "", brokerLastName = "",phoneNumber = ""; var brokerEmail = "", ph1 = "", ph2="", ph3 ="", ph4 ="",status = ""; var cellNumber = "", cellNo1 = "", cellNo2="", cellNo3 ="",fax = ""; var fax1 = "", fax2="", fax3 ="", bAddr = "",bCity = "", bState= "",bZipCode=""; var brokerEmail = document.loanModBrokerForm.brokerEmail.value; try { brokerEmail = trim(brokerEmail); } catch(e) {} var url = "getBREmailInfo.php"; var qstr = "email="+brokerEmail; var xmlDoc = ""; if(brokerEmail !="") { try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} } try { brokerDetails = xmlDoc.getElementsByTagName("brokerDetails"); status = xmlDoc.getElementsByTagName("status")[0].firstChild.nodeValue; } catch (e) {} if(status == "Exist") { for(var i=0; i 0) { lien1DTI = parseFloat(lien1PaymentPITIA); lien1DTI = parseFloat(lien1DTI)/parseFloat(grossMonthlyHouseHoldIncome); lien1DTI = lien1DTI * 100; } lien1DTI = lien1DTI.toFixed(2); try { eval("document.getElementById('lien1IncomeDTI').innerHTML = lien1DTI"); } catch(e) {} } /* * Calculate Primary Borrower Total HouseHold Income. */ function calculatePrimaryNewTotalNetMonthlyIncome(currentvalue, borrowerOpt) { var newNetMonthlyIncome = 0, grossIncome1 = 0, commissionOrBonus1 = 0; var overtime1 = 0, tipsMiscIncome1 = 0, federalTaxFICA1 = 0, otherDeductions1 = 0; var totalGrossIncome = 0; alertToEnterInput(currentvalue); try { grossIncome1 = document.loanModForm.grossIncome1.value; } catch(e) {} try { commissionOrBonus1 = document.loanModForm.commissionOrBonus1.value; } catch(e) {} try { overtime1 = document.loanModForm.overtime1.value; } catch(e) {} try { tipsMiscIncome1 = document.loanModForm.tipsMiscIncome1.value; } catch(e) {} try { federalTaxFICA1 = document.loanModForm.federalTaxFICA1.value; } catch(e) {} try { otherDeductions1 = document.loanModForm.otherDeductions1.value; } catch(e) {} grossIncome1 = replaceCommaValues(grossIncome1); commissionOrBonus1 = replaceCommaValues(commissionOrBonus1); overtime1 = replaceCommaValues(overtime1); tipsMiscIncome1 = replaceCommaValues(tipsMiscIncome1); federalTaxFICA1 = replaceCommaValues(federalTaxFICA1); otherDeductions1 = replaceCommaValues(otherDeductions1); if(grossIncome1 == "") { grossIncome1 = 0; } if(commissionOrBonus1 == "") { commissionOrBonus1 = 0; } if(overtime1 == "") { overtime1 = 0; } if(tipsMiscIncome1 == "") { tipsMiscIncome1 = 0; } if(federalTaxFICA1 == "") { federalTaxFICA1 = 0; } if(otherDeductions1 == "") { otherDeductions1 = 0; } totalGrossIncome = parseFloat(grossIncome1) + parseFloat(commissionOrBonus1) + parseFloat(overtime1) + parseFloat(tipsMiscIncome1); newNetMonthlyIncome = parseFloat(totalGrossIncome) - (parseFloat(federalTaxFICA1) + parseFloat(otherDeductions1)); try { document.loanModForm.netMonthlyIncome1.value = newNetMonthlyIncome; } catch(e) {} calculatePrimaryTotalHouseHoldIncome(currentvalue); } /* * Calculate Primary Borrower Total HouseHold Income. */ function calculateCoBorrowerNewTotalNetMonthlyIncome(currentvalue) { var newNetMonthlyIncome = 0, grossIncome2 = 0, commissionOrBonus2 = 0; var overtime2 = 0, tipsMiscIncome2 = 0, federalTaxFICA2 = 0, otherDeductions2 = 0; var totalGrossIncome = 0; alertToEnterInput(currentvalue); try { grossIncome2 = document.loanModForm.grossIncome2.value; } catch(e) {} try { commissionOrBonus2 = document.loanModForm.commissionOrBonus2.value; } catch(e) {} try { overtime2 = document.loanModForm.overtime2.value; } catch(e) {} try { tipsMiscIncome2 = document.loanModForm.tipsMiscIncome2.value; } catch(e) {} try { federalTaxFICA2 = document.loanModForm.federalTaxFICA2.value; } catch(e) {} try { otherDeductions2 = document.loanModForm.otherDeductions2.value; } catch(e) {} grossIncome2 = replaceCommaValues(grossIncome2); commissionOrBonus2 = replaceCommaValues(commissionOrBonus2); overtime2 = replaceCommaValues(overtime2); tipsMiscIncome2 = replaceCommaValues(tipsMiscIncome2); federalTaxFICA2 = replaceCommaValues(federalTaxFICA2); otherDeductions2 = replaceCommaValues(otherDeductions2); if(grossIncome2 == "") { grossIncome2 = 0; } if(commissionOrBonus2 == "") { commissionOrBonus2 = 0; } if(overtime2 == "") { overtime2 = 0; } if(tipsMiscIncome2 == "") { tipsMiscIncome2 = 0; } if(federalTaxFICA2 == "") { federalTaxFICA2 = 0; } if(otherDeductions2 == "") { otherDeductions2 = 0; } totalGrossIncome = parseFloat(grossIncome2) + parseFloat(commissionOrBonus2) + parseFloat(overtime2) + parseFloat(tipsMiscIncome2); newNetMonthlyIncome = parseFloat(totalGrossIncome) - (parseFloat(federalTaxFICA2) + parseFloat(otherDeductions2)); try { document.loanModForm.netMonthlyIncome2.value = newNetMonthlyIncome; } catch(e) {} calculateCoBorrowerTotalHouseHoldIncome(currentvalue); } /* * Calculate Primary Borrower Total HouseHold Income. */ function calculatePrimaryTotalHouseHoldIncome(currentvalue) { var netMonthlyIncome1 = 0 var commissionOrBonus1 = 0; var overtime1 = 0; var socialSecurity1 = 0; var pensionOrRetirement1 = 0; var disability1 = 0; var childSupportOrAlimony1 = 0; var rental1 = 0; var earnedInterest1 = 0; var sonOrDaughter1 = 0; var parents1 = 0; var unemployment1 = 0; var tipsMiscIncome1 = 0; var primaryTotalHouseHoldIncome = 0; var coBorrowerTotalHouseHoldIncome = 0; var totalHouseHoldIncome = 0; var totalHouseHoldExpenses = 0; var totalDisposableIncome = 0; var otherHouseHold1 = 0; var roomRental1 = 0; var secondJobIncome1 = 0;var foodStampWelfare1 = 0; var primTotalGrossIncome = 0, grossIncome1 = 0; var isCoBorrower = 0; alertToEnterInput(currentvalue); try { isCoBorrower = document.loanModForm.isCoBorrowerExists.value; isCoBorrower = trim(isCoBorrower); } catch(e) {} try { grossIncome1 = document.loanModForm.grossIncome1.value; } catch(e) {} try { netMonthlyIncome1 = document.loanModForm.netMonthlyIncome1.value; } catch(e) {} try { commissionOrBonus1 = document.loanModForm.commissionOrBonus1.value; } catch(e) {} try { overtime1 = document.loanModForm.overtime1.value; } catch(e) {} try { socialSecurity1 = document.loanModForm.socialSecurity1.value; } catch(e) {} try { pensionOrRetirement1 = document.loanModForm.pensionOrRetirement1.value; } catch(e) {} try { disability1 = document.loanModForm.disability1.value; } catch(e) {} try { childSupportOrAlimony1 = document.loanModForm.childSupportOrAlimony1.value; } catch(e) {} try { rental1 = document.loanModForm.rental1.value; } catch(e) {} try { earnedInterest1 = document.loanModForm.earnedInterest1.value; } catch(e) {} try { sonOrDaughter1 = document.loanModForm.sonOrDaughter1.value; } catch(e) {} try { parents1 = document.loanModForm.parents1.value; } catch(e) {} try { unemployment1 = document.loanModForm.unemployment1.value; } catch(e) {} try { tipsMiscIncome1 = document.loanModForm.tipsMiscIncome1.value; } catch(e) {} try { otherHouseHold1 = document.loanModForm.otherHouseHold1.value; } catch(e) {} try { roomRental1 = document.loanModForm.roomRental1.value; } catch(e) {} try { secondJobIncome1 = document.loanModForm.secondJobIncome1.value; } catch(e) {} try { foodStampWelfare1 = document.loanModForm.foodStampWelfare1.value; } catch(e) {} netMonthlyIncome1 = replaceCommaValues(netMonthlyIncome1); commissionOrBonus1 = replaceCommaValues(commissionOrBonus1); overtime1 = replaceCommaValues(overtime1); socialSecurity1 = replaceCommaValues(socialSecurity1); pensionOrRetirement1 = replaceCommaValues(pensionOrRetirement1); disability1 = replaceCommaValues(disability1); childSupportOrAlimony1 = replaceCommaValues(childSupportOrAlimony1); rental1 = replaceCommaValues(rental1); earnedInterest1 = replaceCommaValues(earnedInterest1); sonOrDaughter1 = replaceCommaValues(sonOrDaughter1); parents1 = replaceCommaValues(parents1); unemployment1 = replaceCommaValues(unemployment1); tipsMiscIncome1 = replaceCommaValues(tipsMiscIncome1); otherHouseHold1 = replaceCommaValues(otherHouseHold1); roomRental1 = replaceCommaValues(roomRental1); secondJobIncome1 = replaceCommaValues(secondJobIncome1); grossIncome1 = replaceCommaValues(grossIncome1); foodStampWelfare1 = replaceCommaValues(foodStampWelfare1); if(netMonthlyIncome1 == "") { netMonthlyIncome1 = 0; } if(grossIncome1 == "") { grossIncome1 = 0; } if(commissionOrBonus1 == "") { commissionOrBonus1 = 0; } if(overtime1 == "") { overtime1 = 0; } if(socialSecurity1 == "") { socialSecurity1 = 0; } if(pensionOrRetirement1 == "") { pensionOrRetirement1 = 0; } if(disability1 == "") { disability1 = 0; } if(childSupportOrAlimony1 == "") { childSupportOrAlimony1 = 0; } if(rental1 == "") { rental1 = 0; } if(earnedInterest1 == "") { earnedInterest1 = 0; } if(sonOrDaughter1 == "") { sonOrDaughter1 = 0; } if(parents1 == "") { parents1 = 0; } if(unemployment1 == "") { unemployment1 = 0; } if(tipsMiscIncome1 == "") { tipsMiscIncome1 = 0; } if(otherHouseHold1 == "") { otherHouseHold1 = 0; } if(isCoBorrower == "") { isCoBorrower = 0; } if(roomRental1 == "") { roomRental1 = 0; } if(secondJobIncome1 == "") { secondJobIncome1 = 0; } if(foodStampWelfare1 == "") { foodStampWelfare1 = 0; } primaryTotalHouseHoldIncome = parseFloat(netMonthlyIncome1); // primaryTotalHouseHoldIncome += parseFloat(commissionOrBonus1)+parseFloat(overtime1)+parseFloat(tipsMiscIncome1); primaryTotalHouseHoldIncome += parseFloat(socialSecurity1)+parseFloat(pensionOrRetirement1); primaryTotalHouseHoldIncome += parseFloat(disability1)+parseFloat(childSupportOrAlimony1); primaryTotalHouseHoldIncome += parseFloat(rental1)+parseFloat(earnedInterest1); primaryTotalHouseHoldIncome += parseFloat(sonOrDaughter1)+parseFloat(parents1); primaryTotalHouseHoldIncome += parseFloat(unemployment1); primaryTotalHouseHoldIncome += parseFloat(otherHouseHold1); primaryTotalHouseHoldIncome += parseFloat(roomRental1)+ parseFloat(secondJobIncome1); primaryTotalHouseHoldIncome += parseFloat(foodStampWelfare1); primaryTotalHouseHoldIncome = parseFloat(primaryTotalHouseHoldIncome); primaryTotalHouseHoldIncome = primaryTotalHouseHoldIncome.toFixed(2); try { document.getElementById("primTotalHouseHoldIncome").innerHTML = primaryTotalHouseHoldIncome; } catch(e) {} if(isCoBorrower == 1) { try { coBorrowerTotalHouseHoldIncome = document.getElementById("coTotalHouseHoldIncome").innerHTML; coBorrowerTotalHouseHoldIncome = trim(coBorrowerTotalHouseHoldIncome); } catch(e) {} } if(coBorrowerTotalHouseHoldIncome == "") { coBorrowerTotalHouseHoldIncome = 0; } coBorrowerTotalHouseHoldIncome = parseFloat(coBorrowerTotalHouseHoldIncome); totalHouseHoldIncome = parseFloat(primaryTotalHouseHoldIncome) + coBorrowerTotalHouseHoldIncome; totalHouseHoldIncome = parseFloat(totalHouseHoldIncome); totalHouseHoldIncome = totalHouseHoldIncome.toFixed(2); try { document.getElementById("totalHouseHoldIncome").innerHTML = totalHouseHoldIncome; } catch(e) {} try { totalHouseHoldExpenses = document.getElementById("totalHouseHoldExpenses").innerHTML; totalHouseHoldExpenses = trim(totalHouseHoldExpenses); } catch(e) {} if(totalHouseHoldExpenses == "") { totalHouseHoldExpenses = 0; } try { document.getElementById("subTotalHouseHoldIncome").innerHTML = totalHouseHoldIncome; } catch(e) {} try { document.getElementById("subTotalHouseHoldExpenses").innerHTML = totalHouseHoldExpenses; } catch(e) {} totalDisposableIncome = totalHouseHoldIncome - parseFloat(totalHouseHoldExpenses); totalDisposableIncome = parseFloat(totalDisposableIncome); totalDisposableIncome = totalDisposableIncome.toFixed(2); try { document.getElementById("totalDisposableIncome").innerHTML = totalDisposableIncome; } catch(e) {} primTotalGrossIncome = parseFloat(grossIncome1)+parseFloat(commissionOrBonus1); primTotalGrossIncome += parseFloat(overtime1)+parseFloat(tipsMiscIncome1); primTotalGrossIncome = parseFloat(primTotalGrossIncome); primTotalGrossIncome = primTotalGrossIncome.toFixed(2); try { document.getElementById("primTotalGrossIncome").innerHTML = primTotalGrossIncome; } catch(e) {} calculateIncomeDTI(); } /* * Calculate Co-Borrower Total HouseHold Income. */ function calculateCoBorrowerTotalHouseHoldIncome(currentvalue) { var netMonthlyIncome2 = 0; var commissionOrBonus2 = 0; var overtime2 = 0; var socialSecurity2 = 0; var pensionOrRetirement2 = 0; var disability2 = 0; var childSupportOrAlimony2 = 0; var rental2 = 0; var earnedInterest2 = 0; var sonOrDaughter2 = 0; var parents2 = 0; var unemployment2 = 0; var tipsMiscIncome2 = 0; var coBorrowerTotalHouseHoldIncome = 0; var primaryTotalHouseHoldIncome = 0; var totalHouseHoldIncome = 0; var totalHouseHoldExpenses = 0; var totalDisposableIncome = 0; var otherHouseHold2 = 0; var roomRental2 = 0; var secondJobIncome2 = 0;var foodStampWelfare2 = 0; var coTotalGrossIncome = 0, grossIncome2 = 0; alertToEnterInput(currentvalue); try { netMonthlyIncome2 = document.loanModForm.netMonthlyIncome2.value; } catch(e) {} try { grossIncome2 = document.loanModForm.grossIncome2.value; } catch(e) {} try { commissionOrBonus2 = document.loanModForm.commissionOrBonus2.value; } catch(e) {} try { overtime2 = document.loanModForm.overtime2.value; } catch(e) {} try { socialSecurity2 = document.loanModForm.socialSecurity2.value; } catch(e) {} try { pensionOrRetirement2 = document.loanModForm.pensionOrRetirement2.value; } catch(e) {} try { disability2 = document.loanModForm.disability2.value; } catch(e) {} try { childSupportOrAlimony2 = document.loanModForm.childSupportOrAlimony2.value; } catch(e) {} try { rental2 = document.loanModForm.rental2.value; } catch(e) {} try { earnedInterest2 = document.loanModForm.earnedInterest2.value; } catch(e) {} try { sonOrDaughter2 = document.loanModForm.sonOrDaughter2.value; } catch(e) {} try { parents2 = document.loanModForm.parents2.value; } catch(e) {} try { unemployment2 = document.loanModForm.unemployment2.value; } catch(e) {} try { tipsMiscIncome2 = document.loanModForm.tipsMiscIncome2.value; } catch(e) {} try { otherHouseHold2 = document.loanModForm.otherHouseHold2.value; } catch(e) {} try { roomRental2 = document.loanModForm.roomRental2.value; } catch(e) {} try { secondJobIncome2 = document.loanModForm.secondJobIncome2.value; } catch(e) {} try { foodStampWelfare2 = document.loanModForm.foodStampWelfare2.value; } catch(e) {} netMonthlyIncome2 = replaceCommaValues(netMonthlyIncome2); commissionOrBonus2 = replaceCommaValues(commissionOrBonus2); overtime2 = replaceCommaValues(overtime2); socialSecurity2 = replaceCommaValues(socialSecurity2); pensionOrRetirement2 = replaceCommaValues(pensionOrRetirement2); disability2 = replaceCommaValues(disability2); childSupportOrAlimony2 = replaceCommaValues(childSupportOrAlimony2); rental2 = replaceCommaValues(rental2); earnedInterest2 = replaceCommaValues(earnedInterest2); sonOrDaughter2 = replaceCommaValues(sonOrDaughter2); parents2 = replaceCommaValues(parents2); unemployment2 = replaceCommaValues(unemployment2); tipsMiscIncome2 = replaceCommaValues(tipsMiscIncome2); otherHouseHold2 = replaceCommaValues(otherHouseHold2); roomRental2 = replaceCommaValues(roomRental2); secondJobIncome2 = replaceCommaValues(secondJobIncome2); grossIncome2 = replaceCommaValues(grossIncome2); foodStampWelfare2 = replaceCommaValues(foodStampWelfare2); if(netMonthlyIncome2 == "") { netMonthlyIncome2 = 0; } if(grossIncome2 == "") { grossIncome2 = 0; } if(commissionOrBonus2 == "") { commissionOrBonus2 = 0; } if(overtime2 == "") { overtime2 = 0; } if(socialSecurity2 == "") { socialSecurity2 = 0; } if(pensionOrRetirement2 == "") { pensionOrRetirement2 = 0; } if(disability2 == "") { disability2 = 0; } if(childSupportOrAlimony2 == "") { childSupportOrAlimony2 = 0; } if(rental2 == "") { rental2 = 0; } if(earnedInterest2 == "") { earnedInterest2 = 0; } if(sonOrDaughter2 == "") { sonOrDaughter2 = 0; } if(parents2 == "") { parents2 = 0; } if(unemployment2 == "") { unemployment2 = 0; } if(tipsMiscIncome2 == "") { tipsMiscIncome2 = 0; } if(otherHouseHold2 == "") { otherHouseHold2 = 0; } if(roomRental2 == "") { roomRental2 = 0; } if(secondJobIncome2 == "") { secondJobIncome2 = 0; } if(foodStampWelfare2 == "") { foodStampWelfare2 = 0; } coBorrowerTotalHouseHoldIncome = parseFloat(netMonthlyIncome2); // coBorrowerTotalHouseHoldIncome += parseFloat(commissionOrBonus2)+parseFloat(overtime2)+parseFloat(tipsMiscIncome2); coBorrowerTotalHouseHoldIncome += parseFloat(socialSecurity2)+parseFloat(pensionOrRetirement2); coBorrowerTotalHouseHoldIncome += parseFloat(disability2)+parseFloat(childSupportOrAlimony2); coBorrowerTotalHouseHoldIncome += parseFloat(rental2)+parseFloat(earnedInterest2); coBorrowerTotalHouseHoldIncome += parseFloat(sonOrDaughter2)+parseFloat(parents2); coBorrowerTotalHouseHoldIncome += parseFloat(unemployment2); coBorrowerTotalHouseHoldIncome += parseFloat(otherHouseHold2); coBorrowerTotalHouseHoldIncome += parseFloat(roomRental2)+ parseFloat(secondJobIncome2); coBorrowerTotalHouseHoldIncome += parseFloat(foodStampWelfare2); coBorrowerTotalHouseHoldIncome = parseFloat(coBorrowerTotalHouseHoldIncome); coBorrowerTotalHouseHoldIncome = coBorrowerTotalHouseHoldIncome.toFixed(2); try { document.getElementById("coTotalHouseHoldIncome").innerHTML = coBorrowerTotalHouseHoldIncome; } catch(e) {} try { primaryTotalHouseHoldIncome = document.getElementById("primTotalHouseHoldIncome").innerHTML; primaryTotalHouseHoldIncome = trim(primaryTotalHouseHoldIncome); } catch(e) {} if(primaryTotalHouseHoldIncome == "") { primaryTotalHouseHoldIncome = 0; } primaryTotalHouseHoldIncome = parseFloat(primaryTotalHouseHoldIncome); totalHouseHoldIncome = primaryTotalHouseHoldIncome + parseFloat(coBorrowerTotalHouseHoldIncome); totalHouseHoldIncome = parseFloat(totalHouseHoldIncome); totalHouseHoldIncome = totalHouseHoldIncome.toFixed(2); try { document.getElementById("totalHouseHoldIncome").innerHTML = totalHouseHoldIncome; } catch(e) {} try { totalHouseHoldExpenses = document.getElementById("totalHouseHoldExpenses").innerHTML; totalHouseHoldExpenses = trim(totalHouseHoldExpenses); } catch(e) {} if(totalHouseHoldExpenses == "") { totalHouseHoldExpenses = 0; } try { document.getElementById("subTotalHouseHoldIncome").innerHTML = totalHouseHoldIncome; } catch(e) {} try { document.getElementById("subTotalHouseHoldExpenses").innerHTML = totalHouseHoldExpenses; } catch(e) {} totalDisposableIncome = totalHouseHoldIncome - parseFloat(totalHouseHoldExpenses); totalDisposableIncome = parseFloat(totalDisposableIncome); totalDisposableIncome = totalDisposableIncome.toFixed(2); try { document.getElementById("totalDisposableIncome").innerHTML = totalDisposableIncome; } catch(e) {} coTotalGrossIncome = parseFloat(grossIncome2)+parseFloat(commissionOrBonus2); coTotalGrossIncome += parseFloat(overtime2)+parseFloat(tipsMiscIncome2); coTotalGrossIncome = parseFloat(coTotalGrossIncome); coTotalGrossIncome = coTotalGrossIncome.toFixed(2); try { document.getElementById("coTotalGrossIncome").innerHTML = coTotalGrossIncome; } catch(e) {} calculateIncomeDTI(); } /* * Calculate Primary Borrower Total HouseHold Expenses. */ function calculatePrimaryTotalHouseHoldExpenses(currentvalue) { var mortgage1MonthlyPayment = 0; var mortgage2MonthlyPayment = 0; var mortgage3MonthlyPayment = 0; var primaryMortgage1 = 0; var HOAFees1 = 0; var otherMortgage1 = 0; var taxes1 = 0; var insurance1 = 0; var creditCards1 = 0; var autoLoan1 = 0; var unsecuredLoans1 = 0; var studentLoans1 = 0; var childSupportOrAlimonyMonthly1 = 0; var careAmt1 = 0; var allInsurance1 = 0; var groceries1 = 0; var carExpenses1 = 0; var medicalBill1 = 0; var entertainment1 = 0; var other1 = 0; var primaryTotalHouseHoldExpenses = 0; var cable1 = ""; var natural1 = ""; var water1 = ""; var internet1 = ""; var utilityOther1 = ""; var electricity1 = ""; var primaryBorrowerPhone = ""; var coTotalHouseHoldExpenses = ""; var totalHouseHoldExpenses = ""; var totalHouseHoldIncome = 0; var totalHouseHoldExpenses = 0; var totalDisposableIncome = 0; var isCoBorrower = 0; var mortgageInsurance1 = 0; alertToEnterInput(currentvalue); try { isCoBorrower = document.loanModForm.isCoBorrowerExists.value; isCoBorrower = trim(isCoBorrower); } catch(e) {} try { mortgage1MonthlyPayment = document.loanModForm.mortgage1MonthlyPayment.value; } catch(e) {} try { mortgage2MonthlyPayment = document.loanModForm.mortgage2MonthlyPayment.value; } catch(e) {} try { // primaryMortgage1 = document.loanModForm.primaryMortgage1.value; } catch(e) {} try { HOAFees1 = document.loanModForm.HOAFees1Value.value; } catch(e) {} try { taxes1 = document.loanModForm.taxes1Value.value; } catch(e) {} try { insurance1 = document.loanModForm.insurance1Value.value; } catch(e) {} try { otherMortgage1 = document.loanModForm.otherMortgage1.value; } catch(e) {} try { creditCards1 = document.loanModForm.creditCards1.value; } catch(e) {} try { autoLoan1 = document.loanModForm.autoLoan1.value; } catch(e) {} try { unsecuredLoans1 = document.loanModForm.unsecuredLoans1.value; } catch(e) {} try { studentLoans1 = document.loanModForm.studentLoans1.value; } catch(e) {} try { childSupportOrAlimonyMonthly1 = document.loanModForm.childSupportOrAlimonyMonthly1.value; } catch(e) {} try { careAmt1 = document.loanModForm.careAmt1.value; } catch(e) {} try { allInsurance1 = document.loanModForm.allInsurance1.value; } catch(e) {} try { groceries1 = document.loanModForm.groceries1.value; } catch(e) {} try { carExpenses1 = document.loanModForm.carExpenses1.value; } catch(e) {} try { medicalBill1 = document.loanModForm.medicalBill1.value; } catch(e) {} try { entertainment1 = document.loanModForm.entertainment1.value; } catch(e) {} try { other1 = document.loanModForm.other1.value; } catch(e) {} try { cable1 = document.loanModForm.cable1.value; } catch(e) {} try { natural1 = document.loanModForm.natural1.value; } catch(e) {} try { water1 = document.loanModForm.water1.value; } catch(e) {} try { internet1 = document.loanModForm.internet1.value; } catch(e) {} try { utilityOther1 = document.loanModForm.utilityOther1.value; } catch(e) {} try { electricity1 = document.loanModForm.electricity1.value; } catch(e) {} try { primaryBorrowerPhone = document.loanModForm.primaryBorrowerPhone.value; } catch(e) {} try { mortgageInsurance1 = document.loanModForm.mortgageInsurance1Value.value; } catch(e) {} mortgage1MonthlyPayment = replaceCommaValues(mortgage1MonthlyPayment); mortgage2MonthlyPayment = replaceCommaValues(mortgage2MonthlyPayment); // primaryMortgage1 = replaceCommaValues(primaryMortgage1); HOAFees1 = replaceCommaValues(HOAFees1); taxes1 = replaceCommaValues(taxes1); insurance1 = replaceCommaValues(insurance1); otherMortgage1 = replaceCommaValues(otherMortgage1); creditCards1 = replaceCommaValues(creditCards1); autoLoan1 = replaceCommaValues(autoLoan1); unsecuredLoans1 = replaceCommaValues(unsecuredLoans1); studentLoans1 = replaceCommaValues(studentLoans1); childSupportOrAlimonyMonthly1 = replaceCommaValues(childSupportOrAlimonyMonthly1); careAmt1 = replaceCommaValues(careAmt1); allInsurance1 = replaceCommaValues(allInsurance1); groceries1 = replaceCommaValues(groceries1); carExpenses1 = replaceCommaValues(carExpenses1); medicalBill1 = replaceCommaValues(medicalBill1); entertainment1 = replaceCommaValues(entertainment1); other1 = replaceCommaValues(other1); cable1 = replaceCommaValues(cable1); natural1 = replaceCommaValues(natural1); water1 = replaceCommaValues(water1); internet1 = replaceCommaValues(internet1); utilityOther1 = replaceCommaValues(utilityOther1); electricity1 = replaceCommaValues(electricity1); primaryBorrowerPhone = replaceCommaValues(primaryBorrowerPhone); mortgageInsurance1 = replaceCommaValues(mortgageInsurance1); if(mortgage1MonthlyPayment == "") { mortgage1MonthlyPayment = 0; } if(mortgage2MonthlyPayment == "") { mortgage2MonthlyPayment = 0; } if(mortgage3MonthlyPayment == "") { mortgage3MonthlyPayment = 0; } if(primaryMortgage1 == "") { primaryMortgage1 = 0; } if(HOAFees1 == "") { HOAFees1 = 0; } if(taxes1 == "") { taxes1 = 0; } if(insurance1 == "") { insurance1 = 0; } if(otherMortgage1 == "") { otherMortgage1 = 0; } if(creditCards1 == "") { creditCards1 = 0; } if(autoLoan1 == "") { autoLoan1 = 0; } if(unsecuredLoans1 == "") { unsecuredLoans1 = 0; } if(studentLoans1 == "") { studentLoans1 = 0; } if(childSupportOrAlimonyMonthly1 == "") { childSupportOrAlimonyMonthly1 = 0; } if(careAmt1 == "") { careAmt1 = 0; } if(allInsurance1 == "") { allInsurance1 = 0; } if(groceries1 == "") { groceries1 = 0; } if(carExpenses1 == "") { carExpenses1 = 0; } if(medicalBill1 == "") { medicalBill1 = 0; } if(entertainment1 == "") { entertainment1 = 0; } if(other1 == "") { other1 = 0; } if(cable1 == "") { cable1 = 0; } if(natural1 == "") { natural1 = 0; } if(water1 == "") { water1 = 0; } if(internet1 == "") { internet1 = 0; } if(utilityOther1 == "") { utilityOther1 = 0; } if(electricity1 == "") { electricity1 = 0; } if(primaryBorrowerPhone == "") { primaryBorrowerPhone = 0; } if(isCoBorrower == "") { isCoBorrower = 0; } if(mortgageInsurance1 == "") { mortgageInsurance1 = 0; } // if(primaryMortgage1 == 0) { primaryMortgage1 = parseFloat(mortgage1MonthlyPayment)+parseFloat(mortgage2MonthlyPayment); // } primaryTotalHouseHoldExpenses = parseFloat(primaryMortgage1)+parseFloat(HOAFees1); primaryTotalHouseHoldExpenses += parseFloat(taxes1) + parseFloat(insurance1); primaryTotalHouseHoldExpenses += parseFloat(otherMortgage1)+parseFloat(creditCards1); primaryTotalHouseHoldExpenses += parseFloat(autoLoan1)+parseFloat(childSupportOrAlimonyMonthly1); primaryTotalHouseHoldExpenses += parseFloat(unsecuredLoans1)+parseFloat(studentLoans1); primaryTotalHouseHoldExpenses += parseFloat(careAmt1)+parseFloat(allInsurance1)+parseFloat(groceries1); primaryTotalHouseHoldExpenses += parseFloat(carExpenses1)+parseFloat(medicalBill1); primaryTotalHouseHoldExpenses += parseFloat(entertainment1)+ parseFloat(other1); primaryTotalHouseHoldExpenses += parseFloat(cable1)+ parseFloat(natural1); primaryTotalHouseHoldExpenses += parseFloat(water1)+ parseFloat(internet1); primaryTotalHouseHoldExpenses += parseFloat(utilityOther1)+ parseFloat(electricity1); primaryTotalHouseHoldExpenses += parseFloat(primaryBorrowerPhone)+parseFloat(mortgageInsurance1); primaryTotalHouseHoldExpenses = parseFloat(primaryTotalHouseHoldExpenses); primaryTotalHouseHoldExpenses = primaryTotalHouseHoldExpenses.toFixed(2); try { document.getElementById("primTotalHouseHoldExpenses").innerHTML = primaryTotalHouseHoldExpenses; } catch(e) {} if(isCoBorrower == 1) { try { coTotalHouseHoldExpenses = document.getElementById("coTotalHouseHoldExpenses").innerHTML; coTotalHouseHoldExpenses = trim(coTotalHouseHoldExpenses); } catch(e) {} } if(coTotalHouseHoldExpenses == "") { coTotalHouseHoldExpenses = 0; } coTotalHouseHoldExpenses = parseFloat(coTotalHouseHoldExpenses); totalHouseHoldExpenses = parseFloat(primaryTotalHouseHoldExpenses) + coTotalHouseHoldExpenses; totalHouseHoldExpenses = parseFloat(totalHouseHoldExpenses); totalHouseHoldExpenses = totalHouseHoldExpenses.toFixed(2); try { document.getElementById("totalHouseHoldExpenses").innerHTML = totalHouseHoldExpenses; } catch(e) {} try { totalHouseHoldIncome = document.getElementById("totalHouseHoldIncome").innerHTML; totalHouseHoldIncome = trim(totalHouseHoldIncome); } catch(e) {} if(totalHouseHoldIncome == "") { totalHouseHoldIncome = 0; } try { document.getElementById("subTotalHouseHoldIncome").innerHTML = totalHouseHoldIncome; } catch(e) {} try { document.getElementById("subTotalHouseHoldExpenses").innerHTML = totalHouseHoldExpenses; } catch(e) {} totalDisposableIncome = parseFloat(totalHouseHoldIncome) - totalHouseHoldExpenses; totalDisposableIncome = parseFloat(totalDisposableIncome); totalDisposableIncome = totalDisposableIncome.toFixed(2); try { document.getElementById("totalDisposableIncome").innerHTML = totalDisposableIncome; } catch(e) {} calculateIncomeDTI(); } /* * Calculate CoBorrower Total HouseHold Expenses. */ function calculateCoBorrowerTotalHouseHoldExpenses(currentvalue) { var otherMortgage2 = 0; var creditCards2 = 0; var autoLoan2 = 0; var childSupportOrAlimonyMonthly2 = 0; var unsecuredLoans2 = 0; var studentLoans2 = 0; var careAmt2 = 0; var allInsurance2 = 0; var groceries2 = 0; var carExpenses2 = 0; var medicalBill2 = 0; var entertainment2 = 0; var other2 = 0; var coBorrowerTotalHouseHoldExpenses = 0; var cable2 = ""; var natural2 = ""; var water2 = ""; var internet2 = ""; var utilityOther2 = ""; var electricity2 = ""; var coBorrowerPhone = ""; var primaryTotalHouseHoldExpenses = ""; var totalHouseHoldIncome = 0; var totalHouseHoldExpenses = 0; var totalDisposableIncome = 0; alertToEnterInput(currentvalue); try { otherMortgage2 = document.loanModForm.otherMortgage2.value; } catch(e) {} try { creditCards2 = document.loanModForm.creditCards2.value; } catch(e) {} try { autoLoan2 = document.loanModForm.autoLoan2.value; } catch(e) {} try { unsecuredLoans2 = document.loanModForm.unsecuredLoans2.value; } catch(e) {} try { studentLoans2 = document.loanModForm.studentLoans2.value; } catch(e) {} try { childSupportOrAlimonyMonthly2 = document.loanModForm.childSupportOrAlimonyMonthly2.value; } catch(e) {} try { careAmt2 = document.loanModForm.careAmt2.value; } catch(e) {} try { allInsurance2 = document.loanModForm.allInsurance2.value; } catch(e) {} try { groceries2 = document.loanModForm.groceries2.value; } catch(e) {} try { carExpenses2 = document.loanModForm.carExpenses2.value; } catch(e) {} try { medicalBill2 = document.loanModForm.medicalBill2.value; } catch(e) {} try { entertainment2 = document.loanModForm.entertainment2.value; } catch(e) {} try { other2 = document.loanModForm.other2.value; } catch(e) {} try { cable2 = document.loanModForm.cable2.value; } catch(e) {} try { natural2 = document.loanModForm.natural2.value; } catch(e) {} try { water2 = document.loanModForm.water2.value; } catch(e) {} try { internet2 = document.loanModForm.internet2.value; } catch(e) {} try { utilityOther2 = document.loanModForm.utilityOther2.value; } catch(e) {} try { electricity2 = document.loanModForm.electricity2.value; } catch(e) {} try { coBorrowerPhone = document.loanModForm.coBorrowerPhone.value; } catch(e) {} otherMortgage2 = replaceCommaValues(otherMortgage2); creditCards2 = replaceCommaValues(creditCards2); autoLoan2 = replaceCommaValues(autoLoan2); unsecuredLoans2 = replaceCommaValues(unsecuredLoans2); studentLoans2 = replaceCommaValues(studentLoans2); creditCards2 = replaceCommaValues(creditCards2); childSupportOrAlimonyMonthly2 = replaceCommaValues(childSupportOrAlimonyMonthly2); creditCards2 = replaceCommaValues(creditCards2); careAmt2 = replaceCommaValues(careAmt2); allInsurance2 = replaceCommaValues(allInsurance2); groceries2 = replaceCommaValues(groceries2); carExpenses2 = replaceCommaValues(carExpenses2); medicalBill2 = replaceCommaValues(medicalBill2); entertainment2 = replaceCommaValues(entertainment2); other2 = replaceCommaValues(other2); cable2 = replaceCommaValues(cable2); natural2 = replaceCommaValues(natural2); water2 = replaceCommaValues(water2); internet2 = replaceCommaValues(internet2); utilityOther2 = replaceCommaValues(utilityOther2); electricity2 = replaceCommaValues(electricity2); coBorrowerPhone = replaceCommaValues(coBorrowerPhone); if(otherMortgage2 == "") { otherMortgage2 = 0; } if(creditCards2 == "") { creditCards2 = 0; } if(autoLoan2 == "") { autoLoan2 = 0; } if(unsecuredLoans2 == "") { unsecuredLoans2 = 0; } if(studentLoans2 == "") { studentLoans2 = 0; } if(childSupportOrAlimonyMonthly2 == "") { childSupportOrAlimonyMonthly2 = 0; } if(careAmt2 == "") { careAmt2 = 0; } if(allInsurance2 == "") { allInsurance2 = 0; } if(groceries2 == "") { groceries2 = 0; } if(carExpenses2 == "") { carExpenses2 = 0; } if(medicalBill2 == "") { medicalBill2 = 0; } if(entertainment2 == "") { entertainment2 = 0; } if(other2 == "") { other2 = 0; } if(cable2 == "") { cable2 = 0; } if(natural2 == "") { natural2 = 0; } if(water2 == "") { water2 = 0; } if(internet2 == "") { internet2 = 0; } if(utilityOther2 == "") { utilityOther2 = 0; } if(electricity2 == "") { electricity2 = 0; } if(coBorrowerPhone == "") { coBorrowerPhone = 0; } coBorrowerTotalHouseHoldExpenses = parseFloat(otherMortgage2)+parseFloat(creditCards2); coBorrowerTotalHouseHoldExpenses += parseFloat(autoLoan2)+parseFloat(childSupportOrAlimonyMonthly2); coBorrowerTotalHouseHoldExpenses += parseFloat(unsecuredLoans2)+parseFloat(studentLoans2); coBorrowerTotalHouseHoldExpenses += parseFloat(careAmt2)+parseFloat(allInsurance2)+parseFloat(groceries2); coBorrowerTotalHouseHoldExpenses += parseFloat(carExpenses2)+parseFloat(medicalBill2); coBorrowerTotalHouseHoldExpenses += parseFloat(entertainment2)+ parseFloat(other2); coBorrowerTotalHouseHoldExpenses += parseFloat(cable2)+ parseFloat(natural2); coBorrowerTotalHouseHoldExpenses += parseFloat(water2)+ parseFloat(internet2); coBorrowerTotalHouseHoldExpenses += parseFloat(utilityOther2)+ parseFloat(electricity2); coBorrowerTotalHouseHoldExpenses += parseFloat(coBorrowerPhone); coBorrowerTotalHouseHoldExpenses = parseFloat(coBorrowerTotalHouseHoldExpenses); coBorrowerTotalHouseHoldExpenses = coBorrowerTotalHouseHoldExpenses.toFixed(2); try { document.getElementById("coTotalHouseHoldExpenses").innerHTML = coBorrowerTotalHouseHoldExpenses; } catch(e) {} try { primaryTotalHouseHoldExpenses = document.getElementById("primTotalHouseHoldExpenses").innerHTML; primaryTotalHouseHoldExpenses = trim(primaryTotalHouseHoldExpenses); } catch(e) {} if(primaryTotalHouseHoldExpenses == "") { primaryTotalHouseHoldExpenses = 0; } primaryTotalHouseHoldExpenses = parseFloat(primaryTotalHouseHoldExpenses); totalHouseHoldExpenses = primaryTotalHouseHoldExpenses + parseFloat(coBorrowerTotalHouseHoldExpenses); totalHouseHoldExpenses = parseFloat(totalHouseHoldExpenses); totalHouseHoldExpenses = totalHouseHoldExpenses.toFixed(2); try { document.getElementById("totalHouseHoldExpenses").innerHTML = totalHouseHoldExpenses; } catch(e) {} try { totalHouseHoldIncome = document.getElementById("totalHouseHoldIncome").innerHTML; totalHouseHoldIncome = trim(totalHouseHoldIncome); } catch(e) {} if(totalHouseHoldIncome == "") { totalHouseHoldIncome = 0; } try { document.getElementById("subTotalHouseHoldIncome").innerHTML = totalHouseHoldIncome; } catch(e) {} try { document.getElementById("subTotalHouseHoldExpenses").innerHTML = totalHouseHoldExpenses; } catch(e) {} totalDisposableIncome = parseFloat(totalHouseHoldIncome) - totalHouseHoldExpenses; totalDisposableIncome = parseFloat(totalDisposableIncome); totalDisposableIncome = totalDisposableIncome.toFixed(2); try { document.getElementById("totalDisposableIncome").innerHTML = totalDisposableIncome; } catch(e) {} calculateIncomeDTI(); } /* * Save - Tab2. */ function checkIncomeInfo() { var formVal1 = false; formVal1 = validateIncomeInfo(); if(formVal1) { document.loanModForm.action = sslUrl+"incomeInfoSave.php"; document.loanModForm.submit(); } } /* * Validate Registration Form - Tab2. */ function validateIncomeInfo() { if(chkIsBlank('loanModForm','grossIncome1','Please Enter Total Gross Income') && chkIsBlank('loanModForm','netMonthlyIncome1','Please Enter Net Monthly Income') && chkIsBlank('loanModForm','electricity1','Please Enter Electricity') ){ return true; } else { return false; } } /* * Validate Upload Form. */ function validateUploadForm() { var path = document.loanModForm.fileSrc.value; var path_len = path.length; var file_length = path.lastIndexOf('\\'); var fileName = path.substring(file_length+1,path_len); if (path =="") { alert("Select the document"); document.loanModForm.fileSrc.focus(); document.getElementById("fileSrc").className = "clsHighlights"; return false; } path_len = path.length; file_extension = path.lastIndexOf('.'); file_ext_string = path.substring(file_extension+1,path_len); if ((file_ext_string == "pdf") || (file_ext_string == "PDF")|| (file_ext_string == "doc") || (file_ext_string == "DOC") || (file_ext_string == "docx") || (file_ext_string == "DOCX") || (file_ext_string == "xls") || (file_ext_string == "XLS") || (file_ext_string == "xlsx") || (file_ext_string == "XLSX") || (file_ext_string == "jpg") || (file_ext_string == "jpeg") || (file_ext_string == "JPG") || (file_ext_string == "JPEG") || (file_ext_string == "pjpeg") || (file_ext_string == "gif") || (file_ext_string == "PJPEG") || (file_ext_string == "GIF") || (file_ext_string == "png") || (file_ext_string == "PNG") || (file_ext_string == "html") || (file_ext_string == "HTML") || (file_ext_string == "htm") || (file_ext_string == "HTM") || (file_ext_string == "shtml") || (file_ext_string == "SHTML") ) { } else { alert ("File types allowed are pdf, doc, docx, xls, xlsx, gif, jpeg, png, html, htm, shtml."); return false; } document.getElementById("divLoader").style.display="block"; setTimeout("formSubmit()" , 1000); return false; } function formSubmit() { document.loanModForm.action = sslUrl+"uploadLMRDocProcess.php"; document.loanModForm.submit(); } function docFormSubmit() { document.loanModForm.action = sslUrl+"LMRFormSubmit.php"; document.loanModForm.submit(); } function deleteUploadDoc(docId,executiveId) { var confrim = confirm("Are you sure want to delete this document?"); if(confrim) { window.location.href= sslUrl+"deleteBrokerDoc.php?dId="+docId; } } /* * Auto Populate Primary Address as Property Address. */ function autoPopulatePropAddress() { try { document.loanModForm.mailingAddress.value = document.loanModForm.propertyAddress.value; } catch(e) {} try { document.loanModForm.mailingCity.value = document.loanModForm.propertyCity.value; } catch(e) {} try { document.loanModForm.mailingState.value = document.loanModForm.propertyState.value; } catch(e) {} try { document.loanModForm.mailingZip.value = document.loanModForm.propertyZip.value; } catch(e) {} } /* * Clear Property Address. */ function clearPropAddress() { try { document.loanModForm.mailingAddress.value = ""; } catch(e) {} try { document.loanModForm.mailingCity.value = ""; } catch(e) {} try { document.loanModForm.mailingState.value = ""; } catch(e) {} try { document.loanModForm.mailingZip.value = ""; } catch(e) {} } /* * Show Div To Enter / Select Broker Info. */ function showLMRBrokerDiv(opt,divId,cnt,userType,userValue) { var brokerNumber = 0; if(opt == 'show') { displayOpt = "block"; } else { displayOpt = "none"; } try { brokerNumber = document.loanModForm.bn.value; } catch(e) {} if(brokerNumber > 0) { } else { for(var cl=1;cl<=cnt;cl++) { try { eval("document.getElementById('"+divId+cl+"').style.display = displayOpt"); } catch(e) {} } } if(userType == "Client") { document.getElementById('LMRBRDiv3').style.display = "none"; // document.getElementById('userInfoDiv').style.display = "none"; } document.loanModForm.userType.value = userValue; /* if(userValue == 'Homeowner') { document.getElementById('fileSubStatusDiv1').style.display = "none"; document.getElementById('fileSubStatusDiv2').style.display = "none"; } else { document.getElementById('fileSubStatusDiv1').style.display = "block"; document.getElementById('fileSubStatusDiv2').style.display = "block"; } */ } /* * Update Broker Number when user Selects a Broker. */ function updateLMRBrokerNo() { var chk = false, brokerNumber = 0; var len = 0; try{ len = document.loanModUserForm.LMRBroker.length; } catch(e) {} for(var lb=0;lb"; } } function generateNewBrokerList(newBrokerNumber) { var brokerInfoArray = new Array(), executiveId = 0; executiveId = document.loanModForm.executiveId.value; var url = "listAllLMRAEBroker.php"; var qstr = "eId="+executiveId; try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} try { preferredBrokerInfoArray = xmlDoc.getElementsByTagName("preferredBrokerInfo"); } catch (e) {} var brokerInfoArray = getNewObject("LMRBroker"); brokerInfoArray.options[0] = new Option("- Select / New -","", false); for(var bc=0;bc maxlimit) { obj.value = obj.value.substring(0, maxlimit); alert('Maximum allowed character '+ maxlimit); document.getElementById("countfield").innerHTML = maxlimit - obj.value.length; } else { document.getElementById("countfield").innerHTML = maxlimit - obj.value.length; } } function createProposalPDF() { var LMRResponseId = 0, executiveId = 0, brokerNumber = 0, LMRId = 0, url = ""; try{ LMRResponseId = document.loanModForm.encryptedRId.value; } catch(e) {} try{ executiveId = document.loanModForm.encryptedEId.value; } catch(e) {} try{ LMRId = document.loanModForm.encryptedLId.value; } catch(e) {} try{ brokerNumber = document.loanModForm.encryptedBId.value; } catch(e) {} url = siteUrl+"createLoanModProposalPDF.php?rId="+LMRResponseId+"&eId="+executiveId+"&bn="+brokerNumber+"&lId="+LMRId; day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left=100,top=100');"); } function getHardshipValue() { var len = 0, chk = false, selVal = "", hardship = "",ll = 0; try { len = document.loanModForm.hardship.length; } catch(e) {} for(var l=0;l < len;l++) { var chk = false,selVal = ""; try { eval("chk = document.loanModForm.hardship["+l+"].checked"); } catch(e) {} if(chk) { try { eval("selVal = document.loanModForm.hardship["+l+"].value"); } catch(e) {} if(ll == 0) { hardship = selVal; } else { hardship += ", "+selVal; } ll++; } } try{ document.loanModForm.hardshipValue.value = hardship; } catch(e) {} } function checkHardshipInfo() { return true; } function submitHardshipForm() { document.getElementById("divLoader").style.display="block"; document.loanModForm.action=sslUrl+"hardshipInfoSave.php"; document.loanModForm.submit(); } function calcluateTotalPayment(formName,targetFld) { var lien1Payment = 0, taxes1 = 0, insurance1 = 0, mortgageInsurance1 = 0, HOAFees1 = 0; var totalPayment = 0; try { eval("lien1Payment = document."+formName+".lien1Payment.value"); } catch(e) {} try { eval("taxes1 = document."+formName+".taxes1.value"); } catch(e) {} try { eval("insurance1 = document."+formName+".insurance1.value"); } catch(e) {} try { eval("mortgageInsurance1 = document."+formName+".mortgageInsurance1.value"); } catch(e) {} try { eval("HOAFees1 = document."+formName+".HOAFees1.value"); } catch(e) {} lien1Payment = replaceCommaValues(lien1Payment); taxes1 = replaceCommaValues(taxes1); insurance1 = replaceCommaValues(insurance1); mortgageInsurance1 = replaceCommaValues(mortgageInsurance1); HOAFees1 = replaceCommaValues(HOAFees1); if(lien1Payment == "") { lien1Payment = 0; } if(taxes1 == "") { taxes1 = 0; } if(insurance1 == "") { insurance1 = 0; } if(mortgageInsurance1 == "") { mortgageInsurance1 = 0; } if(HOAFees1 == "") { HOAFees1 = 0; } totalPayment = parseFloat(lien1Payment) + parseFloat(taxes1) + parseFloat(insurance1); totalPayment += parseFloat(mortgageInsurance1) + parseFloat(HOAFees1); try { eval("document."+formName+"."+targetFld+".value = totalPayment"); } catch(e) {} } function updateLenderName(fldName,trgtName) { var lenderName = ""; try { eval("lenderName = document.loanModForm."+fldName+".value"); } catch(e) {} try { eval("document.loanModForm."+trgtName+".value = lenderName"); } catch(e) {} disableLenderEdit(fldName, trgtName); } function showQADivs(divId1,divId2,opt) { if(opt == "show") { try { document.getElementById(divId1).style.display = "block"; } catch(e) {} try { document.getElementById(divId2).style.display = "block"; } catch(e) {} } else { try { document.getElementById(divId1).style.display = "none"; } catch(e) {} try { document.getElementById(divId2).style.display = "none"; } catch(e) {} } } /* * Save - Tab7. */ function checkQAInfo() { var formVal1 = false; formVal1 = validateQAInfo(); if(formVal1) { document.loanModForm.action = sslUrl+"QAInfoSave.php"; document.loanModForm.submit(); } } /* * Validate Registration Form - Tab7. */ function validateQAInfo() { var amountOfOffer = ""; var condominiumOrHOAFeeAmt = ""; var addLien1Balance = ""; var addLien2Balance = ""; var addLien3Balance = ""; var addLien4Balance = ""; var addLien5Balance = ""; amountOfOffer = document.loanModForm.amountOfOffer.value; condominiumOrHOAFeeAmt = document.loanModForm.condominiumOrHOAFeeAmt.value; addLien1Balance = document.loanModForm.addLien1Balance.value; addLien2Balance = document.loanModForm.addLien2Balance.value; addLien3Balance = document.loanModForm.addLien3Balance.value; addLien4Balance = document.loanModForm.addLien4Balance.value; addLien5Balance = document.loanModForm.addLien5Balance.value; if(chkIsCheck('loanModForm','receiveNotice','Please Choose Did homeowner receive notice?') && chkIsCheck('loanModForm','mortgageLates','Please Choose Is the mortgage currently behind?') && // chkIsBlank('loanModForm','checkingAndSavings','Please Enter Total amount in Checking and Savings')&& checkNumber('loanModForm','noOfPeopleInProperty','How many people live in the property')&& checkValidNumber('loanModForm','noOfPeopleDependent','How many are dependents')&& checkNumber('loanModForm','yearsInProp','How many years have you lived in the property')&& chkIsCheck('loanModForm','stayInHome','Please Choose Do you want to stay in this home?') && chkIsCheck('loanModForm','homeListedForSale','Please Choose Is this home currently listed for sale?') && chkIsCheck('loanModForm','homeVacant','Please Choose Is this home currently vacant?') && chkIsCheck('loanModForm','seriousNeedRepair','Please Choose Is the home in serious need of repair?') && chkIsCheck('loanModForm','homeMortgageClosed','Please Choose Did you close on the mortgage?') && chkIsCheck('loanModForm','bankruptcy','Please Choose Are you in bankruptcy?') && chkIsCheck('loanModForm','creditCounselling','Please Choose Are in you credit counseling?') && isDateOKForMMDDYY('loanModForm','noticeReceivedDate','Notice of Default received')&& isDateOKForMMDDYY('loanModForm','summonDate','Notice of summons')&& isDateOKForMMDDYY('loanModForm','loanSalesDate','Sales Date')&& isDateOKForMMDDYY('loanModForm','dateOfOffer','Date of offer')&& isDateOKForMMDDYY('loanModForm','bankruptcyFilingDate','Filing Date')&& checkValidNumber('loanModForm','bankruptcyCaseNumb','Bankruptcy Case number') ){ if( (alertToNumericValueForQA(amountOfOffer)) && (alertToNumericValueForQA(condominiumOrHOAFeeAmt)) && (alertToNumericValueForQA(addLien1Balance)) && (alertToNumericValueForQA(addLien2Balance)) && (alertToNumericValueForQA(addLien3Balance)) && (alertToNumericValueForQA(addLien4Balance)) && (alertToNumericValueForQA(addLien5Balance)) ) { return true; } else { return false; } } else { return false; } } function alertToNumericValueForQA(currentvalue) { currentvalue1 = trim(currentvalue); currentvalue = replaceCommaValues(currentvalue); if((currentvalue1 != "") && (currentvalue == "")) { alert('Please make sure you have entered only numeric values in the fields'); return false; } else if ((currentvalue1 > 0) && (currentvalue == 0)){ alert('Please make sure you have entered only numeric values in the fields'); return false; } else { return true; } } /* * Save/Delete Hardship Template. */ function saveHardshipTemplate(divId,tempHardship,LMRId,hardshipNo) { var harshipValue = ""; var chk = false; var confirmMsg = false; var xmlDoc = false; try{ eval("chk = document.loanModForm."+divId+".checked"); } catch(e) {} if(chk) { try{ eval("harshipValue = document.loanModForm."+divId+".value"); } catch(e) {} try { showProgressBar(hardshipWaitMsg); } catch(e) {} setTimeout("saveTemplateInDB('"+divId+"','"+harshipValue+"','"+LMRId+"','"+hardshipNo+"')","500"); } else { confirmMsg = confirm("Do you want to delete this hardship?"); if(confirmMsg) { try { showProgressBar(hardshipWaitMsg); } catch(e) {} setTimeout("deleteHardshipTemplate('"+hardshipNo+"')","200"); } } } function deleteHardshipTemplate(hardshipNo) { var xmlDoc = ""; var url = "loanModification/deleteHardshipTemplate.php"; var qstr = "",lenderNo = 0, company = ""; qstr = "hId="+hardshipNo; try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} try { status = xmlDoc.getElementsByTagName("status")[0].firstChild.nodeValue;; } catch (e) {} window.location.reload(); } function saveHardshipTemplateInDB(divId,tempHardship,LMRId,hardshipId) { day = new Date(); id = day.getTime(); var chk = false; try { eval("chk = document.loanModForm."+divId+".checked"); } catch(e) {} if(chk) { } else { try { eval("document.loanModForm."+divId+".checked = true"); } catch(e) {} } if(hardshipId == "") { try { showProgressBar(hardshipWaitMsg); } catch(e) {} setTimeout("saveTemplateInDB('"+divId+"','"+tempHardship+"','"+LMRId+"','"+hardshipId+"')","500"); } else { alert('You have already saved. You can edit this hardship explanation by clicking the Edit Link below.'); } } /* * Hardship Template Save When User Click Harship. */ function saveTemplateInDB(divId,tempHardship,LMRId,hardshipId) { var templateContent = "",chk = false,len = 0, hardshipType = ""; try{ eval("chk = document.loanModForm."+divId+".checked"); } catch(e) {} try{ eval("len = document.loanModHardshipForm.hardshipType.length"); } catch(e) {} for(var h=0;h" setTimeout("getHardshipTemplate('"+hardshipId+"','"+tempHardship+"','"+LMRId+"')",700); } function getHardshipTemplate(hardshipId,tempHardship,LMRId) { var url = "loanModification/getHardshipTemplate.php"; var qstr = "hId="+hardshipId; var xmlDoc = ""; var status = "",templateContent = "",tempTemplateContent = ""; var display = "",tempTemplateContent = "", len = 0, hardshipType = ""; try{ eval("len = document.loanModHardshipForm.hardshipType.length"); } catch(e) {} for(var h=0;h"; display += ""; display += ""; display += "
"; display += ""; document.getElementById("hardshipTemplate").innerHTML = display; } function saveHardshipContent(tempHardship,LMRId,hardshipId) { var templateContent = "", len = 0, hardshipType = ""; templateContent = document.hardshipTemplateForm.contentText.value; try{ eval("len = document.loanModHardshipForm.hardshipType.length"); } catch(e) {} for(var h=0;h 0) { pkgCnt++; } } for(var p=0;p 0) { selectedPkg += ","; } selectedPkg += pkgId; pkg++; } } try { branchDocLen = document.pkgForm.branchDocCnt.value; } catch(e) {} for(var doc=0;doc 0) { docValues += ","; } docValues += docVal; doc1++; } } if(doc1 > 0) { document.pkgForm.sel_branch_doc.value = docValues; } if(((selectedPkg == 0) || (selectedPkg == "")) && (!pkg_inst) && (!pkg_profit) && ((doc1 == 0) || (doc1 == "")) ) { alert("Please select any package"); return false; } } else { try { servicer2 = document.pkgForm.servicer2.value; servicer2 = trim(servicer2); } catch(e) {} if(servicer2 != "") { if(pkgCnt > 0) { pkgCnt++; } } for(var p=0;p 0) { selectedPkg += ","; } selectedPkg += pkgId; pkg++; } } try{ document.pkgForm.selectedPkg.value = selectedPkg; } catch(e) {} try { pkg_proposal_bank = document.pkgForm.pkg_proposal_bank.checked; } catch(e) {} try { pkg_proposal_agent = document.pkgForm.pkg_proposal_agent.checked; } catch(e) {} try { pkg_1stlien_third = document.pkgForm.pkg_1stlien_third.checked; } catch(e) {} try { pkg_2ndlien_third = document.pkgForm.pkg_2ndlien_third.checked; } catch(e) {} try { pkg_homeowner = document.pkgForm.pkg_homeowner.checked; } catch(e) {} try { pkg_payment_form = document.pkgForm.pkg_payment_form.checked; } catch(e) {} try { branchDocLen = document.pkgForm.branchDocCnt.value; } catch(e) {} for(var doc=0;doc 0) { docValues += ","; } docValues += docVal; doc1++; } } if(doc1 > 0) { document.pkgForm.sel_branch_doc.value = docValues; } if(((selectedPkg == 0) || (selectedPkg == "")) && (!pkg_proposal_bank) && (!pkg_proposal_agent) && (!pkg_1stlien_third) && (!pkg_2ndlien_third) && (!pkg_homeowner) && (!pkg_payment_form) && (!pkg_income) && (!pkg_hardship) && (!pkg_4506) && (!pkg_HAM) && ((doc1 == 0) || (doc1 == "")) ) { alert("Please select any package"); return false; } } try{ document.pkgForm.selectedPkg.value = selectedPkg; } catch(e) {} var pkg_broker = false, pkg_AE = false, pkg_borrower = false, pkg_coBorrower = false, pkg_emp = "", ee = 0,empCnt = 0; try { pkg_broker = document.pkgForm.pkg_broker.checked; } catch(e) {} try { pkg_AE = document.pkgForm.pkg_AE.checked; } catch(e) {} try { pkg_borrower = document.pkgForm.pkg_borrower.checked; } catch(e) {} try { pkg_coBorrower = document.pkgForm.pkg_coBorrower.checked; } catch(e) {} try { empCnt = document.pkgForm.empCnt.value; } catch(e) {} for(var e=0;e 0) { pkg_emp += ","; } pkg_emp += empId; ee++; } } try{ document.pkgForm.pkg_emp.value = pkg_emp; } catch(e) {} if((!pkg_broker) && (!pkg_AE) && (!pkg_borrower) && (!pkg_coBorrower) && ((pkg_emp == 0) || (pkg_emp == ""))) { alert("Please select any recipient"); return false; } else { return true; } } function addNewCreditors() { openMyPopup('divCreditorInfo','680','470','Creditors'); setTimeout("newCreditorsForm()",200); } function newCreditorsForm() { document.getElementById("creditorInfoMsg").style.display = "block"; document.getElementById("creditorInfoWaitMsg").style.display = "none"; } function closeCreditorPopup() { closeMyPopup('divCreditorInfo'); } function editCreditors(creditorId) { openMyPopup('divCreditorInfo','680','470','Creditors'); setTimeout("fillCreditorsForm('"+creditorId+"')",200); } function fillCreditorsForm(creditorId) { var xmlDoc = "", url = "", qstr = "", status = ""; var creditorInfoArray = new Array(); var creditorName = "", creditorAcctNumber = "", creditorType = ""; var creditorAcctType = "", creditorMinPayment = "", creditorMonthsBehind = ""; var creditorAcctBalance = "", creditorRepName = "", creditorRepPhoneNo1 = ""; var creditorRepPhoneNo2 = "", creditorRepPhoneNo3 = "", creditorRepPhoneExt = ""; var creditorRepFax1 = "", creditorRepFax2 = "", creditorRepFax3 = ""; var creditorRepEmail = "", creditorRepNotes = ""; var creditorAgentName = "", creditorAgentPhoneNo1 = "", creditorAgentPhoneNo2 = ""; var creditorAgentPhoneNo3 = "", creditorAgentPhoneExt = "", creditorAgentFax1 = ""; var creditorAgentFax2 = "", creditorAgentFax3 = "", creditorAgentEmail = ""; var creditorAgentNotes = "",creditorRepPhoneNo = "",creditorRepFax = ""; var creditorAgentPhoneNo = "", creditorAgentFax = "",creditorAcctTypeArray = new Array(); url = "../loanModification/getCreditorInfo.php"; qstr = "CIId="+creditorId; document.loanModCreditorForm.CIId.value = creditorId; try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} try { creditorInfoArray = xmlDoc.getElementsByTagName("creditorInfo"); } catch (e) {} for(var cc=0; cc 0) { selCreditorAcctType += ","; } selCreditorAcctType += creditorAcctType; cc++ } } catch(e) {} } document.loanModCreditorForm.selCreditorAcctType.value = selCreditorAcctType; document.getElementById("creditorInfoMsg").style.display = "none"; document.getElementById("creditorInfoWaitMsg").style.display = "block"; return true; } else { return false; } } function saveCreditorsFormByXML() { var LMRId = 0, creditorName = "", creditorAcctNumber = "", creditorType = ""; var creditorAcctType = "", creditorMinPayment = "", creditorMonthsBehind = ""; var creditorAcctBalance = "", creditorRepName = "", creditorRepPhoneNo1 = ""; var creditorRepPhoneNo2 = "", creditorRepPhoneNo3 = "", creditorRepPhoneExt = ""; var creditorRepFax1 = "", creditorRepFax2 = "", creditorRepFax3 = ""; var creditorRepEmail = "", creditorRepNotes = ""; var creditorAgentName = "", creditorAgentPhoneNo1 = "", creditorAgentPhoneNo2 = ""; var creditorAgentPhoneNo3 = "", creditorAgentPhoneExt = "", creditorAgentFax1 = ""; var creditorAgentFax2 = "", creditorAgentFax3 = "", creditorAgentEmail = ""; var creditorAgentNotes = "",creditorRepPhoneNo = "",creditorRepFax = ""; var creditorAgentPhoneNo = "", creditorAgentFax = ""; var xmlDoc = "", url = "", qstr = "", status = ""; try { LMRId = document.loanModCreditorForm.LMRId.value; } catch (e) {} try { creditorName = document.loanModCreditorForm.creditorName.value; } catch (e) {} try { creditorAcctNumber = document.loanModCreditorForm.creditorAcctNumber.value; } catch (e) {} try { creditorType = document.loanModCreditorForm.creditorType.value; } catch (e) {} try { creditorAcctType = document.loanModCreditorForm.creditorAcctType.value; } catch (e) {} for(var c=0;c" setTimeout("getCreditorNotesInfo('"+encCreditorId+"','"+opt+"')",500); } function getCreditorNotesInfo(encCreditorId,opt) { var url = "";var creditorInfoArray = new Array(); var xmlDoc = "";var creditorRepNotes = "", creditorAgentNotes = ""; var qstr = "";var taskComments = ""; url = "../loanModification/getCreditorInfo.php"; qstr = "CIId="+encCreditorId; try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} try { creditorInfoArray = xmlDoc.getElementsByTagName("creditorInfo"); } catch (e) {} for(var cc=0; cc " setTimeout("getTaskInfo('"+encTaskId+"')",500); } function getTaskInfo(encTaskId) { var url = "";var taskInfoArray = new Array(); var xmlDoc = "";var display = "";var taskStatusArray = new Array(); var qstr = "";var clientName = "";var glTaskStatusArray = new Array(); var subject = "";var clsTask = "";var taskStatus = "";var selOpt = ""; url = "../backoffice/getTaskInfo.php"; qstr = "taskId="+encTaskId; try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} try { taskInfoArray = xmlDoc.getElementsByTagName("taskInfo"); } catch (e) {} try { glTaskStatusArray = xmlDoc.getElementsByTagName("glTaskStatusList"); } catch (e) {} for(var ts=0;ts"; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += ""; display += "
Task Related To: "+clientName+"
Subject: "+subject+"
Status: "; for(var gl=0;gl= 1) { display += "style=\"margin-left:15px;\""; } if(glTaskStatus == taskStatus) { display += "checked"; } display += "> "+glTaskStatus; } display += "
"; display += ""; display += "
"; display += ""; document.getElementById("divTaskStatus").innerHTML = display; } function showTaskComments(encTaskId) { openMyPopup('divTaskComments','540','300','Comments'); document.getElementById("taskComments").innerHTML = "Please Wait.... " setTimeout("getTaskCommentsInfo('"+encTaskId+"')",500); } function getTaskCommentsInfo(encTaskId) { var url = "";var taskInfoArray = new Array(); var xmlDoc = "";var display = "";var taskStatusArray = new Array(); var qstr = "";var taskComments = ""; url = "../backoffice/getTaskInfo.php"; qstr = "taskId="+encTaskId; try { xmlDoc = getXMLDoc(url,qstr); } catch (e) {} try { taskInfoArray = xmlDoc.getElementsByTagName("taskInfo"); } catch (e) {} for(var ts=0;ts