
var geber_lib_onloadFuncArray;

function geber_addLoadEvent(func)
{
    if (document.all)
    {
        try { attachEvent("onload", func); return;}
        catch (e)
        { }
    }
    else
    {
        window.addEventListener("load", func, true);
        return;
    }


/*
   // special case for IE on Mac. Ignore all others
   var agt = navigator.userAgent.toLowerCase();
   if ((agt.indexOf("mac") < 0) || (agt.indexOf("opera") >= 0) || (agt.indexOf("msie") < 0))
   {

       window.onload = func;
       return;
   }
*/

  // initialise the onload handler
  if (geber_lib_onloadFuncArray == null)
  {
      geber_lib_onloadFuncArray = new Array();

      var oldonload = window.onload;
      window.onload = function()
      {
          for (var funcIdx=0; funcIdx <  geber_lib_onloadFuncArray.length; funcIdx++)
               geber_lib_onloadFuncArray[funcIdx]();
      }
  }

  geber_lib_onloadFuncArray[geber_lib_onloadFuncArray.length] = func;
}


var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 if (window.XMLHttpRequest)
     xmlhttp = window.XMLHttpRequest;
 else
 {
   try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
     try {
       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
     } catch (E) {
       xmlhttp = false;
     }
   }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  try {
    xmlhttp = new XMLHttpRequest();
  } catch (e) {
    xmlhttp=false;
  }
}
if (!xmlhttp && window.createRequest) {
  try {
    xmlhttp = window.createRequest();
  } catch (e) {
    xmlhttp=false;
  }
}



function geber_getURLParam(paramName)
{
    if (paramName == null || typeof(paramName) != "string" || String(window.location.search).length <= 1)
        return "";

    var Ergebnis = String(window.location.search).match("[?&]" + paramName + "=([^&]+)");
    if (Ergebnis && Ergebnis[1])
    {
        var result = unescape(String(Ergebnis[1]));
        return result;
    }
 
      return "";
}

var geber_isPrintPopUp_Var = false;
function geber_setIsPrintPopUp(isPrintPopUp)
{
    geber_isPrintPopUp_Var = (isPrintPopUp != null && isPrintPopUp);
}

function geber_isPrintPopUp()
{
    return geber_isPrintPopUp_Var;
}


/* ***********************************************************************
      BROWSER DETECTION
   *********************************************************************** 
*/

var agt=navigator.userAgent.toLowerCase();
var op = ((document.getElementById) && (agt.indexOf('Opera') != -1) || window.opera) ? true : false;
var ie = (!op && agt.indexOf('msie') >= 0) ? true : false;
var ie55 = (!op && ie && agt.indexOf('msie 5.5') >= 0) ? true : false;
var ie5 = (!op && ie && !ie55 && agt.indexOf('msie 5') >= 0) ? true : false;
var ie6 = (!op && ie && agt.indexOf('msie 6') >= 0) ? true : false;
var ie7 = (!op && ie && agt.indexOf('msie 7') >= 0) ? true : false;
var iemac = (!op && ie && agt.indexOf('mac') >= 0) ? true : false;
var ff = (agt.indexOf('firefox') >= 0) ? true : false;
var moz = (agt.indexOf('mozilla') >= 0) ? true : false;
var safari = (agt.indexOf('safari') >= 0) ? true : false;
var win2k = (agt.indexOf('windows nt 5.0') >= 0) ? true : false;

function geber_setRawCookie(cookieString)
{
    document.cookie = cookieString;
//    alert("setting cookie: " + cookieString);
//    alert("setting cookie: " + document.cookie);
}

function geber_getRawCookie()
{
//    alert("reading cookie: " + document.cookie);
    return document.cookie.toString();
}


/*
   name - name of the cookie
   value - value of the cookie
   [expires] - expiration date of the cookie
     (defaults to end of current session)
   [path] - path for which the cookie is valid
     (defaults to path of calling document)
   [domain] - domain for which the cookie is valid
     (defaults to domain of calling document)
   [secure] - Boolean value indicating if the cookie transmission requires
     a secure transmission
   * an argument defaults when it is assigned null as a placeholder
   * a null placeholder is not required for trailing omitted arguments
*/

function geber_setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");

  geber_setRawCookie(curCookie);
}


/*
  name - name of the desired cookie
  return string containing value of specified cookie or null
  if cookie does not exist
*/

