var xmlHttp

function formREnSend(formular)
{ 

var url="forms/foPrReklamaDoEn.php?Odoslane=true&meno="+formular.meno.value+        
        "&priezvisko="+formular.priezvisko.value+
        "&titul="+formular.titul.value+
        "&titul2="+formular.titul2.value+
        "&email="+formular.email.value+
        "&firma="+formular.firma.value+
        "&ulica="+formular.ulica.value+
        "&mesto="+formular.mesto.value+
        "&psc="+formular.psc.value+
        "&stat="+formular.stat.value+
        "&tel="+formular.tel.value+
        "&fax="+formular.fax.value+
        "&reklamaSelect="+formular.reklamaSelect.options[formular.reklamaSelect.selectedIndex].value+
        "&reklama2Select="+formular.reklama2Select.options[formular.reklama2Select.selectedIndex].value+                          
        "&idForm="+formular.idForm.value+
        "&lang="+formular.lang.value+
        "&pl_ico="+formular.pl_ico.value+
        "&pl_dic="+formular.pl_dic.value+
        "&dd_meno="+formular.dd_meno.value+
        "&dd_firma="+formular.dd_firma.value+
        "&dd_ulica="+formular.dd_ulica.value+
        "&dd_mesto="+formular.dd_mesto.value+
        "&dd_psc="+formular.dd_psc.value+
        "&dd_stat="+formular.dd_stat.value
        ;	

if (window.RegExp)
	   {
   
	   re=new RegExp("^[^@]+@[^.]+\..+$");
	   if (!re.test(formular.email.value))
	      {
	      alert("Incorrect email address!");
	      formular.email.focus();
	      return false;
	      }
    else
        {
        document.getElementById("pageText").innerHTML="<div id=\"w_wait\"><span class=\"K_kontL\"><b>Form is sending ...</b></span></div>";           

        xmlHttp=GetXmlHttpObject();
        if (xmlHttp==null)
          {
          alert ("Your browser does not support AJAX!");
          return;
          }   
        xmlHttp.onreadystatechange=stateChanged;        
        xmlHttp.open("GET", url , true);
        xmlHttp.send(null);
        }
     }
} 


