﻿//function ResetItems(calc) {
//    switch (calc)
//    {
//    case 'repayments':
//        break;
//    case 'borrow':
//        break;
//    }
//}

function getLoanDetails() {
//   alert(Request.QueryString("Term"));
    PageMethods.getCalculationsTable(parseFloat(Request.QueryString("Amount")), parseInt(Request.QueryString("Term")), parseFloat(Request.QueryString("Repayment")), onSuccess, onFail);
}


function onSuccess(obj) {
    document.getElementById('Results').innerHTML = obj;
}

function onFail(obj) {alert('Failed');}

function hideapplyonline() {
//    document.getElementById('ApplyLogoArea').style.display = 'none';
    document.getElementById('Left').style.height = '430px';
    document.getElementById('Right').style.height = '430px';
    document.getElementById('Footer').style.margin = '70px 0';
}


function jsBack () {
    window.location = "http://www.thepersonalloan.co.uk/Loan_Calculator/Loan_Calc_Values.aspx";
    }

function jsnoAlpha(obj)
{
    reg = /[^0-9.,]/g;
    obj.value = obj.value.replace(reg,"");
}

function onMailSuccess(obj) {
    window.location = "http://www.thepersonalloan.co.uk/Apply_Online/ThankYou.aspx";

}