//places cursor in the amount field

	function setFocus()
	{
		document.giftpurch.giftamt.focus();
		addUp(true);
	}

window.onload = setFocus;	

//validates the amount and totals the amount plus shipping
	function addUp(supressMessage) 
	{
		amount = parseFloat(document.giftpurch.giftamt.value);
		//shipping = parseFloat(document.getElementById('shipamt').innerHTML);
		
		if (isNaN(amount))
		{
			document.giftpurch.chargetotal.value="";
			if (!supressMessage)
				alert('You must enter a valid number');
			return false;
		}
		else
		{
			document.giftpurch.giftamt.value=amount.toFixed(2);
			//document.giftpurch.shipcharge.value=shipping.toFixed(2);
			//total = amount + shipping;
			total = amount;
			document.giftpurch.chargetotal.value=total.toFixed(2);
			document.getElementById('totalamt').innerHTML=total.toFixed(2);
		}
	}

