var imgPath = "http://site.smoof.net/img/"

function onImageError(img) { $(img).src = imgPath + "noimage_small.gif" }
function onImageError2(img) { $(img).src = imgPath + "noimage_large.gif" }
		
		
function CalculateSqft()
{
	if(isNaN(document.frmSqft.sqft.value) || document.frmSqft.sqft.value.length == 0)
	{
		alert("Please enter a number for the square feet.");
		document.frmSqft.sqft.focus();
	}
	else if(isNaN(document.frmSqft.sqft_over.value) || document.frmSqft.sqft.value.length == 0 || document.frmSqft.sqft.value < 0)
	{
		alert("Please enter a number for the overage percent.");
		document.frmSqft.sqft_over.focus();
	}
	else
	{
		qty = (document.frmSqft.sqft.value * (1 + document.frmSqft.sqft_over.value/100)) / document.forms[2].sqft.value;
		document.forms[2].vwquantity.value = Math.ceil(qty);
		closeActiveLightBox();
	}
}