function geber_getCookie(name) {

  var dc = geber_getRawCookie();
  if (!dc) return null;

  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}


/*
   name - name of the cookie
   [path] - path of the cookie (must be same as path used to create cookie)
   [domain] - domain of the cookie (must be same as domain used to
     create cookie)
   path and domain default if assigned null or omitted if no explicit
     argument proceeds
*/

function geber_deleteCookie(name, path, domain) {
  if (geber_getCookie(name)) {
    geber_setRawCookie(name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT");
  }
}


var feedbackSent = 0;
function openFeedback() {
//  var feedbackElem = document.getElementById("feedbacksmall");
//  var postop = (document.getElementById("feedbackOpener").offsetTop - document.getElementById("feedbacksmall").offsetHeight+50);
//  feedbackElem.style.top = ""+postop+"px";

  // do not open the feedback layer but link to long feedback if feedback has already been sent.
  if (feedbackSent || documentContainsFlash && !ie)
      return true;

  // check if the cookie of already sent feedback has been set
  if (geber_getCookie("eadsgb05_feedback"))
      return true;

  try
  {
      document.getElementById("feedbacksmall").style.visibility = "visible";
  }
  catch(e) {
      return true;
  }

  return false;
}

function closeFeedback() {
  document.getElementById("feedbacksmall").style.visibility = "hidden";
}

function openAddToPrintBasket(pathToPrintBasket, pagePath) {
  if (pathToPrintBasket == null || xmlhttp == null || typeof(xmlhttp) == 'undefined')
      return true;

  var basketDialog = document.getElementById("addtoprintbasket");
  if (basketDialog == null)
      return true;

  basketDialog.style.visibility = "visible";

  pathToPrintBasket = pathToPrintBasket.replace(/\.html?$/, ".php");

  // send the page to the print basket
  var targetLocation = pathToPrintBasket + "?addPage=" + escape(pagePath) + "&xmlhttp=1";
  xmlhttp.open("GET", targetLocation, true);
  xmlhttp.onreadystatechange=function() {}
  xmlhttp.send(null);

  return false; 
}

function closeAddToPrintBasket() {
  document.getElementById("addtoprintbasket").style.visibility = "hidden";
}


function sendAnswer(targetUrl) {

  var design="-";
  for (i=0;i<4;i++) {
    if(document.feedbackform.design[i].checked == true)
    {
      design=document.feedbackform.design[i].value;
      break;
    }
  }

  var navigation="-";
  for (i=0;i<4;i++) {
    if(document.feedbackform.navigation[i].checked == true)
    {
      navigation=document.feedbackform.navigation[i].value;
      break;
    }
  }

  var funktionen="-";
  for (i=0;i<4;i++) {
    if(document.feedbackform.functions[i].checked == true)
    {
      funktionen=document.feedbackform.functions[i].value;
      break;
    }
  }

  var gesamteindruck="-";
  for (i=0;i<4;i++) {
    if(document.feedbackform.overall[i].checked == true)
    {
      gesamteindruck=document.feedbackform.overall[i].value;
      break;
    }
  }

  
  if (targetUrl.indexOf("?") < 0)
      targetUrl += "?";
  else
      targetUrl += "&";

  targetUrl += "design="+design+"&navigation="+navigation+"&functions="+funktionen+"&overall="+gesamteindruck+"&feedbacktype=small&type=small&action=submit";  

  if (xmlhttp) {
    xmlhttp.open("GET", targetUrl, true);
    xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4) {
      }
    }
    xmlhttp.send(null);
    closeFeedback();
    return false;
  }
 
}


function glossary_Resize(sizes)
{
}


function print_setImg() {   
    var a = document.getElementById("mainbar");
    for(var i = 0; i < a.getElementsByTagName("img").length; i++) {
      if (document.formular.setImg[0].checked) 
        a.getElementsByTagName("img")[i].style.display="inline";
      if (document.formular.setImg[1].checked) 
        a.getElementsByTagName("img")[i].style.display="none";
    }

    for(var i = 0; i < a.getElementsByTagName("object").length; i++) {
      if (document.formular.setImg[0].checked) 
        a.getElementsByTagName("object")[i].style.display="inline";
      if (document.formular.setImg[1].checked) 
        a.getElementsByTagName("object")[i].style.display="none";
    }

    for(var i = 0; i < a.getElementsByTagName("embed").length; i++) {
      if (document.formular.setImg[0].checked) 
        a.getElementsByTagName("embed")[i].style.display="inline";
      if (document.formular.setImg[1].checked) 
        a.getElementsByTagName("embed")[i].style.display="none";
    }
  }

