







	/*Object ElemMenu*/
	function ElemMenu(idancestor,id,dcr)
	{
		this.idancestor = idancestor;
		this.id = id;
		this.dcr = dcr;
	}
	/*Object ItemMenu*/
	function ItemMenu(name)
	{
		this.name = name;
		this.tabDcrs = new Array;/*Table of DCRs contained in this item*/
		this.tabElems = new Array;/*Table of ElemMenu contained in this item*/
		this.addElem = addElemMenu;
		this.containDcr = containDcrMenu;
		this.getTabIds = getTabIdsMenu;
		this.getElemMenuById = getElemMenuById;
	}
	/*Function for add an ElemeMenu in ItemMenu*/
	function addElemMenu(idancestor,id,dcr)
	{
		this.tabDcrs.push(dcr);
		var newElem = new ElemMenu(idancestor,id,dcr);
		this.tabElems.push(newElem);
	}
	/*Function for find if ItemMenu contain a dcr*/
	function containDcrMenu(dcr)
	{
		for(var i=0;i<this.tabDcrs.length;i++){
			if(this.tabDcrs[i] == dcr) {
				return true;
			}
		}
		return false;
	}
	/*Function for get an ElemeMenu in ItemMenu by Id*/
	function getElemMenuById(id)
	{
		for(var i=0;i<this.tabElems.length;i++){
			if(this.tabElems[i].id == id) {
				return this.tabElems[i];
			}
		}
		return false;
	}
	/*Function for get the table of self and ancestor IDs ElemeMenu in ItemMenu by dcr*/
	function getTabIdsMenu(dcr)
	{
		if(this.containDcr(dcr)) {
			var tabIds = new Array;
			for(var i=0;i<this.tabElems.length;i++){
				if(this.tabElems[i].dcr == dcr) {
					tabIds.push(this.tabElems[i].id);
					var idancestor = this.tabElems[i].idancestor;
					while(idancestor > 0){
						var ancestor = this.getElemMenuById(idancestor);
						if(ancestor) {
							tabIds.push(ancestor.id);
							idancestor = ancestor.idancestor;
						} else {
							idancestor = 0;
						}
					}
					return tabIds;
				}
			}
		}
		return false;
	}
	/*Object MenuAF*/
	function MenuAF()
	{
		this.tabItems = new Array;/*Table of Items contained in this menu*/
		this.addItem = addItemMenu;
		this.getCurrentRubrique = getCurrentRubrique;
		this.getCurrentItem = getCurrentItem;		
	}
	/*Function for add an item in MenuAF*/
	function addItemMenu(newItem)
	{
		this.tabItems.push(newItem);
	}
	/*Function for get the current ItemMenu object through cu_Dcr set in tpl*/
	function getCurrentItem()
	{
		if(cu_Dcr && cu_Dcr.length > 0){
			for(var i=0;i<this.tabItems.length;i++){
				if(this.tabItems[i].containDcr(cu_Dcr)) {
					return this.tabItems[i];
				}
			}
		}
		return false;
	}
	/*Function for get the currentRubrique through cu_Dcr set in tpl*/
	function getCurrentRubrique()
	{
		var currentItemMenu = this.getCurrentItem();
		if(currentItemMenu) {
			return "id_" + currentItemMenu.name;
		}
		return false;
	}



/*Begin set of ItemMenu Objects with xml menu*/

		
		var menuAF = new MenuAF();
		


		
		var itemFooter = new ItemMenu('itemFooter');
		menuAF.addItem(itemFooter);
		itemFooter.addElem(0,0,"footer");itemFooter.addElem(0,1,"aide_et_contact");itemFooter.addElem(0,2,"faq_fblue");itemFooter.addElem(0,3,"plan_du_site");itemFooter.addElem(0,4,"corporate_airfrance");itemFooter.addElem(0,5,"edito_notices_legales_hp");itemFooter.addElem(0,6,"klm");itemFooter.addElem(0,7,"VluchtenAirFrance");itemFooter.addElem(0,8,"airfrance.com");itemFooter.addElem(0,9,"empire_of_sports");

/*End set of ItemMenu Objects with xml menu*/

cu_Http="http://";
cu_Https="https://";


