  function ellenoriz()
  {

      var text=document.form.email.value;

    if (document.form.nev.value == "")
    {
      alert('Kérjük adja meg nevét!');
      document.form.nev.focus();
      document.form.nev.select();
      return false;
    }

    if (document.form.cim.value == "")
    {
      alert('Kérjük adja meg címét!');
      document.form.cim.focus();
      document.form.cim.select();
      return false;
    }

    if (document.form.email.value == "")
    {
      alert('Kérjük adja meg e-mail címét!');
      document.form.email.focus();
      document.form.email.select();
      return false;
    }

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form.email.focus();
      document.form.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form.email.focus();
      document.form.email.select();
      return false;
    } 
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form.email.focus();
      document.form.email.select();
      return false;
    } 
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form.email.focus();
      document.form.email.select();
      return false;
    }   

 	return true;
   } 

function ellenoriz2()
  {

      var text=document.form.email.value;

      var text2=document.form2.email.value;

    if (document.form2.email.value == "")
    {
      alert('Kérjük adja meg azt az e-mail címet amivel feliratkozott hírlevelünkre!');
      document.form2.email.focus();
      document.form2.email.select();
      return false;
    }


    if (text2.indexOf('@') == -1)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form2.email.focus();
      document.form2.email.select();
      return false;
    }
    if (text2.indexOf('.') == -1)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form2.email.focus();
      document.form2.email.select();
      return false;
    } 
    if ((text2.length-text2.lastIndexOf('.'))>4 || (text2.length-text2.lastIndexOf('.'))<2)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form2.email.focus();
      document.form2.email.select();
      return false;
    } 
    if (text2.indexOf('.')==text2.indexOf('@')+1)
    {
      alert('Az e-mail cím formátuma nem megfelelő!');
      document.form2.email.focus();
      document.form2.email.select();
      return false;
    }   

 	return true;
   } 