function print_hideLinks() {
    // resize print window
    try {resizePrintPopUp();} catch(e) {}

    var mainbar = document.getElementById("mainbar");
    var docLinks = mainbar.getElementsByTagName("a");
    for (var i=0; i<docLinks.length; i++) {
      docLinks[i].href="#";
    }
  }

function make_invisible() {

  // resetting movie
  if(geber_getCookie("sfp")!="1") {
//      rewindSubjectsMovie();
  }


  var subjectLink = document.getElementById("subjectboxLink");
  if (subjectLink != null) subjectLink.setAttribute("href", "#pagetop");

  var contentbar = document.getElementById("contentbar");
  if (contentbar != null) contentbar.className="contentbargray";
	
  var subjectsmenu = document.getElementById("subjectsMenu");
  if (subjectsmenu != null) subjectsmenu.style.display = "inline";

  var movieLayer = document.getElementById("teaserFlashLayer");
  if (movieLayer != null) movieLayer.style.display = "none";

  if(geber_getCookie("sfp")!="1") {
      window.setTimeout("playSubjectsMovie();", 1000);
      geber_setCookie("sfp", "1", null, "/");
  }

}

function playSubjectsMovie() {
    var movie = findFlash('subjectmovie');
    if (movie) {
        movie.Play();
    }
}

function stopSubjectsMovie() {
    var movie = findFlash('subjectmovie');
    if (movie) {
        movie.StopPlay();
    }
}

function rewindSubjectsMovie() {
    var movie = findFlash('subjectmovie');
    if (movie) {
        movie.StopPlay();
        movie.Rewind();
        movie.Play();
    }
}


function make_visible() {
  var contentbar = document.getElementById("contentbar");
  if (contentbar != null) contentbar.className="";
	
  var subjectsmenu = document.getElementById("subjectsMenu");
  if (subjectsmenu != null) subjectsmenu.style.display = "none";

  var movieLayer = document.getElementById("teaserFlashLayer");
  if (movieLayer != null) movieLayer.style.display = "inline";

  window.setTimeout("stopSubjectsMovie()", 100);
}



function geber_hideFlashTeaser() {
  var flashLayer = document.getElementById("startContentFlash");
  if (flashLayer) flashLayer.style.display = "none";
}

function layerAusblenden()
{
  geber_hideFlashTeaser();
  var headerMovie = findFlash('headerMovie');
  if (headerMovie)
  {
       try
       {
          headerMovie.StopPlay();
          /* var maxFrames = headerMovie.TotalFrames(); */
          headerMovie.GotoFrame(99);
       } catch(e) {}
  }
}



function getInnerHTML (node) {
    if (!node)
        return "";

    var data = '';
 
    switch (node.nodeType) {
        case 1 :
            var innerData = "";
            if (node.hasChildNodes()) {
                for (var i=0; i<node.childNodes.length; i++)
                    innerData += getInnerHTML(node.childNodes[i]);
            }
            data += '<' + node.nodeName;
            for (var i=0; i<node.attributes.length; i++)
            { 
                data += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '" ';
            }
            data += '>' + innerData + '</' + node.nodeName + '>';
            break;
        case 8 :
            break;
        default :
            data += node.nodeValue;
    }
    return data;
}





function cfSF(lang, head)
{
    url = "http://www.eads.net/php-bin/eads/app/s2f/s2f.php?lang=" +
            escape(lang) + "&head=" + escape(head) + "&url=" +
            escape(document.location.href);

    window.open(url, "s2fWin", "width=425,height=425,menubar=no,titlebar=no,scrollbars=no,toolbar=no");
    return false;
}


