function previous_address(duration){
    var obj = document.getElementById('previous_address');
    if(duration=='Less than 3'){
         obj.style.display = '';
    } else{
         obj.style.display = 'none';
    }
}

function mort_gage(duration2){
    var obj2 = document.getElementById('mort_gage');
    if(duration2 != ''){
         obj2.style.display = '';
    } else{
         obj2.style.display = 'none';
    }
}


function councilq(duration5){
    var obj = document.getElementById('councilq');
    if(duration5=='Yes'){
         obj.style.display = '';
    } else{
         obj.style.display = 'none';
    }
}

function arrearsq(duration6){
    var obj = document.getElementById('arrearsq');
    if(duration6=='Yes'){
         obj.style.display = '';
    } else{
         obj.style.display = 'none';
    }
}

function self_employed(duration6){
    var obj = document.getElementById('proof');
    if(duration6=='Self Employed'){
         obj.style.display = '';
    } else{
         obj.style.display = 'none';
    }
}

function partner(duration6, res, purpose){
    var obj = document.getElementById('partner');
    var objt = document.getElementById('partner_title');
    if(duration6=='Married' || duration6=='LivingTogether'){
         obj.style.display = '';
         objt.style.display = '';
    } else if ((res=='mortgage joint') && ((purpose == 'Consolidation') || (purpose == 'Home Improvements'))){
         obj.style.display = '';
         objt.style.display = '';
    } else{
         obj.style.display = 'none';
         objt.style.display = 'none';
    }
}

function checkresidencystatus(theValue){
if(theValue == 'homeowner'){
alert("Since you are a homeowner without a mortgage you are eligible for a low interest mortgage. \n\n You are now being forwarded to our mortgage form.\n\nIf you do have a mortgage, just click the back button to come back to this page."); 
window.location = 'http://www.top-lenders.co.uk/aps.php';
}else if(theValue == 'tenant') {
alert("You are being forwarded to our tenant form.\n\nIf you do own a home, just click the back button to come back to this page."); 
window.location = 'http://www.top-lenders.co.uk/unsecured.php';
}
}

function transfertdebt(){
alert("You are being transferred to our debt management site.  Request a free consultation to help you take care of your debts.");
}

function checkpurpose(theValue,status){
nopicture=1;
if(theValue == 'Car Loan'){
alert("You are now being forwarded to our car loan partner.  If you are interested in a home loan, please click the back button to come back to this page.");
window.location = 'http://carfinance.at/guide?CTY=3&CID=425';
}else if(theValue == 'Remortgage'){
alert("You are now being forwarded to our remortgage form.  If you are interested in a home loan, please click the back button to come back to this page.");
window.location = 'http://www.top-lenders.co.uk/remortgage.php';
}else if (theValue == 'Mortgage'){
alert("You are now being forwarded to our mortgage form.  If you  are interested in a home loan, please click the back button to come back to this page.");
window.location = 'http://www.top-lenders.co.uk/aps.php';
}else if (theValue == 'Business Loan'){
alert("You are now being forwarded to our commercial loan partner.  If you are interested in a personal home loan, please click the back button to come back to this page.");
window.location = 'http://track.omguk.com/?PID=1214&AID=3743&CID=125849&MID=894&WID=10318';
}else if ((status == 'tenant') && (theValue != 'Consolidation')){
alert("You are being forwarded to our tenant non-consolidation form.\n\nIf you do own a home or if you want a consolidation loan, just click the back button to come back to this page."); 
window.location = 'http://www.top-lenders.co.uk/unsecured.php';
}else if ((nopicture == 1) && (theValue  != 'Consolidation') && (theValue  != 'Home Improvements')){
alert("You are being forwarded to a loan merchant that suits your purpose");
window.location = 'http://www.top-lenders.co.uk/forwardtocentral.php';
}
}


function checkcredit(theValue){
if(theValue == 'Excellent'){
alert("You are now being forwarded to our excellent-credit lending partner.\n\nIf your credit is less than excellent, just click the back button to come back to this page."); 
window.location = 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=26188&merchantID=1930&programmeID=5195&mediaID=0';
}
}


function checkcountry(theValue){
if(theValue == 'US'){
alert("You are now being forwarded to our US lending partner.\n\nIf you live in the UK, just click the back button to come back to this page.");
window.location = 'http://www.kqzyfj.com/click-1664366-10379473';
}
}
