// Preloader der Navigationsgrafiken und Funktion zum Austauschen dieser mittels OnMouseOver-
// Effekt. Der Funktionsaufruf im Script erfolgt mittels:
//              preload(X);
// wobei "X" fuer die Anzahl der Ebenen steht, die hochgesprungen werden muss, um in den 
// "/global" - Order zu kommen.

image01 = new Image()
image01on = new Image();
image02 = new Image()
image02on = new Image();
image03 = new Image()
image03on = new Image();
image04 = new Image()
image04on = new Image();
image05 = new Image()
image05on = new Image();
image06 = new Image()
image06on = new Image();
image07 = new Image()
image07on = new Image();

function preload(ebene)
  {
  var pfad = "";
  if (navigator.appVersion.indexOf("2.") != -1)
    {
    check = false;
    }
  if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1))
    {
    check = false;
    }
  else
    {
    check = true;
    }
  if (check == true)
    {
    while(ebene > 1)
      {
      pfad  = pfad + "../";
      ebene = ebene - 1;
      }
    pfad = pfad + "img/navi_";
    image01.src = pfad + "kfelder" + "_lo.gif"  ;
    image01on.src = pfad + "kfelder" + "_hi.gif"  ;
    image02.src = pfad + "presse" + "_lo.gif";
    image02on.src = pfad + "presse" + "_hi.gif";  
    image03.src = pfad + "investor" + "_lo.gif"  
    image03on.src = pfad + "investor" + "_hi.gif" ; 
    image04.src = pfad + "career" + "_lo.gif"  ;
    image04on.src = pfad + "career" + "_hi.gif"  ;
    image05.src = pfad + "kthemen" + "_lo.gif";  
    image05on.src = pfad + "kthemen" + "_hi.gif";  
    image06.src = pfad + "allianzen" + "_lo.gif"  ;
    image06on.src = pfad + "allianzen" + "_hi.gif" ; 
    image07.src = pfad + "events" + "_lo.gif"  ;
    image07on.src = pfad + "events" + "_hi.gif";
    }
  }

imageStay = ""

function imageon(name)
  {
  if (imageStay != name) { document[name].src = eval(name + "on.src"); }
  }
function imageoff(name)
  {
  if (imageStay != name) { document[name].src = eval(name + ".src"); }
  }

function on(name) 
  { 
  if (check == true) { imageon(name); }
  }
function off(name)
  {
  if (check == true) { imageoff(name); }
  }
 

// Funktion fuer das Wegspringen des "Take off"-Buttons im grauen Balken oberhalb de
// eigentlichen Textinhaltes:
function TakeOffJump(FormName,SelectName)
  {
  var jumpLocation = eval("document." + FormName + "." + SelectName + ".options[document." + FormName + "." + SelectName + ".selectedIndex].value");
  window.location.href = jumpLocation;
  }


// Oeffnen der Fenster, wenn man auf einen Link verweist, der sich ausserhalb des Lufthansa-
// auftrittes (Konzernportal und InfoFlyWay) befindet
function openwindow(URLlink) 
  {
	window.open(URLlink,"Fenster","titlebar,toolbar,status,menubar,location,hotkeys,directories,resizable,scrollbars,height=460,width=620,left=20,top=20");
  }
function openSmallwindow(URLlink) 
  {
	window.open(URLlink,"Fenster","titlebar,toolbar,status,menubar,location,hotkeys,directories,resizable,scrollbars,height=400,width=200,left=20,top=20");
  }



// Funktion fuer das Wegspringen vom "Take off"-Button, wenn nicht der InfoFlyWay Ausgewaehlt 
// ist.
function InfoFlyWayJump(FormName,SelectName)
  {
  var jumpLocation = eval("document." + FormName + "." + SelectName + ".options[document." + FormName + "." + SelectName + ".selectedIndex].value");
  if ((jumpLocation == "http://www.lufthansa.com/aerodyn/publish.aero?screen=fly/de/hom/hom_body.html&wrap=hom&l=de&p=fly") | (jumpLocation == "http://www.lufthansa.com/aerodyn/publish.aero?screen=fly/en/hom/hom_body.html&wrap=hom&l=en&p=fly")) top.window.location.href = jumpLocation;
  else window.open(jumpLocation,"Fenster","titlebar,toolbar,status,menubar,location,hotkeys,directories,resizable,scrollbars,height=460,width=620,left=20,top=20");
  }