function geber_getWindowWidth() 
{
    if (self.innerHeight) // all except Explorer
    {
        return self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
        // Explorer 6 Strict Mode
    {
        return document.documentElement.clientWidth;
    }
    else if (document.body) // other Explorers
    {
        return document.body.clientWidth;
    }
}

function geber_getWindowHeight() 
{
    if (self.innerHeight) // all except Explorer
    {
        return self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
        // Explorer 6 Strict Mode
    {
        return document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
        return document.body.clientHeight;
    }
}

var currentWindowWidth = -1;
var oldWindowWidth = -1;

var scrollBarHeight = 16;

function geber_checkHScrollBar()
{
    oldWindowWidth = currentWindowWidth;
    currentWindowWidth = geber_getWindowWidth();
       
    if (currentWindowWidth <= 0)
        return;

    var minWidth = 1002;
    var bodyTag;
    if (document.body.style)
        bodyTag = document.body;
    else if (document.getElementsByTagName)
        bodyTag = document.getElementsByTagName("body")[0];


    if (currentWindowWidth < minWidth && (oldWindowWidth >= minWidth || oldWindowWidth < 0))
    {
         try {bodyTag.style.paddingBottom = String(scrollBarHeight) + "px";} catch (e) {}         
    }
    else if (currentWindowWidth >= minWidth && (oldWindowWidth < minWidth || oldWindowWidth < 0))
    {
         try {bodyTag.style.paddingBottom = "0";} catch (e) {}
    }
}



geber_addLoadEvent(geber_checkHScrollBar);
if (document.all)
{
    try { attachEvent("onresize", geber_checkHScrollBar); }
    catch (e) { window.onresize = geber_checkHScrollBar; }
}
else
    window.addEventListener("resize", geber_checkHScrollBar, true);


function writeFlashHTMLToTag(tag, flashHTML)
{
    try {tag.innerHTML = flashHTML;} catch(e) {}
}

function writeFlashHTML(flashHTML)
{
    document.write(flashHTML);
}

var xpSizePlus = 12;
var operabar = (window.opera ? "=yes" : "");

function openPopUp(newLocation) {
  var w = 690;
  var h = 400;
  
  // do not open additional popups if the page is a print dialog popup itself
  if (geber_isPrintPopUp())
      return false;

  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+20;
	
  var popUpWindow;
  try {
      popUpWindow = window.open(newLocation, 'popup', 'resizable=yes, status=no, toolbar=no, scrollbars=no, width='+w+', height='+h);
  } catch(e) { return true;}


  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
    return false;
  } catch(e) {}
  return true;
}

function notesPopUp(newLocation) {
  var w = 690;
  var h = 690;

  // do not open additional popups if the page is a print dialog popup itself
  if (geber_isPrintPopUp())
      return false;
  
  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+20;

  var popUpWindow = null;	
  try {
    popUpWindow = window.open(newLocation, 'notespopup', 'resizable=yes, status=no, menubar=no,toolbar=yes, scrollbars=yes, width='+w+', height='+h);
    if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;
  }
  catch (e) 
  {
    return true; 
  }

  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}

function fromNotesPopUp(newLocation) {
  // load the new location into the original window instead of a new popup
  try
  {
      if (window.opener)  
          window.opener.location.href = newLocation;
  }
  catch (e)
  {
      return true;
  }
  return false;
}

function sendPopUp(newLocation) {
  var w = 580;
  var h = 440;
  
  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+10;

  var popUpWindow;
  try {
      popUpWindow = window.open(newLocation, 'popup', 'resizable=yes, status=no, toolbar=no, scrollbars' + operabar + ', width='+w+', height='+h);
  } catch(e) { return true;}
  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;
	
  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}

function printPopUp(newLocation) {
  var w = 690;
  var h = 500;
  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5)))
    h = h+10;

  // special sitemap handling
  try {
      if (!sitemapLevel34Visible) {
          newLocation += (newLocation.match(/\?/) ? "&hideSitemapLevel34=1" : "?hideSitemapLevel34=1");
      }
  } catch(e) {}


  var popUpWindow;
  try {
      popUpWindow = window.open(newLocation, 'popup', 'resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
  } catch(e) { return true;}
  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;

  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}


function resizePrintPopUp() {
  var w = 690;
  var h = 500;

  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5)))
    h = h+10;

  if (opener)
      window.resizeTo(w, h);
}


function printBasketPopUp(newLocation) {
  var w = 690;
  var h = 500;
  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5)))
    h = h+10;


  var popUpWindow = null;
  try {
    popUpWindow = window.open(newLocation, 'printBasket', 'resizable=yes, status=no, toolbar=no, scrollbars, width='+w+', height='+h);
  } catch(e) {return true;}

  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;

  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  
  return false;
}