/*fonction pour ouvrir les liens du menu (permet la gestion des params d'ouverture en popup)*/
function af_md(iu_UrlMenu,iu_HttpsMenu,iu_ParametreMenu)
{
  var vo_UrlMenu=new String(iu_UrlMenu) ;
  if (vo_UrlMenu.length && vo_UrlMenu.substr(0,7)!= "http://" && vo_UrlMenu.substr(0,8)!= "https://"){
  	/*Si on a une action ou une jsp on ajoute la chaine base cgi-bin/AF et la session*/
		if (vo_UrlMenu.indexOf(".do")>0 || vo_UrlMenu.indexOf(".jsp")>0){
			vo_UrlMenu=(iu_HttpsMenu?cu_Https:cu_Http)+cu_Serveur+chaineBase+vo_UrlMenu;
		}
		else{   	/*Si on a une page statique on ajoute juste la session*/
			if (vo_UrlMenu.indexOf(".htm")>0 || vo_UrlMenu.indexOf(".html")>0){
				vo_UrlMenu=(iu_HttpsMenu?cu_Https:cu_Http)+cu_Serveur+vo_UrlMenu;
			}
		}
  }
  /*affichage du lien en popum avec les params recup du xml menu*/
  if (iu_ParametreMenu)
  {
    var vo_FenetreMenu = window.open(vo_UrlMenu,"popup",iu_ParametreMenu);
    vo_FenetreMenu.focus();
		var vo_PopMenu = window.open(vo_UrlMenu,"popup",iu_ParametreMenu+",scrollbars=yes");
		if((!vo_PopMenu) || (vo_PopMenu.closed)){
		      alert(".");
		} else{
		 vo_FenetreMenu.focus();
		}	  
	}
  else 	/*Si url complete on la passe telle suelle*/
  {
	document.location=vo_UrlMenu;
  }
}


/*Alimentation des variables utiles pour le header*/
var affichagePicto = "Yes";
var countryLabel = "Nederlands";
var searchInSiteUrl = "";
var defaultSeachInputContent = "";
var aideUrl = "/NL/nl/local/transverse/footer/aide_et_contact.htm?menu=false";
var aideParamUrl = "";
var aideLibUrl = "Contacten";
var faqUrl = "/NL/nl/common/transverse/footer/faq_fblue.htm";
var faqParamUrl = "width=580,height=510,scrollbars=yes";
var faqLibUrl = "FAQ";
var champsRechercher = "";

var premiereLangue =  "Nederlands";
var deuxiemeLangue =  "English";
var troisiemeLangue =  "";
var isMultiLangues = premiereLangue && deuxiemeLangue;
var autresPays = "Andere landen";
var premiereLangueUrl = chaineBase + "/NL/nl/local/home/home/HomePageAction.do";
var deuxiemeLangueUrl = chaineBase + "/NL/en/local/home/home/HomePageAction.do";
var troisiemeLangueUrl = chaineBase + "";
var autresPaysUrl = chaineBase + "/NL/nl/local/home/home/redirection_home.jsp";
var traductionPays= "Nederlands";
var urlQgo =  "";
var qgoRechercher =  "";
var qgoOk =  "";


function initFaqPopup() {
  document.getElementById('idFaqQuestion').value = document.getElementById('idQgoQuestion').value;
  document.getElementById('idFaqLanguage').value = cu_Langue;
  document.getElementById('idFaqCountry').value = cu_Marche;
  document.getElementById('idFaqReferrer').value = cu_Serveur;
  document.getElementById('idFaqDefaultQuestionBoolean').value = (document.getElementById('idQgoQuestion').value==document.getElementById('idQgoQuestion').defaultValue);
  var popup = window.open('','faqPopup','menubar=no, location=no, scrollbars=no, statusbar=no, width=890, height=450');
  document.faqForm.action = '';
  document.faqForm.target = 'faqPopup';
  document.faqForm.submit();
}

function goToHome() {
  var urlHomePage = "";
  for (var i=0;i<cu_Monet.length;i++){
     if (cu_Marche == cu_Monet[i]) { 
          urlHomePage = chaineBase + '/' + cu_Marche + '/' + cu_Langue + '/common/home/home/HomePageAction.do'; 
          break;
     }
  }
  if (urlHomePage == ""){
		for (i=0; i<cu_MonetNonVendeur.length; i++){
			if (cu_Marche == cu_MonetNonVendeur[i]) {
				urlHomePage = chaineBase + '/' + cu_Marche + '/' + cu_Langue + '/common/home/home/HomePageAction.do' + '?' + chaineLien;
				break;
			}
		}
	}
	
  if (urlHomePage == ""){
     urlHomePage = chaineBase + '/' + cu_Marche + '/' + cu_Langue + '/common/util/forwardClusterAction.do?url=flyingblue.htm';     
  }
  document.location = urlHomePage;
}

