// JavaScript Document
function CheckContactForm () {
	var url = location.href;
	var nombre;
	var email;
	var asunto;
	var mensaje;
	if (url.search(/contactenos/) == -1 )
	{ 
		nombre = "Please write your name";
		email = "Please write a valid email";
		asunto = "Please select a subject";
		mensaje = "Please write a message";
	}
	else
	{
		nombre = "Por favor introduzca su nombre.";
		email = "Por favor introduzca un correo válido.";
		asunto = "Por favor seleccione el Asunto";
		mensaje = "Por favor introduzca su mensaje.";
	}
	if (document.form1.nombre_completo.value == ""){
   alert(nombre);
    document.form1.nombre_completo.focus();
   return false;
  }   
  
  
   if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.email.value)){
	} else {
    alert(email);
    document.form1.email.focus();
    return (false); }

if (document.form1.asunto.selectedIndex == 0){
   alert(asunto);
    document.form1.asunto.focus();
   return false;
  } 
		
  if (document.form1.mensaje.value == ""){
   alert(mensaje);
    document.form1.mensaje.focus();
   return false;
  } 
		
}

function valuepass (Select, hidden)
{	
	var x=document.getElementById(Select);
	x.options[x.selectedIndex].text;
	document.getElementById(hidden).value = x.options[x.selectedIndex].text;
	/*alert(document.getElementById(hidden).value);*/
}