 var submitcount=0;

function reset() {
with (document.forms['contactform'])
{
name.value="";
mail.value="";
targy.value="";
tartalom.value="";
}
}

function checkFields() {   
with (document.forms['contactform'])
{                 
if (                                    
     (name.value=="") ||
 (mail.value=="")  ||
 (targy.value=="")  ||
 (tartalom.value==""))
   {
   alert("Minden mező kötelező!");
   return false;
   }

else 
   {
   if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
   else 
      {
      alert("Ezt az űrlapot már elküldted egyszer!");
      return false;
      }
   }
	}
} 
