function reCalc() {

interest = eval(document.ordform.loan.options[document.ordform.loan.selectedIndex].value *
document.ordform.months.options[document.ordform.months.selectedIndex].value * 
(document.ordform.rate.value / 1200))



monthly = (interest + 
eval(document.ordform.loan.options[document.ordform.loan.selectedIndex].value))/ 
eval(document.ordform.months.options[document.ordform.months.selectedIndex].value)



monthly = eval(currency(monthly,2))

document.ordform.total.value = currencyPad((monthly * 
eval(document.ordform.months.options[document.ordform.months.selectedIndex].value)),2)

document.ordform.period.value = eval(document.ordform.months.options[document.ordform.months.selectedIndex].value)
document.ordform.monthly.value = currencyPad(monthly,2)

}

	function currencyPad(anynum,width) {
		//returns number as string in $xxx,xxx.xx format.
		anynum = "" + eval(anynum)
		//evaluate (in case an expression sent)
		intnum = parseInt(anynum)
		//isolate integer portion
		intstr = ""+intnum
		//add comma in thousands place.
		if (intnum >= 1000) {
			intlen = intstr.length
			temp1=parseInt(""+(intnum/1000))
			temp2=intstr.substring(intlen-3,intlen)
			intstr = temp1+","+temp2
	        }
		if (intnum >= 1000000) {
			intlen = intstr.length
			temp1=parseInt(""+(intnum/1000000))
			temp2=intstr.substring(intlen-7,intlen)
			intstr = temp1+","+temp2        
		}
		decnum = Math.abs(parseFloat(anynum)-parseInt(anynum)) //isolate decimal portion
		decnum = decnum * 100 // multiply decimal portion by 100.
		decstr = "" + Math.abs(Math.round(decnum))
		while (decstr.length < 2) {
			decstr += "0"
		}
		retval = intstr + "." + decstr
		if (intnum < 0) {
			retval=retval.substring(1,retval.length)
			retval="("+retval+")"        
		}       
		retval = "£"+retval
		while (retval.length < width){
			retval=" "+retval
		}
		return retval
	}

	function currency(anynum,width) {
		anynum = "" + eval(anynum)
		//evaluate (in case an expression sent)
		intnum = parseInt(anynum)
		//isolate integer portion
		intstr = ""+intnum
		decnum = Math.abs(parseFloat(anynum)-parseInt(anynum)) //isolate decimal portion
		decnum = decnum * 100 // multiply decimal portion by 100.
		decstr = "" + Math.abs(Math.round(decnum))
		while (decstr.length < 2) {
			decstr += "0"
		}
		retval = intstr + "." + decstr
		if (intnum < 0) {
			retval=retval.substring(1,retval.length)
			retval="("+retval+")"        
		}       
		while (retval.length < width){
			retval=" "+retval
		}
		return retval
	}
