// Esta funcion es valida solo para comprobar los campos de presupuesto trabajos varios


function Validar(){
    var txt = "Error en los siguientes campos: \n\n";
	msg_f = txt.length;


if (document.ValidarContacto.nombre.value=="")
		{
      alert("Por favor, introduzca su nombre en el campo correspondiente, gracias");
			document.ValidarContacto.nombre.focus();
			document.ValidarContacto.nombre.style.backgroundColor = "#C3C3C3";
			return false;
		} 

if (document.ValidarContacto.localidad.value=="")
		{
      alert("Por favor, introduzca su localidad en el campo correspondiente, gracias");
			document.ValidarContacto.localidad.focus();
			document.ValidarContacto.localidad.style.backgroundColor = "#C3C3C3";
			return false;
		} 

if (document.ValidarContacto.telefono.value=="")
		{
      alert("Por favor, introduzca su telefono en el campo correspondiente, gracias");
			document.ValidarContacto.telefono.focus();
			document.ValidarContacto.telefono.style.backgroundColor = "#C3C3C3";
			return false;
		} 

if (document.ValidarContacto.correo.value=="")
		{
      alert("Por favor, introduzca su e-mail en el campo correspondiente, gracias");
			document.ValidarContacto.correo.focus();
			document.ValidarContacto.correo.style.backgroundColor = "#C3C3C3";
			return false;
		} 


if (document.ValidarContacto.referido.selectedIndex == 0)
	{
		alert("Por favor, indique como nos conoció, gracias");
		document.ValidarContacto.referido.focus();
		document.ValidarContacto.referido.style.backgroundColor = "#C3C3C3";
		return false;

	}


if (document.ValidarContacto.comentario.value=="")
		{
      alert("Por favor, introduzca un comentario en el campo correspondiente, gracias");
			document.ValidarContacto.comentario.focus();
			document.ValidarContacto.comentario.style.backgroundColor = "#C3C3C3";
			return false;
		} 



if (document.ValidarContacto.aceptar_condiciones.checked == false )
	{
		alert("Por favor, lea y acepte las condiciones de uso, gracias");
		document.ValidarContacto.aceptar_condiciones.focus();
		document.ValidarContacto.aceptar_condiciones.style.backgroundColor = "#C3C3C3";
		return false;

	}


if (msg_f != txt.length){
	alert(txt);
	return false;
	}else{
		return true;
	}
}
