function canviar_idioma(){
  //
  vector=location.pathname.split("/");
  numero_posiciones=vector.length;
  //Idioma catalā
  if(document.forms.usuapas.veosat_crono_idioma.value=="cat"){
    //Si ya estoy en cat
	if(vector[vector.length-2]=="cat"){ /*alert("NO FER RES");*/ }
	//Si estoy en el ingles
	else if(vector[vector.length-2]=="en") window.location="../cat/"+vector[numero_posiciones-1];
	//Si estoy en espaņol
	else window.location="cat/"+vector[numero_posiciones-1];
  }
  //Idioma ingles
  else if(document.forms.usuapas.veosat_crono_idioma.value=="en"){
    //Si ya estoy en en
	if(vector[vector.length-2]=="en"){ /*alert("NO FER RES");*/ }
	//Si estoy en el cat
	else if(vector[vector.length-2]=="cat") window.location="../en/"+vector[numero_posiciones-1];
	//Si estoy en espaņol
	else window.location="en/"+vector[numero_posiciones-1];	  
  }
  //Idioma castella
  else if(document.forms.usuapas.veosat_crono_idioma.value=="es"){
	//Si estoy en el es
	if(vector[vector.length-2]=="www.veosat.com"){ /*alert("NO FER RES");*/ }
	//Si estoy en el cat o en
	else window.location="../"+vector[numero_posiciones-1];
  }
}
//
//
//
//
function redirigir(){
  vector=location.pathname.split("/");

  nombre=navigator.appName;
  //
  if(nombre=="Microsoft IE Mobile") window.location="http://www.veosat.com/crono_pda";  
  //Si estoy en cat
  if(vector[vector.length-2]=="cat") document.forms.usuapas.veosat_crono_idioma.selectedIndex=1;
  //Si estoy en en
  else if(vector[vector.length-2]=="en") document.forms.usuapas.veosat_crono_idioma.selectedIndex=2;
  //Si estoy en es
  else document.forms.usuapas.veosat_crono_idioma.selectedIndex=0;

}
//
//
//
//
function comprobar_login(){
  enviar=true;
  //Compruevo que se haya escrito un usuario
  if(document.forms.usuapas.veosat_crono_user.value==""){
    alert("Escribe un usuario.");
	document.forms.usuapas.veosat_crono_user.focus();
	enviar=false;
  }
  //Compruevo que se haya escrito una contraseņa
  else if(document.forms.usuapas.veosat_crono_password.value==""){
    alert("Escribe una contraseņa.");
	document.forms.usuapas.veosat_crono_password.focus();
	enviar=false;
  }
  
  return enviar;
}

