function CallTBCount(params)
{
	//document.getElementById("DEBUG").innerHTML = APPSWebServerURL + 'Web2/Profil/MyTravelBag/Content.asp?' + params 
	PassAjaxResponseToFunction(APPSWebServerURL + 'Web2/Profil/MyTravelBag/Content.asp?' + params, 'ShowTBCount')
}

function ShowTBCount(response)
{
	CleanResponse = FilterContent(response)
	
	ListOfElem = CleanResponse.split('-*-')
	document.getElementById("TBCOUNT").innerHTML = ListOfElem[1]
	
}


//Section pour le choix de langue

function showLangSelect()
{
	if( GetLangFromQuery().length != 2)
	{
		//Check for cookie
		if( getCookie("LANGID") == null){
			if(document.getElementById("HEADERLANGESELECTCONTENT")){
				document.getElementById("HEADERLANGESELECTCONTENT").style.display = '';
			}			
		}
		else{
			if(document.getElementById("HEADERLANGESELECTCONTENT")){
				document.getElementById("HEADERLANGESELECTCONTENT").style.display = "none";
			}	
		}
	}
		
}

function CloseIt(lang)
{
	//no cookie, set it
	var now = new Date();
	var yearct = new Date(now.getTime() + 1000 * 60 * 60 * 24*365)
	setCookie("LANGID", lang, yearct, "/")
	location.href = window.location + "?LANGID=" + lang
}
		
		
function GetLangFromQuery()
{
	var Mylang = ""
	listofQuerys = window.location.search.split('&')
	for(c=0;c<listofQuerys.length;c++)
	{
		text = listofQuerys[c].toUpperCase()
		if (text.indexOf("LANGID") != -1)
		{
			longeur = listofQuerys[c].length
			Mylang = listofQuerys[c].substring(longeur-2,longeur)
		}
				
	}
	return(Mylang)
}
		
		
function setCookie (cookieName, cookieValue, expires, path, domain, 
secure) {
  document.cookie = 
    escape(cookieName) + '=' + escape(cookieValue) 
    + (expires ? '; EXPIRES=' + expires.toGMTString() : '')
    + (path ? '; PATH=' + path : '')
    + (domain ? '; DOMAIN=' + domain : '')
    + (secure ? '; SECURE' : '');
}
		
		
function getCookie (cookieName) {
  var cookieValue = null;
  var posName = document.cookie.indexOf(escape(cookieName) + '=');
  if (posName != -1) {
    var posValue = posName + (escape(cookieName) + '=').length;
    var endPos = document.cookie.indexOf(';', posValue);
    if (endPos != -1)
      cookieValue = unescape(document.cookie.substring(posValue, 
endPos));
    else
      cookieValue = unescape(document.cookie.substring(posValue));
  }
  return cookieValue;
}


//fin pour le choix de langue

function CallFooterLink()
{
	//document.getElementById("DEBUG").innerHTML = APPSWebServerURL + 'web2/include/footer/content.asp?' + defaultParams
	PassAjaxResponseToFunction(APPSWebServerURL + 'web2/include/footer/content.asp?' + defaultParams, 'ShowFooterLink')
}

function ShowFooterLink(response)
{
	CleanResponse = FilterContent(response)
	
	ListOfElem = CleanResponse.split('-*-')
	document.getElementById("FOOTERLINK").innerHTML =  ListOfElem[1]
	
}



function ShowFlashBanner(tmpstr)
{	 
	document.write(tmpstr)
}
