function settable(el) {
if(document.getElementById(el).style.display=="none")
	document.getElementById(el).style.display="block";
else if(document.getElementById(el).style.display=="block")
	document.getElementById(el).style.display="none";
}
function trailingzero(n) {
if (Math.round(n)==n) 
	return '.00';
else if (Math.round(n*10)==n*10) 
	return '0';
else 
	return null; 
}
function calccost(pris,el,dd) {
var n=0;
for (var i=0; i < document.form1.elements['qty[]'].length; i++)
	n=n+document.form1.elements['qty[]'][i].options[document.form1.elements['qty[]'][i].selectedIndex].value*document.form1.elements['pris[]'][i].value;
document.getElementById("tot1").innerHTML='&pound;'+n+trailingzero(n);
document.getElementById("tot2").innerHTML='&pound;'+n+trailingzero(n);
document.form1.cyfanswm.value=n;
n=dd.options[dd.selectedIndex].value*pris;
if (n==0)
	document.getElementById(el).innerHTML='&nbsp;';
else
	document.getElementById(el).innerHTML='&pound;'+n+trailingzero(n);
return null;
}
function clearqty() {
for (var i=0; i < document.form1.elements['qty[]'].length; i++)
	document.form1.elements['qty[]'][i].selectedIndex=0;
document.form1.cyfanswm.value=0;
return null;
}

