		function validarContacto(){
			if ((document.getElementById('txtEmail').value=='') ||(document.getElementById('txtComentario').value=='')){
	   			alert ("Faltan campos por rellenar. Los campos Email y Comentario son obligatorios.");
				return false;
			}else{
				if(isEmail(document.getElementById('txtEmail').value) == false){
					alert('El Email que ha introducido no es correcto');
					return false;
				}else{
					if(document.getElementById('condiciones').checked){
						return true;
					}else{
						alert("Debe aceptar la política de privacidad");
						return false;
					}
				}
			}
 		}
 		
 		
 		function validaCombo(opcion){
 			var combo;
			
			combo=document.getElementById(opcion);
			if (combo.options[combo.selectedIndex].value=='0')
 			{
	   			alert ("Debes seleccionar algun valor");
	   			combo.focus();
				return false;
			}
			return true;
 		}
 		
 		function validarCuestionario(){
 			
 						
			if(!validaCombo('SatAdministracionTrato'))
				return false;
			if(!validaCombo('ImpAdministracionTrato'))
				return false;
			if(!validaCombo('SatAdministracionRapidez'))
				return false;
			if(!validaCombo('ImpAdministracionRapidez'))
				return false;
			if(!validaCombo('SatAdministracionClaridadFactura'))
				return false;
			if(!validaCombo('ImpAdministracionClaridadFactura'))
				return false;
			if(!validaCombo('SatComercialAtencion'))
				return false;
			if(!validaCombo('ImpComercialAtencion'))
				return false;
			if(!validaCombo('SatComercialConocimiento'))
				return false;
			if(!validaCombo('ImpComercialConocimiento'))
				return false;
			if(!validaCombo('SatComercialAsesoramiento'))
				return false;
			if(!validaCombo('ImpComercialAsesoramiento'))
				return false;
			if(!validaCombo('SatComercialGarantia'))
				return false;
			if(!validaCombo('ImpComercialGarantia'))
				return false;
			if(!validaCombo('SatTecnicoRapidezEntrega'))
				return false;
			if(!validaCombo('ImpTecnicoRapidezEntrega'))
				return false;
			if(!validaCombo('SatTecnicoRapidezRespuesta'))
				return false;
			if(!validaCombo('ImpTecnicoRapidezRespuesta'))
				return false;
			if(!validaCombo('SatTecnicoFiabilidad'))
				return false;
			if(!validaCombo('ImpTecnicoFiabilidad'))
				return false;
			if(!validaCombo('SatTecnicoAtencion'))
				return false;
			if(!validaCombo('ImpTecnicoAtencion'))
				return false;
			if(!validaCombo('SatTecnicoInformacion'))
				return false;
			if(!validaCombo('ImpTecnicoInformacion'))
				return false;				
				

						 		
 			return true;
 		}
 		
 		


		function validarTrabajador(){
			if ((document.getElementById('txtNombre').value=='') || (document.getElementById('txtApellidos').value=='') || (document.getElementById('txtTelefono').value=='') || (document.getElementById('txtEmail').value=='')){
				alert ("Faltan campos por rellenar. Los campos Nombre, Apellidos, Telefono y Email son obligatorios.");
				return false;
			}else{
				if(isEmail(document.getElementById('txtEmail').value) == false){
					alert('El Email que ha introducido no es correcto');
					return false;
				}else{
					if(document.getElementById('aceptar').checked){
						return true;
					}else{
						alert("Debe aceptar la política de privacidad");
						return false;
					}
				}
			}
		 }

function validar_contacto()
{
	if ((document.getElementById('txtEmail').value=='') ||(document.getElementById('txtComentario').value==''))
	{
	   alert ("Faltan campos por rellenar. ");
		return false;
	}
	else
	{
		if(isEmail(document.getElementById('txtEmail').value) == false)
		{
			alert('El E-mail que ha introducido no es correcto');
			return false;
		}
		else
		{
			if(document.getElementById('condiciones').checked)
			{
				return true;
			}
			else
			{
				alert("Debe aceptar la política de privacidad");
				return false;
			}
		}
	}
 }

 function validar_trabajador()
{
	if ((document.getElementById('txtNombre').value=='') || (document.getElementById('txtApellidos').value=='') || (document.getElementById('txtTelefono').value=='') || (document.getElementById('txtEmail').value==''))
	{
	   alert ("Faltan campos por rellenar. Los campos Nombre, Apellidos, Telefono y Email son obligatorios.");
		return false;
	}
	else
	{
		if(isEmail(document.getElementById('txtEmail').value) == false)
		{
			alert('El Email que ha introducido no es correcto');
			return false;
		}
		else
		{
			if(document.getElementById('aceptar').checked)
			{
				return true;
			}
			else
			{
				alert("Debe aceptar la política de privacidad");
				return false;
			}
		}
	}
 }



	function isEmail(str) {
	var result = false
	var theStr = new String(str)
	var index = theStr.indexOf("@");
	if (index > 0) {
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1))
			result = true;
	}
	return result;
}