/**********************************************************************************************

***********************************************************************************************/
function log(inorout,lng) {
if (inorout=="in") {
 var url="/authentication/login.php";
 params= {
  thelogin: $F("thelogin"),
  thepwd: $F("thepwd"),
  langue: lng
 }
} else {
 switch (lng) {
  case "de":
   msgQuit='Schliessen ?';
  break;
  case "es":
   msgQuit="¿Cerrar la sesión?";
  break;
  case "gb":
  msgQuit="Close session ?";
  break;
  case "it":
   msgQuit="Chiudere la sessione ?";
  break;
  case "po":
   msgQuit="Fechar a sessão ?";
  break;
  default:
   msgQuit="Fermer la session ?";
  break;
 } // switch

 if (!window.confirm(msgQuit)) return;

 var url="/authentication/logout.php";
 params= { }
}
transport=new Ajax.Request(url,
{
 method:'post',
 parameters: params,
 onFailure: showmsg,
 onSuccess: function() {
  top.location.reload();
  return;
 }
}
);
} // function

/***********************************************************************************************

***********************************************************************************************/
function control(lng) {
var url="/authentication/control.php";
transport=new Ajax.Updater('loginDiv', url,
{
 method:'post',
 parameters: {
  langue: lng
 }
}
);
return;
} // function

/***********************************************************************************************

***********************************************************************************************/
function showmsg(objet) {
alert(objet.responseText);
$F('thelogin')="";
$F('thepwd')="";
return;
}  // function

/***********************************************************************************************

***********************************************************************************************/
function showSubmitButton() {
$('btSubmit').style.display=($F('thepwd').blank() || $F('thelogin').blank())?'none':'';
return;
}  // function

/***********************************************************************************************

***********************************************************************************************/
function forgottenPassword(lng) {
 switch (lng) {
  case "de":
   msg="Um ihr Passwort zu bestellen, bitte kontaktieren Sie die FIBD/DA.\nNur für Mitglieder der FIBD/DA !";
   text="Schreiben Sie bitte Ihren Namen, Ihren Vornamen und Ihre Lizenznummer ein und wir werden Ihnen den Login und das Passwort zurücksenden.";
  break;
  case "es":
   msg="Para obtener su identificación y su contraseña, por favor contacte a la FIBD/DA.\n¡ Exclusivamente reservado a los licenciados de la FIBD/DA !";
   text="Escriba su nombre y apellidos, su número de licencia FIBD/DA y le enviaremos por e-mail su identificacion y su contraseña.";
  break;
  case "gb":
   msg="In order to get yout ID and your password, please contact the FIBD/DA.\nFor FIBD/DA licence holders only !";
   text="Please fill in the fields with your name, surname and FIBD/DA licence number and we shall send you back your login and your password.";
  break;
  case "it":
   msg="Per ottenere il Suo password per favore contattare la FIBD/DA.\nSolo per i membri della FIBD/DA con la licenza aggiornata !";
   text="Compilare per piacere il Suo nome, cognome e numero della licenza, et noi le inviaremmo il login ed il password.";
  break;
  case "po":
   msg="Para obter a Sua identificação e o password contactar a FIBD/DA.\nSoamente para membros com licença da FIBD/DA !";
   text="Faça favor de escrever o Seu nome e apelidos, asim como o numero da licença.";
  break;
  default:
   msg="Pour obtenir votre identifiant et votre mot de passe, contactez la FIBD/DA.\nExclusivement réservé aux membres licenciés de la FIBD/DA !";
   text="Inscrivez vos noms, prénom et numéro de licence FIBD/DA et nous vous enverrons par retour d'e-mail votre identifiant et votre mot de passe.";
  break;
 } // switch
alert(msg);
return;
}


/***********************************************************************************************

***********************************************************************************************/
function show_dnload() {
switch(langue_en_cours) {
 case "de": 
  txt="Unterladen";
 break;
case "es": 
  txt="Descarga";
 break;
case "gb": 
  txt="Download";
 break;
case "it": 
  txt="Scaricare";
 break;
case "po": 
  txt="Descarregar";
 break;
default:
  txt="Télécharger";
 break;
} // switch

var url="/downloads/downloads.php";
var transport=new Ajax.Updater('innerBox',url,
 {
  method: 'post',

  onFailure: function() {
    alert(transport.responseText);
    return;
   },

  onSuccess: function() {
   $("textBox").innerHTML=txt;
   $("innerBox").style.backgroundColor="#FFFFFF";
   $("outerBox").style.width="280px";
   $("outerBox").style.height="240px";
   if (!$("outerBox").visible()) $("outerBox").show();
  } // onsuccess
 }); // new transport
return;
} // function
