// JavaScript Document

function fcalc(){

        //alert (document.ordform.loan.options[document.ordform.loan.selectedIndex].value)


        amount = eval((document.ordform.loan.options[document.ordform.loan.selectedIndex].value))
        time = eval((document.ordform.months.options[document.ordform.months.selectedIndex].value))


        document.ordform.period.value = time

        g_rate = "5.25"


        f_rate = "1.169"
        b_rate = "1.299"


        var repayablexxx = (amount*((g_rate*(time/60))/100))  /time;
        //alert(time);
        var repayable = (amount*((((time/12)*g_rate)/100)+1))/time;

        var total = (Math.round(repayable*100))/100;
        //var total = repayable;
        var total = "£"+total
        document.ordform.monthly_g.value = total;

        var repayable = (amount*f_rate)/time;
        var total = parseInt(repayable);
        var total = "£"+total
        document.ordform.monthly_f.value = total;


        var repayable = (amount*b_rate)/time;
        var total = parseInt(repayable);
        var total = "£"+total
        document.ordform.monthly_b.value = total;



}

