
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}

function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}

function calc2()
{

   if(isNaN(document.form1.sf.value)) 
   { 
     alert("Invalid data format.\n\nOnly numbers are allowed."); 
     document.form1.sf.focus(); 
     return (false); 
   }

if  ( document.form1.sf.value !="" |  document.form1.sf.value !="0") {
sf=0;
sf = document.form1.sf.value;
total=0;
total = parseInt(sf) * 0.22;
if (parseInt(total) >= 280) {
document.form1.total.value=parseInt(total);}
else{
document.form1.total.value="<280";
}
}
}

function calc()
{
   if(isNaN(document.form1.len.value)) 
   { 
     alert("Invalid data format.\n\nOnly numbers are allowed."); 
     document.form1.len.focus(); 
     return (false); 
   }
   if(isNaN(document.form1.wid.value)) 
   { 
     alert("Invalid data format.\n\nOnly numbers are allowed."); 
     document.form1.wid.focus(); 
     return (false); 
   }
   if(isNaN(document.form1.floors.value)) 
   { 
     alert("Invalid data format.\n\nOnly numbers are allowed."); 
     document.form1.floors.focus(); 
     return (false); 
   }
len= document.form1.len.value;
wid= document.form1.wid.value;
floors = document.form1.floors.value;

a= parseInt(len) *1;
b= parseInt(wid) * 1;
c= parseInt(floors) * 0.22;

total = (a*b*c);
if (parseInt(total)>= 280) {
document.form1.total.value=parseInt(total);}
else{
document.form1.total.value="<280";

}
}

function clearsf()
{ 
   if(document.form1.sf.value == "0")
   { 
     document.form1.sf.value=""; 
   }
}
 

