<!--
if (document.getElementById) document.write('<style type="text/css" media="screen">#TJK_Menu .trigger ul {display:none}#TJK_Menu .showUL ul {display:block}</style>');

// show/hide the nested ULs (no trigger class needed in the markup)
function TJKtoggler(){ // v1.6.5 Copyright (c) TJKDesign - Thierry Koblentz

var bodyID = document.getElementsByTagName('body')[0].id;
var e = document.getElementById("TJK_Menu");
var strLocation = top.location.pathname;
var LI = e.getElementsByTagName("li");
var zLI= LI.length;
	for(var k=0;k<zLI;k++){
		// the href value in the markup would trigger a very weird bug in IE Win. 
		// the page freezes if the user clicks on a link before the page is completely loaded
		// the strange thing is that it has nothing to do with the menu
		// because even with this script off it does exactly the same
		if(LI[k].parentNode.id=="TJK_Menu") {
		// create the anchor for the triggers	
			LI[k].className = "trigger";
			LI[k].getElementsByTagName('a')[0].href="#";
			LI[k].getElementsByTagName('a')[0].title="Open/Close the sub-menu";
		}	
		// top level list items or the *company* list item (contains list of planes + info page)
		if(LI[k].parentNode.id=="TJK_Menu" || LI[k].id=="hank") {
			LI[k].getElementsByTagName('a')[0].onclick=swap;
		}			
	}
// if the 3rd level is opened we set the id for the Airline Name, we open the 3rd level List and we keep opened the parent List	
	if (bodyID=="airline" || bodyID=="plane" || bodyID=="articles"){
	document.getElementById("hank").getElementsByTagName('a')[0].id="hankStyle";
	// in case there is no third level menu (articles page)
	if (document.getElementById("hank").getElementsByTagName('ul')[0]) document.getElementById("hank").getElementsByTagName('ul')[0].style.display="block";
	document.getElementById("hank").parentNode.parentNode.className="showUL";
	
// we select the airline info link if we're in the AIRLINE info section and we keep select current link as well
	if (bodyID=="airline"){
		document.getElementById("hank").getElementsByTagName('a')[1].className="hank";
// remove link for current page (horizontal navigation)
	    var horLinks = document.getElementById("airlineMenu").getElementsByTagName('a');
		for (var j=0; j<horLinks.length; j++){
			if (horLinks[j].href == strLocation){
				var objNode = horLinks[j];
           		strContent = objNode.firstChild.data;
		        var objCurrentPage = document.createElement('em');
    	        objCurrentPage.appendChild(document.createTextNode(strContent));
    		    objNode.parentNode.replaceChild(objCurrentPage, objNode);
       		}
    	}
	}
// remove link for current page (vertical navigation)
    var verLinks = e.getElementsByTagName('a');
    	for (var i=0; i<verLinks.length; i++){
			// make sure we're not dealing with a fake link and check if it is a self reference
			if (verLinks[i].href.indexOf("#")==-1 && verLinks[i].href.indexOf(strLocation)!=-1){
				var objNode = verLinks[i];
	            var strContent = objNode.firstChild.data;
    		    var objCurrentPage = document.createElement('em');
        	    objCurrentPage.appendChild(document.createTextNode(strContent));
            	objNode.parentNode.replaceChild(objCurrentPage, objNode);
        	}
    	}

	}
}	
function swap(){ // v1.6 Copyright (c) TJKDesign - Thierry Koblentz
var e = document.getElementById("TJK_Menu");
var LI = e.getElementsByTagName("li");
var zLI= LI.length;
	if(this.parentNode.className=="showUL"){// si celui-ci est ouvert on le ferme
		this.parentNode.className="trigger";		
	return false; // to make sure the UA doesn't load the href value
	}
	for(var k=0;k<zLI;k++){
		if(LI[k].className=="showUL"){
			// onclick on ferme tout ceux ouverts
			LI[k].className="trigger";
			// sauf le 3rd level si il y en a un 
			var Nested_LIs = LI[k].getElementsByTagName("li");
			var zNested_LIs = Nested_LIs.length;
			for(var x=0;x<zNested_LIs;x++){
			// there is a 3rd level nested below 
				if(Nested_LIs[x].id=="hank"){
					LI[k].className="showUL";
				}
			}
		}
	}
	// si celui-ci est ferme on l'ouvre 
	if(this.parentNode.className=="trigger") {
	this.parentNode.className="showUL";
	// au cas où il y a un 3e niveau quand on ouvre un submenu, on le cache 
	if(this.parentNode.getElementsByTagName('ul')[1])this.parentNode.getElementsByTagName('ul')[1].style.display="none";
	}
	
// from the second level si il y a un 3e niveau caché on l'ouvre ou on le ferme
	if(this.parentNode.id=="hank"){
		// first, make sure on ne cache pas le parent
		this.parentNode.parentNode.parentNode.className="showUL";		
		if(this.parentNode.getElementsByTagName('ul')[0].style.display=="block"){
			this.parentNode.getElementsByTagName('ul')[0].style.display="none";
		}else{
			this.parentNode.getElementsByTagName('ul')[0].style.display="block";		
		}
	}
	return false;// to make sure the UA doesn't load the href value
}

// From Simon Willison's Weblog
// http://simon.incutio.com/archive/2004/05/26/addLoadEvent
/*  function addLoadEvent(func) {var oldonload = window.onload;if(typeof window.onload != 'function'){window.onload = func;}else{window.onload = function(){oldonload();func();}}}
addLoadEvent(function(){if(document.getElementById)TJKtoggler();});  */
//-->