// SoundFields Leasing Calculator JavaScript Document

function doLeasingCalc(form) {
	var systemCost, yearlyLeaseCost, dailyLeaseCost;
	systemCost = (form.IR89.value * 400) + (form.IR568.value * 300);
	if (systemCost >= 1500) {
		form.systemCosts.value =  "\u00A3" + systemCost;
		yearlyLeaseCost = ((systemCost + 95) / 1000) * 255;
		form.yearlyLease.value = "\u00A3" + Math.round(yearlyLeaseCost * 100) / 100;
		form.dailyLease.value = "\u00A3" +  Math.round((yearlyLeaseCost / 365) * 100) / 100;
		return false;
	} else {
		alert("The total cost of your systems must be at least £1500 to qualify for our leasing option.");
		return false;
	}
}