﻿function GetImagePath(a) { return '<img src="' + a + '" id="bubbleHelperImage" />' } function GetBody(a, b) { jQuery.ajax({ type: "POST", url: b, data: "[]", success: function (b) { jQuery(a).html(b) }, error: function () { AjaxError } }) } function GetHtml(a) { return template.header() + GetBody("#bubbleHelperBody", a) + template.footer() } function InitShortList() { if (typeof shortList == "undefined") { return } shortList.Init() } function LoadProductListResultPromo() { var a = $("#productListResultPromoContent"); var b = a.html(); if (b != "") { var c = $("<tr><td class='productListResultPromo' /></tr>"); var d = $(".rowStart td").length; var e = c.find("td").attr("colspan", d).html(b); $(".IC_Grid .rowHead:last").after(c) } } function LoadCssFile(a) { $("head").append("<link>"); css = $("head").children(":last"); css.attr({ rel: "stylesheet", type: "text/css", href: a }) } function selectTabCreditCards(a) { jQuery("#divOtherCharges").toggle(); jQuery("#divFeeAndRepayments").toggle(); jQuery("#liFeeAndRepayments").toggleClass("on"); jQuery("#liOtherCharges").toggleClass("on") } function LifeInsuranceContactMeClick(a, b) { var c = jQuery("#" + a).get(0); var d = jQuery("#" + b).val(); var e = c.options[c.selectedIndex].text; jQuery.ajax({ type: "POST", url: "/Handler/LifeInsuranceContactMeClickHandler.ashx", data: { ContactMeOption: e, QuoteId: d }, success: function (a) { var b = a || "no response text"; jQuery("#update_div").html(b) }, error: function () { } }) } function sortSelect(a, b, c) { if (arguments.length == 1) b = true; var d = []; for (var e = 0; e < a.options.length; e++) { d[e] = { optText: a.options[e].text, optValue: a.options[e].value} } if (b) { d.sort(sortFuncAsc) } else { d.sort(sortFuncDesc) } a.options.length = 0; for (var e = 0; e < d.length; e++) { var f = document.createElement("option"); f.text = d[e].optText; f.value = d[e].optValue; a.options.add(f) } for (var e = 0; e < d.length; e++) { if (a[e].value == c) { a[e].selected = true; break } } } function sortSelectnew(a, b) { } function sortFuncDesc(a, b) { var c = a.optValue.toLowerCase(); var d = b.optValue.toLowerCase(); if (c * 1 > d * 1) return -1; if (c * 1 < d * 1) return 1; return 0 } function sortFuncAsc(a, b) { var c = a.optValue.toLowerCase(); var d = b.optValue.toLowerCase(); if (c * 1 > d * 1) return 1; if (c * 1 < d * 1) return -1; return 0 } function UpdateUrl(a, b) { if (a.href != null && a.href.indexOf("CLK") == -1) { a.href = a.href + "&CLK=" + b } } function toggleMsg(a, b, c) { if (jQuery(a).html == b) { jQuery(a).html = c } else { jQuery(a).html = b } } function selectTab(a) { if (a == 0) { jQuery("divOtherCharges").removeClass("hide"); jQuery("divFeeAndRepayments").addClass("hide"); jQuery("liFeeAndRepayments").removeClass("on"); jQuery("liOtherCharges").addClass("on") } else { jQuery("divFeeAndRepayments").removeClass("hide"); jQuery("divOtherCharges").addClass("hide"); jQuery("liFeeAndRepayments").addClassName("on"); jQuery("liOtherCharges").removeClassName("on") } } function setTabList(a, b, c) { jQuery("#" + b + " li").removeClass(c); jQuery("#" + a).addClass(c) } function setReportOn(a, b, c) { for (i = 0; i < c; i++) document.getElementById(a + i).style.display = "none"; document.getElementById(a + b).style.display = "block" } function setTab(a, b, c) { jQuery("#" + b + " a").removeClass(c); jQuery(a).addClass(c) } function AjaxError(a) { alert("An error occured: " + a.responseText) } function showTip(a, b) { jQuery.ajax({ type: "POST", url: "/Handler/HtmlSnippetHandler.ashx?name=" + a, data: params, success: function (a) { jQuery("#" + b.html(a)) }, error: function () { AjaxError } }) } function loadReportByName(a, b, c) { try { jQuery("#" + b).prepend("<div class='loading'>Loading</div>"); jQuery.ajax({ type: "POST", url: "/Handler/ReportHandlerHtml.ashx?reportName=" + a + "&locationId=" + c, data: "['']", success: function (a) { jQuery("#" + b).html(a) }, error: function () { AjaxError } }) } catch (d) { alert(d) } } function loadReportById(a, b, c) { try { jQuery("#" + b).prepend("<div class='loading'>Loading</div>"); jQuery.ajax({ type: "POST", url: "/Handler/ReportHandlerHtml.ashx?reportId=" + a + "&locationId=" + c, data: "['']", success: function (a) { jQuery("#" + b).html(a) }, error: function () { AjaxError } }) } catch (d) { alert(d) } } function AjaxProductSelectorHumanFilterSummary(a) { var b = jQuery("form").serialize(true); jQuery("#" + a).prepend("<div class='loading'>Loading</div>"); jQuery.ajax({ type: "POST", url: "/Handler/ProductSelectorHumanFilterSummaryHandler.ashx", data: b, success: function (b) { jQuery("#" + a).html(b) }, error: function () { AjaxError } }) } function AjaxProductSelectorReport(a) { var b = jQuery("form").serialize(true); jQuery("#" + a).prepend("<div class='loading'>Loading</div>"); jQuery.ajax({ type: "POST", url: "/Handler/ProductSelectorReportHandler.ashx", data: b, success: function (b) { jQuery("#" + a).html(b); if (jQuery.browser.version < 7) { jQuery(a).supersleight() } LoadProductListResultPromo(); InitShortList() }, error: function () { AjaxError } }) } function AjaxSelector(a, b) { if (jQuery(a).val() != null) { AjaxProductSelectorReport(jQuery(a).get(0).id) } if (jQuery(b).val() != null) { AjaxProductSelectorHumanFilterSummary(jQuery(b).get(0).id) } } function SelectorSubmitOld(a) { var b = jQuery("form").get(0); jQuery("#__VIEWSTATE").remove(); b.action = a; b.submit() } function CrossPageSubmit(a) { SelectorSubmitOld(a) } function SetView(a, b, c) { jQuery("#ReportName").val(a); AjaxSelector(jQuery("#" + b), jQuery("#" + c)) } function processSelector(a, b, c, d, e) { if (b == "ajax") { loadReportById(a, e) } else { var f = jQuery("#" + c); f.action = d; f.submit() } } function FactSheetRemove(a) { var b = location.href.replace(a, ""); b = b.replace(",,", ","); b = b.replace("productId=,", "productId="); if (b.charAt(b.length - 1) == ",") { b = b.slice(0, b.length - 1) } window.location.href = b; return false } function EnableRadio(a, b) { var c = jQuery("#ic_product_select"); if (a) { var d = c.getInputs("radio", b); d.invoke("enable") } else { var d = c.getInputs("radio", b); d.invoke("disable") } return true } function EnableControl(a, b) { if (b != null) { if (a) { b.removeAttr("disabled") } else { b.attr("disabled", "disabled") } } } function EnableControls(a, b) { if (b != null && b != "") { for (i = 0; i < b.split(",").length; i++) { var c = b.split(",")[i]; EnableControl(a, jQuery("#" + c)) } } } function ValidatePersonalLoanSelector() { var a = true; var b = ""; if (jQuery("#LoanAmount").get(0).value == "") { a = false; b += "\n Please enter a loan amount." } if (!a) { alert(b); return false } if (personalLoanInterestRateChanged) { if (jQuery("input[name='InterestRate']:checked").val() == "Fixed") { setTabList("ProductSelectorReport0", "ProductSelectorReport", "on") } else { setTabList("ProductSelectorReport1", "ProductSelectorReport", "on") } personalLoanInterestRateChanged = false } GenReport(1) } function PersonalLoanInterestRateChanged() { personalLoanInterestRateChanged = true; var a = jQuery("input[name='InterestRate']:checked").val(); jQuery("#SelectedTabName").val("Rates" + a); jQuery("#ReportName").val("Rates" + a) } function PersonalLoanSelectorClick(a) { if (a.name == "IcLoanType") { EnableControls(a.value == "GeneralPurpose", "IcPersonalLoanSecurity_0"); EnableControls(a.value != "Overdraft", "LoanPeriod"); if (a.value == "Overdraft") { jQuery("#LoanPeriod").val(3) } EnableControl(a.value != "Overdraft", jQuery("input[name='InterestRate']")); if (a.value == "Overdraft") { jQuery("input[name='InterestRate']").each(function (a) { if (this.value == "Variable") { this.checked = true; PersonalLoanInterestRateChanged() } }) } } if (a.name == "InterestRate") { PersonalLoanInterestRateChanged() } } function InitializePersonalLoanSelector() { jQuery("input[name='IcLoanType']").each(function (a) { if (this.checked) { PersonalLoanSelectorClick(this) } }) } function TransactionAccountSelectorClick(a) { if (a.id == "Transaction") { var b = "TransactionAccessToAccountLeft_0,TransactionAccessToAccountLeft_1,TransactionAccessToAccountLeft_2,TransactionAccessToAccountRight_0,TransactionAccessToAccountRight_1"; EnableControls(true, b) } if (a.id == "Passbook") { var b = "TransactionAccessToAccountLeft_0,TransactionAccessToAccountLeft_1,TransactionAccessToAccountLeft_2,TransactionAccessToAccountRight_0,TransactionAccessToAccountRight_1"; EnableControls(false, b) } if (a.id == "Cheque") { var b = "TransactionAccessToAccountLeft_0,TransactionAccessToAccountLeft_1,TransactionAccessToAccountLeft_2,TransactionAccessToAccountRight_0,TransactionAccessToAccountRight_1"; EnableControls(true, b) } } function InitializeTransactionAccountSelector() { TransactionAccountSelectorClick(jQuery("#TransactionAccountType").get(0)) } function CreditCardSelectorClick(a) { var b = false; if (jQuery("#" + a.id).is(":checked")) { b = true } if (a.id == "AccountType") { var c = false; if (a.get(0).value == "Credit") { var d = "CardStatus_0,CardStatus_1,CardStatus_2,Feature_0,Feature_1,Feature_2,Feature_3"; EnableControls(true, d) } if (a.get(0).value == "Debit") { var e = "CardStatus_0,CardStatus_1,CardStatus_2,Feature_0,Feature_1,Feature_2,Feature_3"; EnableControls(false, e) } if (a.get(0).value == "Charge") { var e = "CardStatus_0,CardStatus_1,CardStatus_2,Feature_0,Feature_1,Feature_2,Feature_3"; EnableControls(false, e) } } } function SmallBusinessBanking107TermDeposit90AtCallSelectorClick(a) { var b = false; if (jQuery("#" + a.id).is(":checked")) { b = true } var c = false; if (a.id == "AccountPurpose") { if (a.value == "FixedTerm") { jQuery("#ProductDefinitionId").val(b ? "90" : "107"); jQuery("#SortReportName").val("ProductList_" + jQuery("#ProductDefinitionId").val() + "_" + jQuery("#ReportName").val()); jQuery("#SortField").value = "CalcInterestEarned"; var d = "SavingsTerm,ProductType_0,ProductType_1,ProductType_2,ProductType_3"; var e = "AccountType_0,AccountType_1"; c = true; if (jQuery("#productselectorreport1").val() != null) jQuery("#ProductSelectorReport1").hide() } if (a.value == "AtCallSavings") { jQuery("#ProductDefinitionId").val(b ? "107" : "90"); jQuery("#SortReportName").val("ProductList_" + jQuery("#ProductDefinitionId").val() + "_" + jQuery("#ReportName").val()); jQuery("#SortField").val("InterestMore_10000"); var d = "AccountType_0,AccountType_1"; var e = "SavingsTerm,ProductType_0,ProductType_1,ProductType_2,ProductType_3"; c = true; if (jQuery("#productselectorreport1").val() != null) jQuery("#productselectorreport1").show() } } if (c) { EnableControls(false, e); EnableControls(true, d) } } function InitializeSmallBusinessSavingsSelector() { jQuery(document).ready(SmallBusinessBanking107TermDeposit90AtCallSelectorClick(jQuery("#AccountPurpose").get(0))) } function SavingsAccountSelectorClick(a) { var b = false; if (jQuery("#" + a.id).is(":checked")) { b = true } var c = false; var d = jQuery("input[name='AccountPurpose']:checked").val(); if (a.id == "AccountPurpose") { if (d == "FixedTerm") { jQuery("#ProductDefinitionId").val(b ? "107" : "34"); jQuery("#SortReportName").val("ProductList_" + jQuery("#ProductDefinitionId").val() + "_" + jQuery("#ReportName").val()); var e = "SavingsTerm,ProductType_0,ProductType_1,ProductType_2,ProductType_3"; var f = "AccountTypeLeft_0,AccountTypeLeft_1,AccountTypeLeft_2,AccountTypeLeft_3,AccountTypeLeft_4,AccountTypeRight_0,AccountTypeRight_1,AccountTypeRight_2,AccountTypeRight_3"; c = true; if (jQuery("#productselectorreport1").val() != null) jQuery("#ProductSelectorReport1").hide() } if (d == "AtCallSavings") { jQuery("#ProductDefinitionId").val(b ? "107" : "34"); jQuery("#SortReportName").val("ProductList_" + jQuery("#ProductDefinitionId").val() + "_" + jQuery("#ReportName").val()); var e = "AccountTypeLeft_0,AccountTypeLeft_1,AccountTypeLeft_2,AccountTypeLeft_3,AccountTypeLeft_4,AccountTypeRight_0,AccountTypeRight_1,AccountTypeRight_2,AccountTypeRight_3"; var f = "SavingsTerm,ProductType_0,ProductType_1,ProductType_2,ProductType_3"; c = true; if (jQuery("#productselectorreport1").val() != null) jQuery("#productselectorreport1").show() } } if (a.id == "AccountTypeLeft_4") { if (a.value == "FirstHomeSaver") { if (b) { var e = "AccountTypeLeft_4"; var f = "AccountTypeLeft_0,AccountTypeLeft_1,AccountTypeLeft_2,AccountTypeLeft_3,AccountTypeRight_0,AccountTypeRight_1,AccountTypeRight_2,AccountTypeRight_3"; c = true } else { var f = ""; var e = "AccountTypeLeft_0,AccountTypeLeft_1,AccountTypeLeft_2,AccountTypeLeft_3,AccountTypeLeft_4,AccountTypeRight_0,AccountTypeRight_1,AccountTypeRight_2,AccountTypeRight_3"; c = true } } } if (c) { EnableControls(false, f); EnableControls(true, e) } return } function InitializeSavingsSelector() { SavingsAccountSelectorClick(jQuery("#AccountPurpose").get(0)); if (jQuery("input[name='AccountPurpose']:checked").val() == "FixedTerm") { jQuery("#ProductSelectorReport2").hide() } else { jQuery("#ProductSelectorReport2").show() } } function HomeLoanSelectorClick(a) { var b = false; if (a.type == "checkbox" && a.checked) b = true; if (a.id == "LoanTypeExtra_2") { var c = ""; var d = "Availability_0,Availability_1,LoanType_0,LoanType_1,LoanType_2,LoanTypeIntroRate_0,LoanTypeExtra_0,LoanTypeExtra_1,Features_0,Features_1,Features_2,Features_3,RepaymentFrequency_0,RepaymentFrequency_1,RepaymentFrequency_2,FeesUpfront,FeesMonthly,FeesEarlyTermination,LoanAmount,PropertyValue"; jQuery("#ProductDefinitionId").val(b ? "29" : "27"); if (b) { EnableControls(false, d) } else { EnableControls(true, d) } } if (a.id == "LoanTypeExtra_0") { var c = "LoanTypeExtra_2"; var d = "LoanTypeExtra_1,LoanTypeExtra_2,FeesEarlyTermination,LoanTypeIntroRate_0"; jQuery("#ProductDefinitionId").val(b ? "24" : "27"); if (b) { EnableControls(false, d) } else { EnableControls(true, d) } } if (a.id == "LoanTypeExtra_1") { var c = ""; var d = "LoanTypeIntroRate_0,LoanTypeExtra_2"; if (b) { EnableControls(false, d) } else { EnableControls(true, d) } } if (a.id == "LoanType_2") { var c = ""; var d = "LoanTypeIntroRate_0"; if (b) { EnableControls(false, d) } else { EnableControls(true, d) } } if (a.id == "LoanTypeIntroRate_0") { var c = ""; var d = "LoanType_2,LoanTypeExtra_0,LoanTypeExtra_1,LoanTypeExtra_2"; if (b) { EnableControls(false, d) } else { EnableControls(true, d) } } } function InitializeHomeLoanSelector() { if (jQuery("#LoanTypeExtra_2").is(":checked")) { HomeLoanSelectorClick(jQuery("#LoanTypeExtra_2").get(0)) } } function ReverseMortgageSelectorClick(a) { HomeLoanSelectorClick(a) } function Compare(a) { var b = ""; jQuery('input[type="checkbox"][id^="chkProductListCompare_"]').each(function (a) { if (jQuery(this).is(":checked")) { b += jQuery(this).get(0).id.replace("chkProductListCompare_", "") + "," } }); window.location.href = a + "?productId=" + b } function ToggleOrder(a, b, c) { if (b == c) { if (a == "undefined") { return "Ascending" } if (a == "Ascending") { return "Descending" } } return "Ascending" } function QueryStringSort(a, b) { var c = location.href; if (c.indexOf("?") == -1) { c = c + "?" } var d = new Hash(jQuery(c.toQueryParams())); var e = ToggleOrder(d.get("SortOrder"), d.get("SortField"), a); d.set("ReportName", jQuery("#ReportName").val()); d.set("SortField", a); d.set("SortOrder", e); window.location.href = "List.aspx?" + d.toQueryString() } function GenReport(a) { try { jQuery("#PageNo").val(a); AjaxSelector(jQuery("#productSelectorReportResults"), jQuery("#productSelectorHumanFilterSummaryResults")) } catch (b) { alert(b) } } function GroupByApply(a) { jQuery("#IsGroupBy").val(a.checked); jQuery(".chkGroupBy").attr("checked", a.checked); GenReport(1) } function PageReport(a) { if (typeof GenerateReport == "function") { GenerateReport("productSelectorReportResults", a) } else { GenReport(a) } } function ToggleSortDirection(a) { return a == "Ascending" ? "Descending" : "Ascending" } function Sort(a, b) { if (typeof Validate == "function") { Validate() } var c = jQuery("#SortOrder").val(); var d = jQuery("#SortField").val(); if (d == a) { c = ToggleSortDirection(c) } else { c = b } jQuery("#SortField").val(a); jQuery("#SortOrder").val(c); jQuery("#SortReportName").val("ProductList_" + jQuery("#ProductDefinitionId").val() + "_" + jQuery("#ReportName").val()); if (typeof GenerateReport == "function") { GenerateReport("productSelectorReportResults", 1) } else { GenReport(1) } } function DoValidateHomeLoanSelector() { var a = ""; var b = jQuery("#ic_product_select").get(0); var c = true; if (jQuery("#LoanAmount").get(0).length > 10) { a += "\nPlease enter an amount lower than $99,999,999."; c = false } if (jQuery("#Availability_0").is(":checked") == false && jQuery("#Availability_1").is(":checked") == false) { a += "\nPlease select an availability."; c = false } if (jQuery("#LoanType_0").is(":checked") == false && jQuery("#LoanType_1").is(":checked") == false && jQuery("#LoanType_2").is(":checked") == false) { a += "\nPlease select a loan type."; c = false } if (!c) { alert(a) } return c } function ValidateHomeLoanSelectorIndex() { var a = true; a = DoValidateHomeLoanSelector(); if (!a) { return false } var b = jQuery("#ic_product_select").get(0); b.submit() } function ValidateHomeLoanSelector() { var a = true; a = DoValidateHomeLoanSelector(); if (!a) { return false } GenReport(1) } function ValidateSavingsAccountSelector() { var a = true; var b = ""; if (jQuery("#SavingsAmount").val().indexOf(".") > 0) { jQuery("#SavingsAmount").val(jQuery("#SavingsAmount").get(0) - jQuery("#SavingsAmount").val().indexOf(".")) } if (jQuery("#SavingsAmount").get(0).length > 10) { b += "\nPlease enter an amount lower than $99,999,999"; a = false } if (jQuery("input[name='AtCallSavings']:checked").val() == "AtCallSavings") { if (!jQuery("#AccountTypeLeft_0").is(":checked") && !jQuery("#AccountTypeLeft_1").is(":checked") && !jQuery("#AccountTypeLeft_2").is(":checked") && !jQuery("#AccountTypeLeft_3").is(":checked") && !jQuery("#AccountTypeLeft_4").is(":checked") && !jQuery("#AccountTypeRight_0").is(":checked") && !jQuery("#AccountTypeRight_1").is(":checked") && !jQuery("#AccountTypeRight_2").is(":checked") && !jQuery("#AccountTypeRight_3").is(":checked")) { a = false; b += "Please select at least one type of account." } } if (jQuery("input[name='AccountPurpose']:checked").val() == "FixedTerm") { jQuery("#ProductSelectorReport2").hide() } else { jQuery("#ProductSelectorReport2").show() } if (!a) { alert(b); return false } GenReport(1) } function ValidateCreditCardSelector() { GenReport(1) } function ValidateTransactionAccountSelector() { var a = true; var b = ""; GenReport(1) } function ValidateSmallBusinessBanking107TermDeposit90AtCallSelector() { var a = true; var b = ""; if (jQuery("input[name*='AccountPurpose']:checked").val() == "FixedTerm") { if (!jQuery("#ProductType_0").is(":checked") && !jQuery("#ProductType_1").is(":checked") && !jQuery("#ProductType_2").is(":checked") && !jQuery("#ProductType_3").is(":checked")) { a = false; b += "Please select at least one fixed term account type." } } if (jQuery("input[name*='AccountPurpose']:checked").val() == "AtCallSavings") { if (!jQuery("#AccountType_0").is(":checked") && !jQuery("#AccountType_1").is(":checked")) { a = false; b += "Please select at least one at call account type." } } if (!a) { alert(b); return false } GenReport(1) } function ValidateProductSelector() { var a = jQuery("#ProductSelectorSchemaName"); switch (a.val()) { case "PersonalLoanSelector": ValidatePersonalLoanSelector(); break; case "HomeLoanSelector": ValidateHomeLoanSelector(); break; case "SavingsAccountSelector": ValidateSavingsAccountSelector(); break; case "CreditCardSelector": ValidateCreditCardSelector(); break; case "TransactionAccountSelector": ValidateTransactionAccountSelector(); break; case "SmallBusinessBanking107TermDeposit90AtCallSelector": ValidateSmallBusinessBanking107TermDeposit90AtCallSelector(); break; default: GenReport(1) } } function ShowAllResults() { var a = jQuery("#MaxResultCount").val(); var b = "20"; if (a == b) { jQuery("#MaxResultCount").val("-1"); jQuery("#topResultText").text("All results shown"); jQuery("#topResult").attr("src", "/IMG/Template/btn-show-first20-results.gif") } else { jQuery("#MaxResultCount").val(b); jQuery("#topResultText").text("Top " + b + " results shown"); jQuery("#topResult").attr("src", "/IMG/Template/btn-show-all-results.gif") } GenReport(1) } function ToggleAdvancedOptions() { jQuery("#ic_selectorAdvanced").toggle(); jQuery("#advanceOptions").each(function () { var a = "Show advanced search options"; var b = "Hide advanced search options"; jQuery(this).text(jQuery(this).text() == a ? b : a) }) } function hidemenu(a) { if (jQuery("#" + a).parent().id != "mmCalc") jQuery("#" + a).attr("style", "display=none"); return a } function hideCalc(a) { t = setTimeout("hidemenu('" + a + "')", 10) } function showmenu(a) { jQuery(a).attr("style", "display=block"); return a } function showCalc(a, b) { if (b == "calc") jQuery("#mmReg").hide(); else if (b == "reg") jQuery("#mmCalc").hide(); clearTimeout(t); showmenu(a) } function fadeIn(a, b) { function c(d) { if (d > 1) { return } a.style.opacity = d; a.style.filter = "alpha(opacity=" + d * 100 + ")"; setTimeout(function () { c(d + .1) }, b / 10) } c(.1) } function settabs(a) { switch (a) { case 0: jQuery("#" + newp[0]).attr("class", "on"); jQuery("#" + newp[1]).attr("class", ""); jQuery("#" + newp[2]).attr("class", ""); jQuery("#" + newp[3]).attr("class", ""); break; case 1: jQuery("#" + newp[1]).attr("class", "on"); jQuery("#" + newp[0]).attr("class", ""); jQuery("#" + newp[2]).attr("class", ""); jQuery("#" + newp[3]).attr("class", ""); break; case 2: jQuery("#" + newp[2]).attr("class", "on"); jQuery("#" + newp[1]).attr("class", ""); jQuery("#" + newp[0]).attr("class", ""); jQuery("#" + newp[3]).attr("class", ""); break; case 3: jQuery("#" + newp[3]).attr("class", "on"); jQuery("#" + newp[1]).attr("class", ""); jQuery("#" + newp[2]).attr("class", ""); jQuery("#" + newp[0]).attr("class", ""); break } } function Startloop() { var a = jQuery("#TargetFeaturedReport").get(0); a.onmouseover = function () { userclicks = true }; if (userclicks == false) { if (currindex < 3) { currindex++ } else { currindex = 0 } setTab(jQuery("#FeaturedProducts li a").get(currindex), "FeaturedProducts", "on"); jQuery("#FeaturedProducts li a").each(function (a) { if (a == currindex) { jQuery(this).click() } }); setTimeout("Startloop()", timer) } } function OnPageLoad() { if (navigator.userAgent.indexOf("MSIE 8") == 0) { userclicks = true } else { userclicks = false } jQuery("#FeaturedProducts").mouseover(function () { userclicks = true }); jQuery("#TargetFeaturedReport").mouseover(function () { userclicks = true }); if (jQuery("#TargetFeaturedReport").val() != null) { newp = jQuery("#FeaturedProducts a") } return } function checksession(a, b) { a = document.getElementById(b).value } function getdateintoidden(a, b) { document.getElementById(b).value = a } function checkinputs(a, b) { if (a.value == "") { a.value = b } else { a.value = a.value } } function rememberinputs(a, b) { if (a.value == b) { a.value = "" } else if (a.value == "") { a.value = b } else { a.value = a.value } } function sortSelect(a, b, c) { if (arguments.length == 1) b = true; var d = []; for (var e = 0; e < a.options.length; e++) { d[e] = { optText: a.options[e].text, optValue: a.options[e].value} } if (b) { d.sort(sortFuncAsc) } else { d.sort(sortFuncDesc) } a.options.length = 0; for (var e = 0; e < d.length; e++) { var f = document.createElement("option"); f.text = d[e].optText; f.value = d[e].optValue; a.options.add(f) } for (var e = 0; e < d.length; e++) { if (a[e].value == c) { a[e].selected = true; break } } } function sortFuncDesc(a, b) { var c = a.optValue.toLowerCase(); var d = b.optValue.toLowerCase(); if (c * 1 > d * 1) return -1; if (c * 1 < d * 1) return 1; return 0 } function sortFuncAsc(a, b) { var c = a.optValue.toLowerCase(); var d = b.optValue.toLowerCase(); if (c * 1 > d * 1) return 1; if (c * 1 < d * 1) return -1; return 0 } function ClickMessage(a) { a.innerHTML = "An insurance consultant will try to contact you within 1 business day." } var newp; var newp1 = new Array; var fadeobj; var timer = 4e3; var currindex = 0; var userclicks = new Boolean(false); var t; var mnu; jQuery.fn.toggleText = function (a, b) { return this.each(function () { jQuery(this).text(jQuery(this).text() == a ? b : a) }) }; var personalLoanInterestRateChanged = false; String.prototype.trim = function () { return; this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, "") }; String.prototype.startsWith = function (a) { return this.match("^" + a) == a }; String.prototype.endsWith = function (a) { return this.match(a + "$") == a }; String.Format = function (a) { if (arguments.length <= 1) { return a } var b = arguments.length - 2; for (var c = 0; c <= b; c++) { a = a.replace(new RegExp("\\{" + c + "\\}", "gi"), arguments[c + 1]) } return a }; (function (a) { a.fn.HelpBalloon = function (b, c) { Init: { a(this).html(GetImagePath(c)); $(this).click().toggle(function (c) { a("#bubbleHelper").remove(); a(this).show(); a("body").prepend(GetHtml(b)); a("#bubbleHelper").css("left", c.pageX - 300 + "px").css("top", c.pageY - 240 + "px"); a("#closeButton").click(function () { a("#bubbleHelper").remove() }) }, function () { a("#bubbleHelper").remove() }) } } })($); var template = function () { var a = "" + '<div id="bubbleHelper" >' + '  <div id="bubbleHelperInside">' + '    <div id="bubbleHelperHeading">' + "        InfoChoice Help" + "    </div>" + '    <div class="closeButton" id="closeButton"></div>' + '      <div id="bubbleHelperBody">'; var b = "" + "     </div>" + "  </div>" + "</div>"; return { header: function () { return a }, body: function () { return bodyHtml }, footer: function () { return b } } } ()
