//##################################### mis funciones

function cambio(){
//alert(document.getElementById("country").value);
valor=document.getElementById("country").value
if (valor=="0"){
	return true;
}

//los oculto y muestro el elegido
for (i=1;i<=13;i++){
	//alert(i);
	document.getElementById(i).style.display='none';
}
document.getElementById(valor).style.display='block';
}

//VALIDACION


//************************* valida el formulario de contacto
function validar(f1){
		
	   if (!(/\S/).test(f1.firstname.value)){
	   alert ("You must enter your first name");
	   f1.firstname.focus();
	   return ;
       }
	   
	    if (!(/\S/).test(f1.lastname.value)){
	   alert ("You must enter your last name");
	   f1.lastname.focus();
	   return  ;
       }
	   
	    if (!(/\S/).test(f1.company.value)){
	   alert ("You must enter your company name");
	   f1.company.focus();
	   return ;
       }
	   

   /*
	    if (!(/^[968]\d{8}$/).test(f1.phone.value)){
	   alert ("Debe introducir un n&uacute;mero de tel&eacute;fono v&aacute;lido");
	   f1.telefono.focus();
	   return ;
       }
  */
	     
		   if (f1.paises.selectedIndex==0){
		alert("Select your country, please.");
		f1.paises.focus();
		return ;
	   }
	   
	   if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/).test(f1.mail.value)){
		alert("You must enter your a valid mail address");
		f1.mail.focus();
		return ;
  		} 
			   
	    
	   if (!(/\S/).test(f1.comment.value)){
	   alert ("You must enter some text in the comments field");
	   f1.comment.focus();
	   return ;
       }
		  
		   
//SUBMITO EL FORMULARIO SI TODO HA IDO BIEN
//alert("SUBMITO");
f1.submit();
} //final funcion