function glossaryPopUp(newLocation) {
  var h = 350;
  var w = 500;

  /* increase size because status bar is always visible on Windows XP */
  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (navigator.userAgent.match(/ MSIE/) && Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
    h = h+10;


  var popUpWindow;
  try {
      popUpWindow = window.open(newLocation, 'glossary', 'resizable=yes, status=no, toolbar=no, scrollbars' + operabar + ', width='+w+', height='+h);
  } catch(e) { return true;}
  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;


  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}


function tablePopUp(newLocation, preferedWidth) {

  var w = (preferedWidth && !isNaN(preferedWidth))? preferedWidth : 800;
  var h = 500;

  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
      h = h+xpSizePlus;

  var popUpWindow;
  try {
      popUpWindow = window.open(newLocation, 'tablePopUp', 'scrollbars,resizable=yes,location=no,status=no,toolbar=no,width='+w+', height='+h);
  } catch(e) { return true;}
  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;


  // get the first image in the new popup
  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}

function imagePopUp(newLocation, w, h) {

  // do not open additional popups if the page is a print dialog popup itself
  if (geber_isPrintPopUp())
      return false;


  if (w == null) w = 700;
  if (h == null) h = 450;

  w += 15;
  h += 32;

  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
      h = h+10;


  var popUpWindow;
  try {
      popUpWindow = window.open(newLocation, 'imagePopUp', 'resizable=yes,location=no,status=no,toolbar=no,width='+w+', height='+h);
  } catch(e) { return true;}
  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;


  // get the first image in the new popup
  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}

function flashImagePopUp(newLocation, w, h) {

  // do not open additional popups if the page is a print dialog popup itself
  if (geber_isPrintPopUp())
      return;

  if (w == null) w = 700;
  if (h == null) h = 450;

  var scrollBars = "";
  if (scrollit)
      scrollBars = ",scrollbars=yes";


  w += 15;
  h += 32;

  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5)))
      h = h+20;

  // for exported version
  if (flashImageBasePath == null)
      flashImageBasePath = "";

  var popUpWindow;
  try {

      popUpWindow = window.open(flashImageBasePath + newLocation, 'imagePopUp', 'resizable=yes,location=no,status=no,' + scrollBars+ 'toolbar=no,width='+w+', height='+h);
  } catch(e) { }


  // get the first image in the new popup^
  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
}


function searchPopUp(formular, language) 
{

  var w = 700;
  var h = 450;
  var targetURL = "http://www.reports.eads.net/search_2005/index_search.php";

  var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
  if (Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
      h = h+15;

  var queryParam = "?";
  if (formular != null)
  {
    for (var i=0; i<formular.elements.length; i++)
    {
        var elem = formular.elements[i];
        if (queryParam.length > 1)
            queryParam += "&";

        queryParam += elem.name + "=" + escape(elem.value);  
    }
  }
  else
      queryParam = "?lang=" + language;

  var popUpWindow;
  try {
      popUpWindow = window.open(targetURL + queryParam, 'searchresultpopup', 'resizable=yes,location=no,status=no,toolbar=no,scrollbars=yes,width='+w+', height='+h);
  } catch(e) { return true;}
  if (!popUpWindow || typeof(popUpWindow) == 'undefined') return true;


  // get the first image in the new popup
  try {
    popUpWindow.resizeTo(w, h);
    popUpWindow.focus();
  } catch(e) {}
  return false;
}



var documentContainsFlash = 0;

document.write("<" + "script language=\"VBScript\" type=\"text/vbs\" >\n" +
"  Function IEPluginDetect(pluginname) \n" +
"    on error resume next \n"+
"    IEPluginDetect = False \n"+
"    IEPluginDetect = IsObject(CreateObject(pluginname)) \n\n"+
"    If (err) then \n"+
"       IEPluginDetect = False \n"+
"    End If \n"+
"  End Function \n"+


"  Function IEDetectFlash() \n"+
"    IEDetectFlash = 0 \n"+
"    For i = 2 to 9 \n"+
"      If (IEPluginDetect(\"ShockwaveFlash.ShockwaveFlash.\" & i)) Then \n"+
"        IEDetectFlash = i \n"+
"      End If \n"+
"    Next \n"+
"  End Function \n"+
"<" + "/script" + ">");


function detectPlugin(pluginName)
{
   if (!pluginName) return false;
   var agent = navigator.userAgent.toLowerCase();

   // NS3+, Opera3+, IE5+ Mac, Safari (support plugin array):  check for Acrobat plugin in plugin array
   if (navigator.plugins != null && navigator.plugins.length > 0) {

      for (i=0; i < navigator.plugins.length; i++ ) {
         var plugin = navigator.plugins[i];
         if (plugin.name.indexOf(pluginName) > -1) {
            return true;
         }
      }
   }

   // IE4+ Win32:  attempt to create an ActiveX object using VBScript
   else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1) {
      try { return IEPluginDetect(pluginName); } catch(e) {}
  }
  return false;
}


