// JavaScript Document
function validaEnvio(){
	//valido el nombre
	if (document.formIncidencias.nombre.value.length == 0){
		alert("You have to write your name")
		document.formIncidencias.nombre.focus()
		return 0;
	}
	
	//valido el numero de pedido
	//if (document.formIncidencias.numpedido.value.length == 0){
		//alert("You have to write the number of order of the Incident")
		//document.formIncidencias.numpedido.focus()
		//return 0;
	//}
	
	//valido la empresa
	if (document.formIncidencias.empresa.value.length == 0){
		alert("You have to write the name of the company")
		document.formIncidencias.empresa.focus()
		return 0;
	}
	
	//valido el telefono
	if (document.formIncidencias.telefono.value.length == 0){
		alert("You have to write the number of telephone to put in touch with you")
		document.formIncidencias.nombre.focus()
		return 0;
	}
	
	//valido el email
	if (document.formIncidencias.email.value.length == 0){
		alert("You have to write an email")
		document.formIncidencias.email.focus()
		return 0;
	}

	//valido la incidencia
	if (document.formIncidencias.incidencia.value.length == 0){
		alert("You have to indicate the motive of the Incident")
		document.formIncidencias.incidencia.focus()
		return 0;
	}

	//el formulario se envia
	alert("Thank you very much for sending the form");
	document.formIncidencias.submit();
}

