function expand(thistag,x) {
   styleObj=document.getElementById(thistag).style;
   if (styleObj.display=='none' && x=='1') {styleObj.display='';}
   else {styleObj.display='none';}
}
function popUp(URL,x,y,left,top)
{
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+ x +',height='+ y +',left ='+ left +',top = '+ top +'');");
}


function checkform_reg( form )
{
  if (form.prenume.value=="")
     {
           alert("Introduceti prenumele!");
           form.prenume.focus();
           return false ;
     }
  if (form.nume.value=="")
     {
           alert("Introduceti numele!");
           form.nume.focus();
           return false ;
     }
  if (form.email.value=="")
     {
           alert("Introduceti adresa de email!");
           form.email.focus();
           return false ;
     }
  if (form.email.value.split('@').length==1 || form.email.value.split('.').length==1)
     {
           alert("Introduceti o adresa de e-mail valida!");
           form.email.focus();
           return false ;
     }
  if (form.telc.value=="")
     {
           alert("Introduceti telefonul pentru contact!");
           form.telc.focus();
           return false ;
     }
  if (form.utilizator.value=="")
     {
           alert("Introduceti utilizatorul!");
           form.utilizator.focus();
           return false ;
     }
  if (form.parola.value=="")
     {
           alert("Introduceti parola!");
           form.parola.focus();
           return false ;
     }
  if (form.parola.value!=form.parola2.value)
     {
           alert("Confirmarea parolei este incorecta!");
           form.parola2.focus();
           return false ;
     }
     
  if (document.getElementById('tip2').checked==true  && form.numeagentie.value=='')
     {
           alert("Introduceti numele agentiei!");
           form.numeagentie.focus();
           return false ;
     }
  if (document.getElementById('tip2').checked==true  && form.director.value=='')
     {
           alert("Introduceti numele directorului agentiei!");
           form.director.focus();
           return false ;
     }
  if (document.getElementById('tip2').checked==true  && form.tel.value=='')
     {
           alert("Introduceti numarul de telefon al agentiei!");
           form.tel.focus();
           return false ;
     }
  if (document.getElementById('tip2').checked==true  && form.oras.value=='')
     {
           alert("Introduceti orasul!");
           form.oras.focus();
           return false ;
     }
  if (document.getElementById('tip2').checked==true  && form.judet.value=='')
     {
           alert("Introduceti judetul!");
           form.judet.focus();
           return false ;
     }

  if (document.getElementById('tip3').checked==true  && form.numefirma.value=='')
     {
           alert("Introduceti numele firmei!");
           form.numefirma.focus();
           return false ;
     }
  if (document.getElementById('tip3').checked==true  && form.locfirma.value=='')
     {
           alert("Introduceti orasul firmei!");
           form.locfirma.focus();
           return false ;
     }
  if (document.getElementById('tip3').checked==true  && form.adresafirma.value=='')
     {
           alert("Introduceti adresa firmei!");
           form.adresafirma.focus();
           return false ;
     }
  if (document.getElementById('tip3').checked==true  && form.numefirma.value=='')
     {
           alert("Introduceti numele firmei!");
           form.numefirma.focus();
           return false ;
     }
  if (document.getElementById('tip3').checked==true  && form.cif.value=='')
     {
           alert("Introduceti CIF-ul firmei!");
           form.cif.focus();
           return false ;
     }
     
     
     

}