function detectFlash()
{
   var version = 0;
   var agent = navigator.userAgent.toLowerCase();

   // NS3+, Opera3+, IE5+ Mac, Safari (support plugin array):  check for Acrobat plugin in plugin array
   if (navigator.plugins != null && navigator.plugins.length > 0) {

      for (i=0; i < navigator.plugins.length; i++ ) {
         var plugin = navigator.plugins[i];
         if (plugin.name.indexOf("Shockwave Flash") > -1) {
            version = 1;
            if (plugin.description) {
                var y = plugin.description;
                version = y.charAt(y.indexOf('.')-1);
            }
         }
      }
   }
   // IE4+ Win32:  attempt to create an ActiveX object using VBScript
   else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
      try { 
          version = IEDetectFlash(); 
      } catch(e) {}
  }


  return version;
}


var flashversion = detectFlash();
var flashinstalled = (flashversion > 0) ? true : false;


// on Win2k flash detection failes with flash 8 with IE. Thus we assume flash is installed
// we rely on using alternative content within object tag if flash is not available
if (ie && win2k) 
{
    flashinstalled = true;
    flashversion = 6;
}

function geber_detectPlugins()
{

/* *** howto detect PDF
    if (detectPlugin('PDF.PdfCtrl.5') || detectPlugin('Acrobat') || detectPlugin('PDF.PdfCtrl.1')  || detectPlugin('PDF.PdfCtrl.6')  || detectPlugin('PDF.PdfCtrl.7')  || detectPlugin('PDF.PdfCtrl.4'))
*/
}




function findFlash (flash) {
    if (document.all) {
      if (document.all[flash]) {
        return document.all[flash];
      }
      if (window.opera) {
        var movie = eval(window.document + flash);
        try {
            if (movie.SetVariable) 
              return movie;
        }
        catch (e) {}
      }
      return;
    }
    if(document.layers) {
      if(document.embeds) {
        var movie = document.embeds[flash];
        try {
            if (movie.SetVariable) 
               return movie;
        }
        catch (e) {}
      }
      return;
    }
    if (!document.getElementById) {
      return;
    }
    var embedAdd = (!ie ? "embed" : "");
    var movie = document.getElementById(flash + embedAdd);
    try {
        if (movie.SetVariable) 
            return movie;
    }
    catch (e) {}

    // try to find object tag
    var movie = document.getElementById(flash);
    try {
        if (movie.SetVariable) 
            return movie;
    }
    catch (e) {}

    var movies = document.getElementsByTagName('embed');
    if (!movies || !movies.length) {
      return;
    }
    
    for (var i=0; i<movies.length; i++)
    {
        if (movies[i].getAttribute("name") == flash || movies[i].getAttribute("id") == flash  ||
            movies[i].getAttribute("id") == flash + "embed")
        {
            try {
               if (movies[i].SetVariable) 
                   return movies[i];
            }
            catch (e) {}
        }
    }

    try {
       if (movies[0].SetVariable) 
           return movies[0];
    }
    catch (e) {}
    
    return;
  }





function geber_perfomOnLoad()
{
   try {
       geber_detectPlugins();
   } catch (e) {}
   try {
       doHighlightSearchTerms();
   } catch (e) {}
   try {
      // for the glossary popups
      tt_RegisterEventHandlers();
   } catch (e) {}

}

geber_addLoadEvent(geber_perfomOnLoad);
/*
if (document.all)
{
    try { attachEvent("onload", geber_perfomOnLoad); }
    catch (e) { window.onload = geber_perfomOnLoad; }
}
else
    window.addEventListener("load", geber_perfomOnLoad, true);
*/