/* Variables pour le bloc FB */
	var libBoutonDepliantShow = "Details";
	var libBoutonDepliantHide = "Hide";

  var msgNoReservation = "no current booking";
  var msgOtherReservations = "all bookings";
  var labelRef = "Saisir le libellé";

	var urlLoginXml = chaineBase + '/' + cu_Marche + '/' + cu_Langue + '/local/home/login/XmlLoginAction.do';

	var libNiveauxTier = new Array();
	libNiveauxTier[0] = "";
	libNiveauxTier[1] = "";
	libNiveauxTier[2] = "";
	libNiveauxTier[3] = "";
	libNiveauxTier[4] = "";
	libNiveauxTier[5] = "";
	libNiveauxTier[6] = "";
	
	var msg_plage_longueur_alphanum = "Het veld {0} moet tussen de {1} en {2} karakters bevatten.";
	var msg_champs_alphanumeriques = "Het veld {0} mag geen spaties, symbolen en/of speciale karakters bevatten.";
	var msgMandatoryField = "Graag alle in rood aangegeven velden invullen.";

	var vocaIdentifiant	= "Flying Blue n°";
	var vocaMotDePasse	= "Pincode";
	
	/** Controle : Identifiant **/
	var msgFbNumberLength = msg_plage_longueur_alphanum.replace('\{0\}', vocaIdentifiant);
	msgFbNumberLength = msgFbNumberLength.replace("\{1\}", "6");
	msgFbNumberLength = msgFbNumberLength.replace("\{2\}", "16");
	msgFbNumberLength = msgFbNumberLength.replace("'", "\'");

	var msgFbNumberAlphaNum = msg_champs_alphanumeriques.replace("\{0\}", vocaIdentifiant);
	msgFbNumberAlphaNum = msgFbNumberAlphaNum.replace("'", "\'");
  

	/** Controle : Mot de passe **/
	var msgFbPasswordLength = msg_plage_longueur_alphanum.replace("\{0\}",vocaMotDePasse);
	msgFbPasswordLength = msgFbPasswordLength.replace("\{1\}", "4");
	msgFbPasswordLength = msgFbPasswordLength.replace("\{2\}", "10");
	msgFbPasswordLength = msgFbPasswordLength.replace("'", "\'");

	var msgFbPasswordAlphaNum = msg_champs_alphanumeriques.replace("\{0\}", vocaMotDePasse);
	msgFbPasswordAlphaNum = msgFbPasswordAlphaNum.replace("'", "\'");

	function showLoginError(errorCode) {
		var errorMsg;
		if(errorCode == 'COMM_MESG_LOGIN_NON_TROUVE') {
			errorMsg = "We were not able to retrieve your profile with the data you have entered.  Please check for accuracy.";
		}
		if(errorCode == 'COMM_MESG_LOGIN_INVALIDE') {
			errorMsg = "De ID of de toegangscode is incorrect. Na 3 mislukte pogingen, wordt uw account gedurende 30 minuten geblokkeerd. Als u uw Flying Blue-kaart en/of uw toegangscode hebt verloren, verzoeken we u om op de link ‘Toegangscode verloren’ in het vakje inloggen van Flying Blue te klikken.  Opmerking: om veiligheidsredenen zijn de oude codes niet langer geldig.";
		}
		if(errorCode == 'COMM_MESG_FORMAT_PASSWORD') {
			errorMsg = "Your access code is incorrect. Please type in your 4-figure personal access code. Access is denied after 3 unsuccessful login attempts.";
		}
		if(errorCode == 'COMM_MESG_LOGIN_BLOQUE') {
			errorMsg = "Access to your account will be suspended for 30 minutes.";
		}
		if(errorCode == 'COMM_MESG_LOGIN_INVALIDE_BLOQUE') {
			errorMsg = "Deze toegangscode is niet correct. De toegang tot uw account is nu gedurende 30 minuten geblokkeerd.";
		}
		if(errorCode == 'COMM_MESG_POSSEDE_LOGIN') {
			errorMsg = "You have an internet profile. Please enter your user ID for access.";
		} 
		if(errorCode == 'COMM_MESG_REFUSER') {
			errorMsg = "You must be a Flying Blue program member to access this site.";
		}  
		if(errorCode == 'COMM_MESG_ERREUR_TECHNIQUE') {
			errorMsg = "";
		}
		alert(errorMsg);
	}

function toggleLoginBoxState(){
 if(document.getElementById("FBNotLoggued") != null){
	 if(document.getElementById("FBNotLoggued").style.display =="block"){
		 document.getElementById("FBNotLoggued").style.display = "none";
		 if(document.getElementById("toggleLogoFB") != null)document.getElementById("toggleLogoFB").src = "";
	 }
	 else {
		 if(document.getElementById("toggleLogoFB") != null)document.getElementById("toggleLogoFB").src = "";
			 document.getElementById("FBNotLoggued").style.display = "block";
		
		 }
 }
}

/* Ajustement pour IE version superieure a 6 : IE7 et IE8 */
document.write('<!--[if gt IE 6]>');
	document.write('<style type="text/css">');
		document.write('#headerFB #FBLoggued .links {');
			document.write('padding-top:7px !important;');
		document.write('}');
		document.write('#headerFB #FBNotLoggued .links {');
			document.write('padding-top:0px !important;');
		document.write('}');
		document.write('#FBLogguedIdentity {');
			document.write('padding-top:6px !important;');
		document.write('}');
		document.write('#surheader #blocQgo #idQgoOk {');
			document.write('margin:0 0px 0 4px !important;');
		document.write('}');
	document.write('</style>');
document.write('<![endif]-->');

document.write('<!--[if gte IE 8]>');
	document.write('<style type="text/css">');
		document.write('.depliantBottom .boutonDepliant img {');
			document.write('top:-2px !important;');
		document.write('}');
	document.write('</style>');
document.write('<![endif]-->');

/* Fin Variables pour le bloc FB */






