// JavaScript Document
function valida_envia(){
	
    //valido el nombre
    if (document.fvalida.nume.value.length==0){
       alert("Nume client necompletat")
       document.fvalida.nume.focus()
       return 0;
    }
	if (document.fvalida.prenume.value.length==0){
       alert("Prenume client necompletat")
       document.fvalida.prenume.focus()
       return 0;
    }
	if (document.fvalida.email.value.length==0){
       alert("E-mail necompletat")
       document.fvalida.email.focus()
       return 0;
    }
	if (document.fvalida.telefon.value.length!=10)
	{
		alert("Numar de telefon necompletat ")
       document.fvalida.telefon.focus()
       return 0;
		
	}
	if (document.fvalida.localitate.value.length==0){
       alert("Localitate necompletat")
       document.fvalida.localitate.focus()
       return 0;
    }
	if (document.fvalida.marcamodelo.value.length==0){
       alert("Marca Model necompletat")
       document.fvalida.marcamodelo.focus()
       return 0;
    }
	 if (document.fvalida.an.selectedIndex==0){
       alert("An neselectat")
       document.fvalida.an.focus()
       return 0;
    } 
	if (document.fvalida.km.value.length==0){
       alert("KM necompletat")
       document.fvalida.km.focus()
       return 0;
    }
	if (document.fvalida.culoare.value.length==0){
       alert("Culoare necompletat")
       document.fvalida.culoare.focus()
       return 0;
    }
	 if (document.fvalida.combustibil.selectedIndex==0){
       alert("Combustibil neselectat")
       document.fvalida.combustibil.focus()
       return 0;
    } 
	if (document.fvalida.capacitate.value.length==0){
       alert("Capacitate necompletat")
       document.fvalida.capacitate.focus()
       return 0;
    }
	if (document.fvalida.hp.value.length==0){
       alert("HP necompletat")
       document.fvalida.hp.focus()
       return 0;
    }
	if (document.fvalida.caroserie.selectedIndex==0){
       alert("Caroserie neselectat")
       document.fvalida.caroserie.focus()
       return 0;
    } 
	if (document.fvalida.detalii.value.length==0){
       alert("Detalii necompletat")
       document.fvalida.detalii.focus()
       return 0;
    }
	//valido el tipo cliente
  //  if (document.fvalida.tip_client.selectedIndex==0){
     //  alert("Tip client neselectat")
      // document.fvalida.tip_client.focus()
     //  return 0;
   // } 
	//valido la ciudad
   // if (document.fvalida.id_oras.selectedIndex==0){
      // alert("Oras neselectat")
      // document.fvalida.id_oras.focus()
      /// return 0;
    //} 
    //el formulario se envia
    //alert("Muchas gracias por enviar el formulario");
   // document.fvalida.submit();
//} 

 //else {  
                //alert("OK")  
                //cambiar la linea siguiente por return true para que ejecute la accion del formulario  
          //el formulario se envia
   // alert("Muchas gracias por enviar el formulario");
    document.fvalida.submit(); 
         }  
  ////////////
  function valida_flote(){
	
    //valido el nombre
    if (document.fvalida.nume.value.length==0){
       alert("Nume client necompletat")
       document.fvalida.nume.focus()
       return 0;
    }
	
	if (document.fvalida.email.value.length==0){
       alert("E-mail necompletat")
       document.fvalida.email.focus()
       return 0;
    }
	if (document.fvalida.telefon.value.length!=10)
	{
		alert("Numar de telefon necompletat ")
       document.fvalida.telefon.focus()
       return 0;	
	}
	if (document.fvalida.localitate.value.length==0){
       alert("Localitate necompletat")
       document.fvalida.localitate.focus()
       return 0;
    }
	if (document.fvalida.detalii.value.length==0){
       alert("Detalii necompletat")
       document.fvalida.detalii.focus()
       return 0;
    }

    document.fvalida.submit(); 
         }  
////////////VALIDARE NEWSLETTER VO
 function valida_newsletter(){
	
    //valido el nombre
    if (document.fvalida.nume.value.length==0){
       alert("Nume necompletat")
       document.fvalida.nume.focus()
       return 0;
    }
	
	if (document.fvalida.societate.value.length==0){
       alert("Denumire societate necompletat")
       document.fvalida.societate.focus()
       return 0;
    }
	if (document.fvalida.localitate.value.length==0){
       alert("Localitate necompletat")
       document.fvalida.localitate.focus()
       return 0;
    }
	if (document.fvalida.email.value.length==0){
       alert("E-mail necompletat")
       document.fvalida.email.focus()
       return 0;
    }

    document.fvalida.submit(); 
         }  
