var submitcount=0;

function reset() {
document.emailform.name.value="";
document.emailform.email.value="";
document.emailform.address.value="";

}

function checkFields() {                    
if (                                    
     (document.emailform.name.value=="") ||
 (document.emailform.email.value=="")  ||
 (document.emailform.address.value==""))  
   {
   alert("Please fill in your Name, Email and a Contact Address.");
   return false;
   }

else 
   {
   if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
   else 
      {
      alert("This form has already been submitted.");
      return false;
      }
   }
}

function open_window(URL,w_width,w_height) {    
     open (URL,'new_window','toolbar=no,location=0,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no, copyhistory=0,width='+w_width+',height='+w_height);
   }
