function confirmTpDelete(tpid, tpname, type) { var msg = "Are you sure you want to totally delete this third party:\n'"+tpname+"'?"; if(confirm(msg) == true) { self.location.href = '/admin/thirdparties/'+type+'/delete?id='+tpid; } else { return; } } function redirectAfterDelete(previousquery) { self.location.href = "index?previousquery=" + previousquery; } function verifyNewTP(id) { self.location.href = "index?verify_id=" + id + "&verify=1"; } function redirectAfterVerify() { self.location.href = "index"; } function confirmNoteDelete(tp, note) { if (confirm("Are you sure you wish to delete this note?")) { self.location.href = "view?id=" + tp + "&deletenote_id=" + note; } else { return; } } function editTP(id, previousquery) { var newWindow; var pageName = "edit?edit_id="+agentid+'&previousquery='+previousquery+'&agent_tablename='+table; newWindow = window.open(pageName, "editagent", "scrollbars=yes, width=650, height=500"); } function editMember(memberid, previousquery, table) { var newWindow; var pageName = "edit?edit_id="+memberid+'&previousquery='+previousquery+'&member_tablename='+table; newWindow = window.open(pageName, "editmember", "scrollbars=yes, width=650, height=500"); } function emailAgent(agentid, previousquery, table) { var newWindow; var pageName = "email?email_id="+agentid+'&previousquery='+previousquery+'&agent_tablename='+table; newWindow = window.open(pageName, "emailagent", "scrollbars=yes, width=650, height=500"); } function confirmRefund(adviserid, leadid){ var msg = "Are you sure you want refund this lead ?"; if(confirm(msg) == true) { var newWindow; var pageName = "/admin/mortgages/refundlead?adviserid="+adviserid+"&leadid="+leadid; newWindow = window.open(pageName, "addnewnote", "width=300, height=300"); return; } else return; } function confirmArea(adviserid, areaid){ var msg = "Are you sure you want delete this postcode block?"; if(confirm(msg) == true) { self.location.href = '/admin/mortgages/view?adviser_id='+adviserid+'&deletearea_id='+areaid; } else return; } function addNewNote(tp) { return window.open("note?tpid=" + tp, "addnewnote", "width=300, height=320"); } function editNote(tp, note) { var newWindow; var pageName = "note?tpid=" + tp + "¬eid=" + note + "&edit=1"; newWindow = window.open(pageName, "editnote", "width=300, height=320"); } function addNewPostcodeBlock(adviserid) { var newWindow; var pageName = "/admin/mortgages/addpostcodeblock?adviserid="+adviserid; newWindow = window.open(pageName, "addpostcodeblock", "width=300, height=300"); } function addNewPayment(adviserid) { var newWindow; var pageName = "/admin/mortgages/payment?adviserid="+adviserid; newWindow = window.open(pageName, "addpayment", "width=300, height=300"); } function editPayment(adviserid, paymentid) { var newWindow; var pageName = "/admin/mortgages/payment?adviserid="+adviserid+"&paymentid="+paymentid; newWindow = window.open(pageName, "editpayment", "width=300, height=300"); } function paymentReceived(adviserid, paymentid) { var msg = "Click 'ok' if you have received this payment"; if(confirm(msg) == true) { self.location.href = '/admin/mortgages/view?adviser_id='+adviserid+'&makePaymentID='+paymentid; } else return; } function editAdviser(adviserid) { var newWindow; var pageName = "/admin/mortgages/edit?adviserid="+adviserid; newWindow = window.open(pageName, "editpayment", "width=650, height=430"); } function completeNote(tp, note) { var msg = "Choose 'OK' if you have dealt with this note."; if (confirm(msg) == true) self.location.href = 'view?id=' + tp + '&completeNoteID=' + note; else return; } function hi(linkid) { var obj = document.getElementById("link"+linkid); obj.className = "hi"; } function lo(linkid) { var obj = document.getElementById("link"+linkid); obj.className = "lo"; } function showhelp(helpid) { var obj = document.getElementById("help"+helpid); if (obj.className == "helpvisible") { obj.className = "help"; } else { obj.className = "helpvisible"; } } var ajax; var browser = navigator.appName; function fsasearch_init() { if(window.XMLHttpRequest) { try { ajax = new XMLHttpRequest(); } catch(e) { ajax = false; } } else if(window.ActiveXObject) { try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { ajax = false; } } } return ajax; } function fsasearch_run(id) { ajax.open('get', '/admin/thirdparties/fsasearch?id='+id); ajax.send(null); ajax.onreadystatechange = function() { fsasearch_response(); } return false; } function fsasearch_response() { if(ajax.readyState == 4) { var response = ajax.responseText; document.getElementById('fsaresult').style.display='block'; document.getElementById('fsaresulttext').innerHTML="
"+response+"
"; } }