function toggle(id) {
	
	tbl = document.getElementById('table' + id);
	var visible = tbl.style.display ? '' : 'none';
	tbl.style.display = visible;
	
	
	if(document.getElementById('img' + id))
	{
		h = document.images['img'+id].src;
		if (h.substring(h.length-8, h.length) == 'plus.gif')
		{
			document.images['img'+id].src = h.substring(0, h.length-8) + 'minus.gif';
		}
		else if (h.substring(h.length-9, h.length) == 'minus.gif')
		{
			document.images['img'+id].src = h.substring(0, h.length-9) + 'plus.gif';
		}
	}
}

function calculate(field, x)
{
	field.value = parseInt(field.value) + x;
	if(field.value < 0)
		field.value = 0;
	if(field.value > 998)
		field.value = 998;
	document.form1.submit();
} 
