
function Calculate(myStr){
	
	
var inwidth  = parseInt(document.cart_quantity.width_inches.value); 
var ftwidth = (document.cart_quantity.width_feet.value*12); 
var totwidth = (inwidth+ftwidth); 

var inlength = parseInt(document.cart_quantity.length_inches.value);
var ftlength = (document.cart_quantity.length_feet.value*12);
var totlength = (inlength+ftlength);

var priceval = ((totwidth*totlength)*.027403555).toFixed(2); 

if (priceval < 3.95){
document.cart_quantity.price.value = 'must be at least 1 sq.ft';}

else if (totwidth > 48){
document.cart_quantity.price.value = '48" maxium width';}

else {
document.cart_quantity.price.value = priceval;
document.cart_quantity.totinches.value = (totwidth*totlength);
document.cart_quantity.cart_quantity.value = priceval;
document.getElementById('attrib-6-0').value = parseInt(document.cart_quantity.width_inches.value);
document.getElementById('attrib-3-0').value = parseInt(document.cart_quantity.length_feet.value);
document.getElementById('attrib-4-0').value = parseInt(document.cart_quantity.length_inches.value);
document.getElementById('attrib-5-0').value = parseInt(document.cart_quantity.width_feet.value);
document.cart_quantity.cart_quantity.value = priceval;
}

};