function getInt(i) {
	i2=parseInt(i);
	if (i=="") i2=0;
	return i2;
}

function calcTotal()
{
	workbooks=getInt(document.orderForm.workbooks.value);
	CDs=getInt(document.orderForm.CDs.value);
	postage=((workbooks*8.5)+(CDs*19.99))*0.1;
	postageRounded=postage.toFixed(2);
	totalWorkbooks = workbooks*8.5;
	totalCDs = CDs*19.99;
	grandTotal = totalWorkbooks+totalCDs+postage;
	grandTotalRounded=grandTotal.toFixed(2);
	document.orderForm.cheque.value="£"+grandTotalRounded;
	document.orderForm.postage.value="£"+postageRounded;
}