
function geber_lib_activateLibrary(pagePath)
{
  geber_lib_detectBasePath(pagePath);
}

var geber_lib_onloadFuncArray;
function geber_lib_addLoadEvent(func)
{
    if (document.all)
    {
        try { attachEvent("onload", func); return;}
        catch (e)
        { }
    }
    else
    {
        window.addEventListener("load", func, true);
        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 geber_isPrintPopUp_Var = false;
function geber_setIsPrintPopUp(isPrintPopUp)
{
    geber_isPrintPopUp_Var = (isPrintPopUp != null && isPrintPopUp);
}

function geber_isPrintPopUp()
{
    return geber_isPrintPopUp_Var;
}




   // geber_lib_stripTags
   // ---------------------------------------------------------------------------------------------------------------------------------------------------------
   /**
    * stripps all the tags from the provided text
    */
    function geber_lib_stripTags(text)
    {
        if (!text || (typeof text != "string") || (text.length <= 0)) 
            return "";

        // strip off all javascript tags
        text = text.replace(/<script.*<\/script[^>]*>/gi, "");


        // strip off all stye tags
        text = text.replace(/<style.*<\/style[^>]*>/gi, "");

        // strip off all other tags
        text = text.replace(/<[^>]*>/gi, "");

        // strip off all invalid characters
        text = text.replace(/[^-\w+|"'\.]/gi, "");

        return text;
    }

function geber_lib_getQueryParameter(paramName)
{
       var query = window.location.search.toString();

       if (!query || (query.length <= 0)) 
           return "";

       if ((paramName == null) || (typeof(paramName) != "string") || (paramName.length <= 0))
         paramName = "q";

       query = query.match(new RegExp("^.*[?&]" + paramName + "=(.*)$"));
       if (!query) return "";

       query = query[1];
       query = unescape(query);

       // get rid of invalid whitespace characters
       query = query.replace(/[\r\n\t]+/gi, ' ') ;
       var re = new RegExp("[" + String.fromCharCode(0) + "-" + String.fromCharCode(31)  + 
                                   String.fromCharCode(96) + "]", "gi") ;     
       query = query.replace(re, '');

       // convert fixed size space
       re = new RegExp(String.fromCharCode(160) + "+", "gi") ;
       query = query.replace(re, ' ') ;

       // strip off extra query paramaters
       query = query.replace(/&(amp;)?([^;]*=.*)?$/gi, "");

       // tags are invalid
       if (query.match(/<.?(script|style)/gi))
           return "";      

       // clean up the query string
       query = geber_lib_stripTags(query);
       query = query.replace(/[^-_:;,\w\/\.=]/gi, "");
       return query;
}


function geber_lib_writeDocument(htmlText)
{
    document.write(htmlText);
}

var geber_lib_pageBaseURL = "/";
function geber_lib_getBaseURLPath()
{
    if (geber_lib_pageBaseURL && geber_lib_pageBaseURL != "/")
        return geber_lib_pageBaseURL;
    else 
    {
        var baseURL = window.location.protocol;
        if (baseURL.indexOf(":") < 0)
            baseURL += ":";

        baseURL += "//" + window.location.host;
        return  baseURL;
    }
}

function geber_lib_detectBasePath(currentPagePath)
{
   if (!currentPagePath)
       return;


   currentPagePath = String(currentPagePath).replace(new RegExp("^/(de|en|fr|it|es)/"), "/");

   var newPageBaseURL = String(window.location.pathname);
   var pos = -1;
   if (currentPagePath != "/") pos = newPageBaseURL.indexOf(currentPagePath);

   if (pos < 0) // detect some special pages
       pos = newPageBaseURL.indexOf("/serviceseiten/suche");
   if (pos < 0) // detect some special pages
       pos = newPageBaseURL.indexOf("/servicepages/search");
   if (pos < 0) // detect some special pages
       pos = newPageBaseURL.indexOf("/servicepages");
   if (pos < 0) // detect some special pages
       pos = newPageBaseURL.indexOf("/serviceseiten");
   if (pos < 0) // detect some special pages
       pos = newPageBaseURL.indexOf("/servicepaginas");
   if (pos < 0) // detect some special pages
       pos = newPageBaseURL.indexOf("/pagedeservice");


// alert("raw base path: " + geber_lib_pageBaseURL + ", currentPath: " + currentPagePath + ", pos: " + pos);

   if (pos >= 0)
       geber_lib_pageBaseURL = newPageBaseURL.substring(0, pos);
   else
       geber_lib_pageBaseURL = window.location.pathname;

   if (geber_lib_pageBaseURL != "/" && geber_lib_pageBaseURL.charAt(geber_lib_pageBaseURL.length - 1) == "/")
       geber_lib_pageBaseURL = geber_lib_pageBaseURL.substring(0, geber_lib_pageBaseURL.length - 1);

   if (geber_lib_pageBaseURL == "")
       geber_lib_pageBaseURL = "/";

}



function geber_lib_redirectToPath(pagePath)
{
    if (!pagePath || typeof(pagePath) != "string" || pagePath.length <= 0)
        return false;

    var baseURIPath = geber_lib_getBaseURLPath();
    if (!baseURIPath || typeof(baseURIPath) != "string" || baseURIPath.length <= 0)
        return false;

    var targetPath = "";
    if (pagePath.substring(0, 3) == "../")
    {
        baseURIPath = window.location.pathname;
        while (pagePath.substring(0, 3) == "../")
        {
            baseURIPath = geber_lib_dirname(baseURIPath);
            pagePath = pagePath.substr(3);
        }
 
        if (!baseURIPath || baseURIPath.length <= 0)
            baseURIPath = "";

        targetPath = baseURIPath + "/" + pagePath;
    }

    if (pagePath.substring(0, 1) == "/" && baseURIPath.substring(baseURIPath.length-1, baseURIPath.length) == "/")
        targetPath = baseURIPath.substring(0, baseURIPath.length-1) + pagePath;
    else
        targetPath = baseURIPath + pagePath;

    if (targetPath && targetPath.length > 0)
    {
        window.location.href =  targetPath;
        return true;
    }
    return false;
}




function geber_lib_dirname(fileName)
{
      if (!fileName) return fileName;
      fileName = String(fileName);
     
      if (fileName.length <= 0) return fileName;

      var pathSeparator = "/";
      if (String(window.location.protocol).match(/file/i) && navigator.platform.match(/Win/i) && navigator.userAgent.match(/MSIE/))
          pathSeparator = "\\";

      var idx = fileName.lastIndexOf(pathSeparator);
      if (idx && (idx >= 0)) 
          return fileName.substring(0, idx);
      else
          return fileName;
}

function geber_getURLParam(paramName)
{
   return geber_lib_getQueryParameter(paramName);
}




// ===================================================================================
//  js_browserdetect
// ===================================================================================
// PLUGIN FRAMEWORK, Version 0.5; Copyright (c) 2006 Matthias Platzer <matthias@knallgrau.at>; http://www.knallgrau.code/prototype/plugins_js



/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;



// ===================================================================================

var browser = null;
var geber_GlobalBrowser = null;

function geber_getBrowser() 
{
    if (geber_GlobalBrowser != null && geber_GlobalBrowser.initialised != null && geber_GlobalBrowser.initialised)
        return geber_GlobalBrowser ;

   geber_GlobalBrowser = new Object();
   geber_GlobalBrowser.pageIsLoaded = false;
   geber_GlobalBrowser.isPageLoaded = function()
   {
       return (typeof(this.pageIsLoaded) != 'undefined' && this.pageIsLoaded);
   }
   geber_GlobalBrowser.setPageIsLoaded = function(isLoaded)
   {
       this.pageIsLoaded = (isLoaded != null && isLoaded) ? true : false;
   }


// the script is based on the JavaScript Browser Sniffer by
// Eric Krok, Andy King, Michel Plungjan Jan. 31, 2002
// see http://www.webreference.com/ for more information
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//

    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();
    var appVer = navigator.appVersion.toLowerCase();

    // *** BROWSER VERSION ***
    var is_minor = parseFloat(appVer);
    var is_major = parseInt(is_minor);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1); // new 020128- abk
    var is_opera7 = (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1); // new 021205- dmr
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
    var is_opera6up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5); // new020128
    var is_opera7up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4 && !is_opera5 && !is_opera6); // new021205 -- dmr

    // Note: On IE, start of appVersion return 3 or 4
    // which supposedly is the version of Netscape it is compatible with.
    // So we look for the real version further on in the string
    // And on Mac IE5+, we look for is_minor in the ua; since 
    // it appears to be more accurate than appVersion - 06/17/2004

    var is_mac = (agt.indexOf("mac")!=-1);
    var iePos  = appVer.indexOf('msie');
    if (iePos !=-1) {
       if(is_mac) {
           var iePos = agt.indexOf('msie');
           is_minor = parseFloat(agt.substring(iePos+5,agt.indexOf(';',iePos)));
       }
       else is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
       is_major = parseInt(is_minor);
    }

    // ditto Konqueror
                                      
    var is_konq = false;
    var kqPos   = agt.indexOf('konqueror');
    if (kqPos !=-1) {                 
       is_konq  = true;
       is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
       is_major = parseInt(is_minor);
    }                                 

    var is_getElementById   = (document.getElementById) ? "true" : "false"; // 001121-abk
    var is_getElementsByTagName = (document.getElementsByTagName) ? "true" : "false"; // 001127-abk
    var is_documentElement = (document.documentElement) ? "true" : "false"; // 001121-abk

    var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
    var is_khtml  = (is_safari || is_konq);

    var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
    var is_gver  = 0;
    if (is_gecko) is_gver=navigator.productSub;

    var is_fb = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                 (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                 (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                 (is_gecko) && (navigator.vendor=="Firebird"));
    var is_fx = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                 (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                 (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                 (is_gecko) && ((navigator.vendor=="Firefox")||(agt.indexOf('firefox')!=-1)));
    var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                    (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                    (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                    (is_gecko) && (!is_fb) && (!is_fx) &&
                    ((navigator.vendor=="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")));
    if ((is_moz)||(is_fb)||(is_fx)) {  // 032504 - dmr
       var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
       if(is_fx&&!is_moz_ver) {
           is_moz_ver = agt.indexOf('firefox/');
           is_moz_ver = agt.substring(is_moz_ver+8);
           is_moz_ver = parseFloat(is_moz_ver);
       }
       if(!(is_moz_ver)) {
           is_moz_ver = agt.indexOf('rv:');
           is_moz_ver = agt.substring(is_moz_ver+3);
           is_paren   = is_moz_ver.indexOf(')');
           is_moz_ver = is_moz_ver.substring(0,is_paren);
       }
       is_minor = is_moz_ver;
       is_major = parseInt(is_moz_ver);
    }
   var is_fb_ver = is_moz_ver;
   var is_fx_ver = is_moz_ver;

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)
                && (!is_khtml) && (!(is_moz)) && (!is_fb) && (!is_fx));

    // Netscape6 is mozilla/5 + Netscape6/6.0!!!
    // Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001108 Netscape6/6.0
    // Changed this to use navigator.vendor/vendorSub - dmr 060502   
    // var nav6Pos = agt.indexOf('netscape6');
    // if (nav6Pos !=-1) {
    if ((navigator.vendor)&&
        ((navigator.vendor=="Netscape6")||(navigator.vendor=="Netscape"))&&
        (is_nav)) {
       is_major = parseInt(navigator.vendorSub);
       // here we need is_minor as a valid float for testing. We'll
       // revert to the actual content before printing the result. 
       is_minor = parseFloat(navigator.vendorSub);
    }

    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && is_minor >= 4);  // changed to is_minor for
                                                // consistency - dmr, 011001
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );

    var is_nav6   = (is_nav && is_major==6);    // new 010118 mhp
    var is_nav6up = (is_nav && is_minor >= 6); // new 010118 mhp

    var is_nav5   = (is_nav && is_major == 5 && !is_nav6); // checked for ns6
    var is_nav5up = (is_nav && is_minor >= 5);

    var is_nav7   = (is_nav && is_major == 7);
    var is_nav7up = (is_nav && is_minor >= 7);

    var is_nav8   = (is_nav && is_major == 8);
    var is_nav8up = (is_nav && is_minor >= 8);

    var is_ie   = ((iePos!=-1) && (!is_opera) && (!is_khtml));
    var is_ie3  = (is_ie && (is_major < 4));

    var is_ie4   = (is_ie && is_major == 4);
    var is_ie4up = (is_ie && is_minor >= 4);
    var is_ie5   = (is_ie && is_major == 5);
    var is_ie5up = (is_ie && is_minor >= 5);
    
    var is_ie5_5  = (is_ie && (agt.indexOf("msie 5.5") !=-1)); // 020128 new - abk
    var is_ie5_5up =(is_ie && is_minor >= 5.5);                // 020128 new - abk
	
    var is_ie6   = (is_ie && is_major == 6);
    var is_ie6up = (is_ie && is_minor >= 6);

    var is_ie7   = (is_ie && is_major == 7);
    var is_ie7up = (is_ie && is_minor >= 7);

// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.

    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);
    var is_aol7  = ((agt.indexOf("aol 7")!=-1) || (agt.indexOf("aol7")!=-1));
    var is_aol8  = ((agt.indexOf("aol 8")!=-1) || (agt.indexOf("aol8")!=-1));

    var is_webtv = (agt.indexOf("webtv") != -1);
    
    // new 020128 - abk
    
    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));

    // end new
	
    // *** JAVASCRIPT VERSION CHECK ***
    // Useful to workaround Nav3 bug in which Nav3
    // loads <SCRIPT LANGUAGE="JavaScript1.2">.
    // updated 020131 by dragle
    var is_js = 0.0;
    if (is_nav2 || is_ie3) is_js = 1.0;
    else if (is_nav3) is_js = 1.1;
    else if ((is_opera5)||(is_opera6)) is_js = 1.3; // 020214 - dmr
    else if (is_opera7up) is_js = 1.5; // 031010 - dmr
    else if (is_khtml) is_js = 1.5;   // 030110 - dmr
    else if (is_opera) is_js = 1.1;
    else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
    else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
    else if (is_nav5 && !(is_nav6)) is_js = 1.4;
    else if (is_hotjava3up) is_js = 1.4; // new 020128 - abk
    else if (is_nav6up) is_js = 1.5;

    // NOTE: In the future, update this code when newer versions of JS
    // are released. For now, we try to provide some upward compatibility
    // so that future versions of Nav and IE will show they are at
    // *least* JS 1.x capable. Always check for JS version compatibility
    // with > or >=.

    else if (is_nav && (is_major > 5)) is_js = 1.4;
    else if (is_ie && (is_major > 5)) is_js = 1.3;
    else if (is_moz) is_js = 1.5;
    else if (is_fb||is_fx) is_js = 1.5; // 032504 - dmr
    
    // what about ie6 and ie6up for js version? abk
    
    // HACK: no idea for other browsers; always check for JS version 
    // with > or >=
    else is_js = 0.0;
    // HACK FOR IE5 MAC = js vers = 1.4 (if put inside if/else jumps out at 1.3)
    if ((agt.indexOf("mac")!=-1) && is_ie5up) is_js = 1.4; // 020128 - abk
    
    // Done with is_minor testing; revert to real for N6/7
    if (is_nav6up) {
       is_minor = navigator.vendorSub;
    }

    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));

    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) ||
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) ||
               (agt.indexOf("windows 16-bit")!=-1) );

    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));
	
	var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));    // new 020128 - abk
    var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1) || (agt.indexOf("windows 2000")!=-1)); // 020214 - dmr
    var is_winxp = ((agt.indexOf("windows nt 5.1")!=-1) || (agt.indexOf("windows xp")!=-1)); // 020214 - dmr

    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 ||
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

    var is_os2   = ((agt.indexOf("os/2")!=-1) ||
                    (navigator.appVersion.indexOf("OS/2")!=-1) ||
                    (agt.indexOf("ibm-webexplorer")!=-1));

    var is_mac    = (agt.indexOf("mac")!=-1);
    if (is_mac) { is_win = !is_mac; } // dmr - 06/20/2002
    var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) ||
                               (agt.indexOf("68000")!=-1)));
    var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) ||
                                (agt.indexOf("powerpc")!=-1)));

    var is_sun   = (agt.indexOf("sunos")!=-1);
    var is_sun4  = (agt.indexOf("sunos 4")!=-1);
    var is_sun5  = (agt.indexOf("sunos 5")!=-1);
    var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
    var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
    var is_irix5 = (agt.indexOf("irix 5") !=-1);
    var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
    var is_hpux  = (agt.indexOf("hp-ux")!=-1);
    var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
    var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
    var is_aix   = (agt.indexOf("aix") !=-1);      // IBM
    var is_aix1  = (agt.indexOf("aix 1") !=-1);
    var is_aix2  = (agt.indexOf("aix 2") !=-1);
    var is_aix3  = (agt.indexOf("aix 3") !=-1);
    var is_aix4  = (agt.indexOf("aix 4") !=-1);
    var is_linux = (agt.indexOf("inux")!=-1);
    var is_sco   = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
    var is_unixware = (agt.indexOf("unix_system_v")!=-1);
    var is_mpras    = (agt.indexOf("ncr")!=-1);
    var is_reliant  = (agt.indexOf("reliantunix")!=-1);
    var is_dec   = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) ||
           (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) ||
           (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1));
    var is_sinix = (agt.indexOf("sinix")!=-1);
    var is_freebsd = (agt.indexOf("freebsd")!=-1);
    var is_bsd = (agt.indexOf("bsd")!=-1);
    var is_unix  = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux ||
                 is_sco ||is_unixware || is_mpras || is_reliant ||
                 is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);

    var is_vms   = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
// additional checks, abk
	var is_anchors = (document.anchors) ? "true":"false";
	var is_regexp = (window.RegExp) ? "true":"false";
	var is_option = (window.Option) ? "true":"false";
	var is_all = (document.all) ? "true":"false";
// cookies - 990624 - abk
	document.cookie = "cookies=true";
	var is_cookie = (document.cookie) ? "true" : "false";
	var is_images = (document.images) ? "true":"false";
	var is_layers = (document.layers) ? "true":"false"; // gecko m7 bug?
// new doc obj tests 990624-abk
	var is_forms = (document.forms) ? "true" : "false";
	var is_links = (document.links) ? "true" : "false";
	var is_frames = (window.frames) ? "true" : "false";
	var is_screen = (window.screen) ? "true" : "false";

// java
	var is_java = (navigator.javaEnabled() ? true : false);

   


   geber_GlobalBrowser.minor = is_minor;
   geber_GlobalBrowser.major = is_major;

   geber_GlobalBrowser.isOpera = is_opera || is_opera2 || is_opera3 || is_opera4 || is_opera5 || is_opera6 || is_opera7 || is_opera5up || is_opera6up || is_opera7up;
   geber_GlobalBrowser.isOpera2 = is_opera2;
   geber_GlobalBrowser.isOpera3 = is_opera3;
   geber_GlobalBrowser.isOpera4 = is_opera4;
   geber_GlobalBrowser.isOpera5 = is_opera5;
   geber_GlobalBrowser.isOpera6 = is_opera6;
   geber_GlobalBrowser.isOpera7 = is_opera7;
   geber_GlobalBrowser.isOpera5up = is_opera5up;
   geber_GlobalBrowser.isOpera6up = is_opera6up;
   geber_GlobalBrowser.isOpera7up = is_opera7up;


   geber_GlobalBrowser.isIE = is_ie3 || is_ie4 || is_ie5 || is_ie5_5 || is_ie6 || is_ie4up || is_ie5up || is_ie5_5up || is_ie6up || is_ie7 || is_ie7up;
   geber_GlobalBrowser.isIE3 = is_ie3;
   geber_GlobalBrowser.isIE4 = is_ie4;
   geber_GlobalBrowser.isIE5 = is_ie5;
   geber_GlobalBrowser.isIE55 = is_ie5_5;
   geber_GlobalBrowser.isIE6 = is_ie6;
   geber_GlobalBrowser.isIE7 = is_ie7;
   geber_GlobalBrowser.isIE4up = is_ie4up;
   geber_GlobalBrowser.isIE5up = is_ie5up;
   geber_GlobalBrowser.isIE55up = is_ie5_5up;
   geber_GlobalBrowser.isIE6up = is_ie6up;
   geber_GlobalBrowser.isIE7up = is_ie7up;


   geber_GlobalBrowser.isAOL = is_aol3 || is_aol4 || is_aol5 || is_aol6 || is_aol7 ||is_aol8;
   geber_GlobalBrowser.isAOL3 = is_aol3;
   geber_GlobalBrowser.isAOL4 = is_aol4;
   geber_GlobalBrowser.isAOL5 = is_aol5;
   geber_GlobalBrowser.isAOL6 = is_aol6;
   geber_GlobalBrowser.isAOL7 = is_aol7;
   geber_GlobalBrowser.isAOL8 = is_aol8;


   geber_GlobalBrowser.isNetscape = is_nav;   
   geber_GlobalBrowser.isNav = is_nav || is_nav2 || is_nav3 || is_nav4 || is_nav4up || is_navonly || is_nav6 || is_nav6up || is_nav5 || is_nav5up || is_nav7 || is_nav7up || is_nav8 || is_nav8up;   
   geber_GlobalBrowser.isNav2 = is_nav2;
   geber_GlobalBrowser.isNav3 = is_nav3;
   geber_GlobalBrowser.isNav4 = is_nav4;
   geber_GlobalBrowser.isNav5 = is_nav5;
   geber_GlobalBrowser.isNav6 = is_nav6;
   geber_GlobalBrowser.isNav7 = is_nav7;
   geber_GlobalBrowser.isNav8 = is_nav8;
   geber_GlobalBrowser.isNav5up = is_nav5up;
   geber_GlobalBrowser.isNav6up = is_nav6up;
   geber_GlobalBrowser.isNav7up = is_nav7up;
   geber_GlobalBrowser.isNav8up = is_nav8up;

   geber_GlobalBrowser.isHotJava = is_hotjava || is_hotjava3 || is_hotjava3up;
   geber_GlobalBrowser.isHotJava3 = is_hotjava3;
   geber_GlobalBrowser.isHotJava3up = is_hotjava3up;

   geber_GlobalBrowser.isKonquerer= is_konq;
   geber_GlobalBrowser.isSafari   = is_safari;
   geber_GlobalBrowser.isKHTML    = is_khtml;
   geber_GlobalBrowser.isGecko    = is_gecko;
   geber_GlobalBrowser.isFirebird = is_fb;
   geber_GlobalBrowser.isFirefox  = is_fx;
   geber_GlobalBrowser.isMozilla  = is_moz;
   geber_GlobalBrowser.isWebTV  = is_webtv;


   geber_GlobalBrowser.os_MAC = is_mac;
   geber_GlobalBrowser.os_MAC68k = is_mac68k;
   geber_GlobalBrowser.os_MACPPC = is_macppc;
   geber_GlobalBrowser.os_OS2 = is_os2;

   geber_GlobalBrowser.os_Win   = is_win;
   geber_GlobalBrowser.os_Win2k = is_win2k;
   geber_GlobalBrowser.os_WinXP = is_winxp;
   geber_GlobalBrowser.os_Win3  = is_win31;
   geber_GlobalBrowser.os_Win95 = is_win95;
   geber_GlobalBrowser.os_Win98 = is_win98;
   geber_GlobalBrowser.os_WinME = is_winme;
   geber_GlobalBrowser.os_WinNT = is_winnt;
   geber_GlobalBrowser.os_Win32 = is_win32;
   geber_GlobalBrowser.os_Win16 = is_win16;

   geber_GlobalBrowser.os_linux = is_linux;
   geber_GlobalBrowser.os_unix = is_unix;

   geber_GlobalBrowser.jsVersion = is_js;

   // DETECT additional geber_GlobalBrowser status bar
   geber_GlobalBrowser.extraStatusBarHeight = 0;
   if (geber_GlobalBrowser.os_WinXP)
       geber_GlobalBrowser.extraStatusBarHeight = 15;


   geber_GlobalBrowser.hasDOM = is_getElementById && !(is_opera && !is_opera7up);

   // ----------------------------------------------------------------
   // ************* DETECT PLUGINS ****************
   geber_GlobalBrowser.hasFlash = false;
   geber_GlobalBrowser.flashVersion = 0;
   geber_GlobalBrowser.hasPDF = false;
   geber_GlobalBrowser.pdfVersion = 0;
   geber_GlobalBrowser.isJavaEnabled = is_java;
   geber_GlobalBrowser.hasJava = false;
   geber_GlobalBrowser.jsVersion = 0;
   geber_GlobalBrowser.hasDirector = false;
   geber_GlobalBrowser.directorVersion = 0;
   geber_GlobalBrowser.hasRealPlayer = false;
   geber_GlobalBrowser.realPlayerVersion = 0;
   geber_GlobalBrowser.hasQuickTime = false;
   geber_GlobalBrowser.quickTimeVersion = 0;
   geber_GlobalBrowser.hasWMedia = false;
   geber_GlobalBrowser.wmediaVersion = 0;
   geber_GlobalBrowser.arePluginsDetected = 0;



   var flashPlayerVersion = deconcept.SWFObjectUtil.getPlayerVersion();
   if (flashPlayerVersion && flashPlayerVersion.major >= 6)
   {
       geber_GlobalBrowser.hasFlash = true;
       geber_GlobalBrowser.flashVersion = flashPlayerVersion.major;
   }

   geber_GlobalBrowser.hasDetectedPlugins = function()
   {
       return true;
   }

   geber_GlobalBrowser.detectPlugins = function()
   {
   } // detect plugins



   // ----------------------------------------------------------------
   // ************ create a XML-HTTP transfer object
   geber_GlobalBrowser.createXMLHTTPRequest = function()
   {
       var xmlHTTP = false;

       if (this.isIE && this.os_Win)
       {

          if (window.XMLHttpRequest && !this.isIE7)
          {
              xmlHTTP = window.XMLHttpRequest;
          }
          else if (!this.isIE7)
          {
              var activexNames = new Array("Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.4.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP");
              for (i = 0; i < activexNames.length; i++)
              {
                  try 
                  {
                      xmlHTTP = new ActiveXObject(activexNames[i]);
                      break;
                  }
                  catch(e) {xmlHTTP = false;}
              }
          }
       }



       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;
         }
       }

       return xmlHTTP;

   } // get XML HTTP Request




    // detect if this site is located on the local filesystem or provided via Web access
    geber_GlobalBrowser.isLocal = (String(window.location.protocol).toLowerCase().indexOf("file") >= 0)


    geber_GlobalBrowser.initialised = true;
    return geber_GlobalBrowser;
}


function geber_detect_onLoad()
{
    var browser = geber_getBrowser();
    browser.setPageIsLoaded(true);
}

geber_lib_addLoadEvent(geber_detect_onLoad);


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";

  var cookies = new geber_lib_CookieClass();  

  // check if the cookie of already sent feedback has been set
  if (feedbackSent)
      return true;

  feedbackSent = cookies.getValue("eadsgb06_feedback");
  if (feedbackSent)
      return true;


  var browser = geber_getBrowser();

  // hide flash layers
  if (!browser || !browser.isIE)
  {
      for (var layerID=1; layerID<30; layerID++)
      {
          var flashLayer = null;
          var flashAlternativeLayer = null;
          if (browser && browser.isIE5)
          {
              flashLayer = document.all["flashLayerID" + layerID + "Movie"];
              flashAlternativeLayer = document.all["flashLayerID" + layerID + "NoFlash"];
          }
          else
          {
              flashLayer = document.getElementById("flashLayerID" + layerID + "Movie");
              flashAlternativeLayer = document.getElementById("flashLayerID" + layerID + "NoFlash");
          }

          if (flashLayer) flashLayer.style.visibility = "hidden";
          if (flashAlternativeLayer) flashAlternativeLayer.style.display = "block";
      }
  }


  try
  {
      if (browser && browser.isIE5)
           document.all["feedbacksmall"].style.visibility = "visible";
      else
           document.getElementById("feedbacksmall").style.visibility = "visible";
  }
  catch(e) {
      return true;
  }

  return false;
}



function closeFeedback() {
  var browser = geber_getBrowser();

  var browser = geber_getBrowser();

  // show flash layers
  if (!browser || !browser.isIE)
  {
      for (var layerID=1; layerID<30; layerID++)
      {
          var flashLayer = null;
          var flashAlternativeLayer = null;
          if (browser && browser.isIE5)
          {
              flashLayer = document.all["flashLayerID" + layerID + "Movie"];
              flashAlternativeLayer = document.all["flashLayerID" + layerID + "NoFlash"];
          }
          else
          {
              flashLayer = document.getElementById("flashLayerID" + layerID + "Movie");
              flashAlternativeLayer = document.getElementById("flashLayerID" + layerID + "NoFlash");
          }

          if (flashLayer) flashLayer.style.visibility = "visible";
          if (flashAlternativeLayer) flashAlternativeLayer.style.display = "none";
      }
  }


  try
  {
      if (browser && browser.isIE5)
           document.all["feedbacksmall"].style.visibility = "visible";
      else
           document.getElementById("feedbacksmall").style.visibility = "hidden";
  }
  catch(e) {
      return true;
  }

  return false;
}



function openAddToPrintBasket(pathToPrintBasket, pagePath) {
  var browser = geber_getBrowser();
  var xmlhttp = (browser != null) ? browser.createXMLHTTPRequest() : null;

  if (pathToPrintBasket == null || xmlhttp == null || typeof(xmlhttp) == 'undefined')
      return true;

  var basketDialog = document.getElementById("addtoprintbasket");
  if (basketDialog == null)
      return true;


  // hide flash layers
  if (!browser || !browser.isIE)
  {
      for (var layerID=1; layerID<30; layerID++)
      {
          var flashLayer = null;
          var flashAlternativeLayer = null;
          if (browser && browser.isIE5)
          {
              flashLayer = document.all["flashLayerID" + layerID + "Movie"];
              flashAlternativeLayer = document.all["flashLayerID" + layerID + "NoFlash"];
          }
          else
          {
              flashLayer = document.getElementById("flashLayerID" + layerID + "Movie");
              flashAlternativeLayer = document.getElementById("flashLayerID" + layerID + "NoFlash");
          }

          if (flashLayer) flashLayer.style.visibility = "hidden";
          if (flashAlternativeLayer) flashAlternativeLayer.style.display = "block";
      }
  }


  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";

  // show flash layers
  if (!browser || !browser.isIE)
  {
      for (var layerID=1; layerID<30; layerID++)
      {
          var flashLayer = null;
          var flashAlternativeLayer = null;
          if (browser && browser.isIE5)
          {
              flashLayer = document.all["flashLayerID" + layerID + "Movie"];
              flashAlternativeLayer = document.all["flashLayerID" + layerID + "NoFlash"];
          }
          else
          {
              flashLayer = document.getElementById("flashLayerID" + layerID + "Movie");
              flashAlternativeLayer = document.getElementById("flashLayerID" + layerID + "NoFlash");
          }

          if (flashLayer) flashLayer.style.visibility = "visible";
          if (flashAlternativeLayer) flashAlternativeLayer.style.display = "none";
      }
  }

}


function sendAnswer(targetUrl) {
  var browser = geber_getBrowser();
  var xmlhttp = (browser != null) ? browser.createXMLHTTPRequest() : null;

  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;
    }
  }

  targetUrl = targetUrl.replace(/\.html/, ".php");
  if (targetUrl.indexOf("?") < 0)
      targetUrl += "?";
  else
      targetUrl += "&";

  targetUrl += "xmlhttp=1&design="+design+"&navigation="+navigation+"&functions="+funktionen+"&overall="+gesamteindruck+"&feedbacktype=k&type=k&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() {
}


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/jsp/s2f.jsp?lang=" +
            lang + "&head=" + 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_lib_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 geber_table_handlemouseover(row)
   {
       geber_table_addclassname(row, "highlightmouseover");
   }

   function geber_table_handlemouseout(row)
   {
       geber_table_removeclassname(row, "highlightmouseover");
   }


   function geber_table_handlemouseclick(row)
   {
       if (row == null) return;
       if (row.className == null || row.className == "" || row.className.indexOf("highlightclick") < 0)
           geber_table_addclassname(row, "highlightclick");
       else
           geber_table_removeclassname(row, "highlightclick");
   }




   function geber_table_addclassname(item, name)
   {
       if (item == null || name == null || typeof(name) != "string" || name == "") return;
       try
       {
           if (item.className == null || item.className == "")
           {
               item.className = name;
           }
           else if (item.className.length < name.length ||
                 (item.className != name && item.className.indexOf(" " + name + " ") < 0 &&
                  item.className.substr(item.className.length - name.length - 1) != " " + name &&
                  item.className.substring(0, name.length+1) != name +" " 
                 )
              )
           {
               item.className += " " + name;
           }
       } catch(e) {alert(e);}
   }

   function geber_table_removeclassname(item, name)
   {
       if (item == null || name == null || typeof(name) != "string" || name == "") return;
       try
       {
           if (item.className == name)
               item.className = "";

           else if (item.className != null && item.className != "" && item.className.length > name.length)
           {
               var pos = item.className.indexOf(" " + name + " ");
               if (pos >= 0)
                   item.className = item.className.substring(0, pos+1) + item.className.substr(pos+1 + name.length + 1);

               else if (item.className.substr(item.className.length - name.length - 1) == " " + name)
                   item.className = item.className.substr(0, item.className.length - name.length - 1);

               else if (item.className.substring(0, name.length+1) == name + " ")
                   item.className = item.className.substr(name.length+1);
           }
       } catch(e) {alert(e);}
   }



function geber_eads_writeFeedbackForm(targetAction)
{

var lt = '<';
var gt = '>';

document.write(
lt + 'div id="feedbacksmall"' + gt +
lt + 'form action="" method="get" id="feedbackform" name="feedbackform" onSubmit="sendAnswer(\'' + targetAction + '\'); return false;"' + gt +
lt + 'input type="hidden" name="action" value="submit"' + gt +
lt + 'input type="hidden" name="feedbacktype" value="small"' + gt +

lt + 'div class="header"' + gt + lt + 'h3' + gt + 'Pourriez-vous s' + "'" + 'il vous plaît évaluer ce rapport en ligne?' + lt + '/h3' + gt + lt + 'a href="#" onclick="closeFeedback(); return false;" class="close"' + gt + lt + 'img src="' + geber_lib_getBaseURLPath() + '/layout/img/close_feedbacksmall.gif" ' +
  ' alt="fermer" title="" width="12" height="12"' + gt + lt + '/a' + gt + lt + '/div' + gt +

lt + 'table class="feedback" cellspacing="0" cellpadding="0" border="0"' + gt +
  lt + 'tr class="headline"' + gt +
    lt + 'td class="keyword"' + gt + '&nbsp;' + lt + '/td' + gt +
    lt + 'td class="rating"' + gt + lt + 'p' + gt + 'Excellent' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="rating"' + gt + lt + 'p' + gt + 'Bon' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="rating"' + gt + lt + 'p' + gt + 'Satisfaisant' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="rating"' + gt + lt + 'p' + gt + 'Médiocre' + lt + '/p' + gt + lt + '/td' + gt +
  lt + '/tr' + gt +
  lt + 'tr class="lightblue"' + gt +
    lt + 'td class="keyword"' + gt + lt + 'p' + gt + 'Design' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="1" name="design"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="2" name="design"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="3" name="design"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="4" name="design"' + gt + lt + '/td' + gt +
  lt + '/tr' + gt +
  lt + 'tr' + gt +
    lt + 'td class="keyword"' + gt + lt + 'p' + gt + 'Navigation' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="1" name="navigation"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="2" name="navigation"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="3" name="navigation"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="4" name="navigation"' + gt + lt + '/td' + gt +
  lt + '/tr' + gt +
  lt + 'tr class="lightblue"' + gt +
    lt + 'td class="keyword"' + gt + lt + 'p' + gt + 'Fonctionnalités' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="1" name="functions"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="2" name="functions"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="3" name="functions"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="4" name="functions"' + gt + lt + '/td' + gt +
  lt + '/tr' + gt +
  lt + 'tr' + gt +
    lt + 'td class="keyword"' + gt + lt + 'p' + gt + 'Impression générale' + lt + '/p' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="1" name="overall"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="2" name="overall"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="3" name="overall"' + gt + lt + '/td' + gt +
    lt + 'td class="radio"' + gt + lt + 'input type="radio" value="4" name="overall"' + gt + lt + '/td' + gt +
  lt + '/tr' + gt +
lt + '/table' + gt +
lt + 'div class="bottom"' + gt + lt + 'a href="' + targetAction + '" class="feedbackform"' + gt + 'Vers le formulaire détaillé d' + "'" + 'évaluation' + lt + '/a' + gt + lt + 'a href="#" onclick="sendAnswer(\'' + targetAction + '\'); return false;" class="right"' + gt + lt + 'img src="' + geber_lib_getBaseURLPath() + '/layout/img/button_send.gif" alt="envoyer"' + gt + lt + '/a' + gt + lt + 'span class="right"' + gt + '&nbsp;' + lt + '/span' + gt + lt + 'a href="#" onclick="sendAnswer(\'' + targetAction + '\'); return false;" class="right"' + gt + 'Envoyer' + lt + '/a' + gt + lt + '/div' + gt +
lt + '/form' + gt +
lt + '/div' + gt + lt + '!-- // feedbacksmall --' + gt

);

}


function geber_eads_writeAddToPrintBasket(targetAction, pageTitle)
{
var lt = '<';
var gt = '>';

document.write(
lt + 'div id="addtoprintbasket"' + gt + 
lt + 'div class="header"' + gt + 
   lt + 'h3' + gt + unescape('Panier d%27impression') + lt + '/h3' + gt + 
lt + 'a href="javascript:void(0);" onclick="closeAddToPrintBasket(); return false;" class="close"' + gt + lt + 'img src="' + geber_lib_getBaseURLPath() + '/layout/img/close_feedbacksmall.gif"' + 
   ' alt="fermer" title="" width="12" height="12"' + gt + lt + '/a' + gt + lt + '/div' + gt + 
lt + 'p' + gt + unescape('La page a &eacute;t&eacute; ajout&eacute;e &agrave; votre panier d%27impression:') + lt + '/p' + gt + 
lt + 'p' + gt + lt + 'img src="' + geber_lib_getBaseURLPath() + '/layout/img/bg_listitem.gif" alt=""' + gt + ' &nbsp; ' + lt + 'span id="addtoprintbasketPageName"' + gt + pageTitle + lt + '/span' + gt + lt + '/p' + gt + 
lt + 'form action="#"' + gt + lt + 'p id="addtoprintbasketok"' + gt + lt + 'input name="mailsubmit" value="&nbsp;&nbsp;OK&nbsp;&nbsp;" style="width: 90px;" class="button90" type="submit"  onclick="closeAddToPrintBasket(); return false;"' + gt + lt + '/p' + gt + lt + '/form' + gt + 
lt + 'div class="bottom"' + gt + '<img src="' + geber_lib_getBaseURLPath()  + '/layout/img/icon_manage_popup.gif" alt="" title="" width="17" height="11"> &nbsp; ' +
lt + 'a href="' + targetAction + '" target="_blank" onclick="printBasketPopUp(\'' + targetAction  + '\'); closeAddToPrintBasket(); return false;"' + gt + 
unescape('ouvrez-vous votre panier d%27impression') + lt + '/a' + gt + lt + '/div' + gt + 
lt + '/div' + gt);


}


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;

  return PopUpOpenWindow(newLocation, 'geber_popUp', 'scrollbars,resizable=yes,location=no,status=no,toolbar=yes', w, h);
}

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;
  
  return PopUpOpenWindow(newLocation, 'geber_notesPopUp', 'scrollbars,resizable=yes,location=no,status=no,toolbar=yes', w, h);
}

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 printBasketPopUp(newLocation) {
  var w = 690;
  var h = 500;
  return PopUpOpenWindow(newLocation, 'geber_printbasketPopUp', 'scrollbars,resizable=yes,location=no,status=no,toolbar=yes', w, h);
}



function flashImagePopUp(newLocation, w, h) {
  if (newLocation && newLocation.substr(0,2) != "..")
      imagePopUp(geber_lib_getBaseURLPath() + newLocation, w, h);
  else
      imagePopUp(newLocation, w, h);
}



function searchPopUp(formular, language) 
{

  var w = 700;
  var h = 450;
  var targetURL = "http://www.reports.eads.net/search_2006/index_search.php";

  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;

  targetURL += queryParam;
  return PopUpOpenWindow(newLocation, 'searchresultpopup', 'resizable=yes,location=no,status=no,toolbar=yes,scrollbars' + operabar, w, h); 
}










function orderservicePopUp(newLocation) {
  var w = 657;
  var h = 600;
 	
  return PopUpOpenWindow(newLocation, 'popup', 'resizable=yes, status=no, toolbar=yes, scrollbars' + operabar, w, h); 
}

function sendPopUp(newLocation) {
  var w = 580;
  var h = 440;
 	
  return PopUpOpenWindow(newLocation, 'popup', 'resizable=yes, status=no, toolbar=yes, scrollbars' + operabar, w, h); 
}

function feedbackPopUp(newLocation) {
  var w = 450;
  var h = 380;
 	
  return PopUpOpenWindow(newLocation, 'popup', 'resizable=yes, status=no, toolbar=yes, scrollbars' + operabar, w, h); 
}



function printPopUp(newLocation) {
  var w = 690;
  var h = 500;
  
  var operabar = "";
  if (window.opera) operabar = "=yes";
  
   return PopUpOpenWindow(newLocation, 'popup', 'resizable=yes, status=no, toolbar=yes, scrollbars' + operabar, w, h); 
}


function resizePrintPopUp() {
  var w = 626;
  var h = 560;
  w = 690;
  h = 500;

  var browser = geber_getBrowser();  

  h = h + browser.extraStatusBarHeight;
  if (opener)
      window.resizeTo(w, h);
}

function glossaryPopUp(newLocation) {
  var h = 350;
  var w = 500;
 
  return PopUpOpenWindow(newLocation, 'glossary', 'resizable=yes, status=no, toolbar=yes, scrollbars' + operabar, w, h);
}


function tablePopUp(newLocation, preferedWidth) {

  var w = (preferedWidth && !isNaN(preferedWidth))? preferedWidth : 800;
  var h = 500;

  return PopUpOpenWindow(newLocation, 'tablePopUp', 'scrollbars,resizable=yes,location=no,status=no,toolbar=yes,', w, h);
}

function imagePopUp(newLocation, w, h) 
{
  if (w == null) w = 700;
  if (h == null) h = 450;

  w += 15;
  h += 32;
   return PopUpOpenWindow(newLocation, 'imagePopUp', 'resizable=yes,location=no,status=no,toolbar=yes,', w, h);
}

function popUp(URL, Height, Width, Resizable, Toolbar, Scrollbars, id)
{
	var szWndOptions = "";
	var szToolbar = (Toolbar=="ja")?"yes":"no";	
	var szScrollbars = (Scrollbars=="ja")?"yes":"no";
	var szResizable = (Resizable=="ja")?"yes":"no";
	szWndOptions += ",resizable=" + szResizable
	szWndOptions += ",scrollbars=" + szScrollbars
	szWndOptions += ",toolbar=" + szToolbar
	szWndOptions += ",menubar=" + szToolbar
	szWndOptions += ",status=" + szToolbar
	szWndOptions += ",directories=no"
	szWndOptions += ",copyhistory=no"
	szWndOptions += ",location=no"

	return PopUpOpenWindow(URL, id, szWndOptions, Width, Height);
}

function PopUpOpenWindow(newLocation, name, specialFeatures, w, h)
{
  var popUpWindow;
  try
  {
      var browser = geber_getBrowser();  

      /* increase size because status bar is always visible on Windows XP */
      h = h + browser.extraStatusBarHeight;
  }
  catch (e)
  {
      var Ergebnis = navigator.userAgent.match(/Windows NT ([5-9]).([0-9])/);
      if (navigator.userAgent.match(/firefox/i) || Ergebnis && Ergebnis[2] && Ergebnis[1] && ((Ergebnis[2] >= 1) || (Ergebnis[2] > 5))) 
      {
           if (navigator.userAgent.match(/ MSIE/))
               h = h+20;
           else
               h = h+15;
      }
  }

  // for popup within search
  if (!newLocation.match(/^(https?|file|ftp):\/\//i) && typeof(geberPopUpBaseURL) == 'string' && geberPopUpBaseURL != null && geberPopUpBaseURL.length > 0)
      newLocation = geberPopUpBaseURL + "/" + newLocation;

  if (!specialFeatures)
      specialFeatures = "";

  try
  {
    popUpWindow = window.open(newLocation, name, specialFeatures +  ',width=' + w + ',height=' + h);
  }
  catch (e)
  {
    return false;
  }  
  
  try
  {
    popUpWindow.resizeTo(w, h);
  }
  catch (e) {}
  
  try
  {
    popUpWindow.focus();
  }
  catch (e) {}

  return true;

}



// ===================================================================================
//  js_cookiefuncs
// ===================================================================================
function geber_lib_CookieClass()
{
    this.defaultPath = "";
}


geber_lib_CookieClass.prototype.setRaw = function(cookieString)
{
    document.cookie = cookieString;
}

geber_lib_CookieClass.prototype.getRaw = function()
{
    return document.cookie.toString();
}



geber_lib_CookieClass.prototype.setValue = function(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path)    ? "; path=" + path : "; path=" + this.getDefaultPath()) +
      ((domain)  ? "; domain=" + domain : "") +
      ((secure)  ? "; secure" : "");

  this.setRaw(curCookie);
}



geber_lib_CookieClass.prototype.getValue = function(name) {

  var dc = this.getRaw();
  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 = dc.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}



geber_lib_CookieClass.prototype.deleteValue = function(name, path, domain) {
  if (geber_getCookie(name)) {
    this.setRaw(name + "=" +
    ((path)    ? "; path=" + path : (this.defaultPath != "" ? "; path=" : "") + this.defaultPath) +
    ((domain)  ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT");
  }
}

geber_lib_CookieClass.prototype.setDefaultPath = function(path)
{
    if (typeof(path) == 'string' && path.length > 0)
       this.defaultPath = path;
    else
       this.defaultPath = "";
}

geber_lib_CookieClass.prototype.getDefaultPath = function()
{
    if (this.defaultPath && typeof(this.defaultPath) == 'string' && this.defaultPath.length > 0)
        return this.defaultPath;
    else
    {
        var myCookiePath = geber_lib_getBaseURLPath();
        myCookiePath = myCookiePath.replace(new RegExp("/(de|en|fr|it|es|nl)/?$", "i"), "");
        return myCookiePath;
    }
}

function geber_cookie_addCookieToBrowserObject()
{
  try {
    var browser = geber_getBrowser();
    if (browser)
        browser.cookie = new geber_lib_CookieClass();
      }
   catch (e){}
}
geber_cookie_addCookieToBrowserObject();

// ===================================================================================
//  js_flash
// ===================================================================================


function geber_lib_findFlash(flash) {

var browser = geber_getBrowser();

if (typeof(flash) != 'string' || flash == "")
    return;

   
    // detect for mozilla based browsers and opera
    // detect for netscape browsers
    if (window.document[flash])
    {
       try {
           var movie = window.document[flash];
           if (movie) return movie;
       } catch(e) {}
    }


    // detect for IE 5
    if (window[flash])
    {
       try {
           var movie = window[flash];
           if (movie) return movie;
       } catch (e) {}
    }


    // detect for IE
    if (!browser.isOpera && document.all && document.all[flash])
    {
       try {
           var movie = document.all[flash];
           if (movie) return movie;
       } catch (e) {}
    }



    // detect for mozilla based browsers and opera
    if (!browser.isIE && document.embeds[flash])
    {
       try {
           var movie = document.embeds[flash];
           if (movie) return movie;
       } catch (e) {}
    }
 


    // *** at least use DOM to get the player

    if (!browser.hasDOM) 
        return;



    // try to find object tag
    try {
        var movie = document.getElementByName(flash)[0];
        if (movie) return movie;
     } catch(e) {}



    // try to find object tag
    var movie = document.getElementById(flash);
    if (movie) return movie;
 

    // try to find an embed tag for the movie
    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) && 
            geber_lib_isValidFlashObject(movies[i]))
        {
            return movies[i];
        }
    }
    

    return;
}




var geber_flashMovies = new Array();

function geber_flash_registerFlash(movieTagName, startFrame, messageFieldID, flashLayerID, noFlashLayerID)
{
    var flashMovie = new geber_flash_Movie(movieTagName, startFrame, messageFieldID, flashLayerID, noFlashLayerID);
    geber_flashMovies[geber_flashMovies.length] = flashMovie;

}

var geber_flash_maxShowFlashCounter = 66000;
function geber_flash_showFlashMovies()
{
    if (geber_flash_maxShowFlashCounter <= 0)
        return;

    var browser = geber_getBrowser();
    if (browser && !browser.hasFlash)
        return;

    geber_flash_maxShowFlashCounter--;
    if (browser && !browser.isPageLoaded())
        geber_flash_maxShowFlashCounter++;


    // get all movies and try to show them
    var newMovieList = new Array();
    for (var i=0; i < geber_flashMovies.length; i++)
    {


         var movie  = geber_flashMovies[i];
         try 
         {              
             if (!movie || typeof(movie) != "object") 
                 continue;

             if (movie.isVisible()) 
                 continue;


             movie.showFlash(); 

            // remember the movie for next time if flash is not yet visible
            if (movie.needNextTryToShow())
                newMovieList[newMovieList.length] = movie;

         } catch(e) {}
    }

    if (newMovieList.length > 0 || !browser || (browser && !browser.isPageLoaded()))
        window.setTimeout("geber_flash_showFlashMovies();", 50);
    else
    {
return;
//alert("flashShow is not called anymore. page is loaded: " + (browser.isPageLoaded() ? "yes" : "no") + ", max call: " + geber_flash_maxShowFlashCounter);

        if (geber_flash_maxShowFlashCounter > 2)
            geber_flash_maxShowFlashCounter = 2;

        window.setTimeout("geber_flash_showFlashMovies();", 50);
    }

}
window.setTimeout("geber_flash_showFlashMovies();", 50);


function geber_flash_Movie(movieTagName, startFrame, messageFieldID, flashLayerID, noFlashLayerID)
{
    this.movieTagName = (typeof(movieTagName) == 'string' && movieTagName.length > 0) ? movieTagName : "nomovietagname__";
    this.startFrame = (typeof(startFrame) == 'number' && startFrame > 0) ? startFrame : 0;
    this.messageFieldID = (typeof(messageFieldID) == 'string' && messageFieldID.length > 0) ? messageFieldID : "nomessagefield__";


    this.flashLayerID = (typeof(flashLayerID) == 'string' && flashLayerID.length > 0) ? flashLayerID : "flashLayerNoID__";
    this.noFlashLayerID = (typeof(noFlashLayerID) == 'string' && noFlashLayerID.length > 0) ? noFlashLayerID : "noFlashLayerNoID__";

    this.maxRetry = 10000;
    this.flashIsVisible = false;
    this.flashIsLoaded = false;
    this.flashIsActive = false;
}


geber_flash_Movie.prototype.isVisible = function()
{
    return (this.flashIsVisible) ? true : false;
}


geber_flash_Movie.prototype.needNextTryToShow = function()
{
    return (this.maxRetry > 0) ? true : false;
}


geber_flash_Movie.prototype.writeMessage = function(msg)
{
//    geber_lib_writeMessage(this.messageFieldID, msg);
// alert(this.messageFieldID + "::: " + msg);
}


geber_flash_Movie.prototype.isLoaded = function()
{
    if (this.flashIsLoaded) return true;

    if (!this.isValid())
    {
        this.writeMessage("Flash is invalid: " + this.movieTagName);
        return false;
    }
    else
    {
        try
        {
            this.flashIsLoaded = (this.movie.PercentLoaded() == 100) ? true : false;           
        }
        catch (e) {}
    }
    return this.flashIsLoaded;
}

geber_flash_Movie.prototype.isActive = function()
{
    if (this.flashIsActive) return true;

    if (!this.isValid() || !this.isLoaded())
    {
        return false;
    }
    else
    {
        try
        {
             var currentFrame = parseInt(this.movie.TCurrentFrame("/"));
             this.writeMessage("flash '" + this.movieTagName + "' is on current frame: " + currentFrame);

             if (this.startFrame <= 0 || currentFrame >= this.startFrame)
             {
                 this.writeMessage("flash '" + this.movieTagName + "' is active now ");
                 this.flashIsActive = true;
                 return true;
             }
 
             // start the movie if the current frame indicates a not playing movie
             else if (currentFrame < 0)
             {
                 this.movie.GotoFrame(0);
                 this.movie.Play();
             }
 
        }
        catch (e) {this.writeMessage("<pre>" + e.message + "</pre>");}
    }
    return false;
}


geber_flash_Movie.prototype.isValid = function()
{
    if (typeof(this.movie) != 'undefined' && this.movie)
        return true;


    if (typeof(this.movieTagName) == 'string' && this.movieTagName.length > 0)
    {
            this.movie = geber_lib_findFlash(this.movieTagName);
    }


    if (typeof(this.movie) != 'undefined' && this.movie)
    {
        this.writeMessage("flash '" + this.movieTagName + "' is valid now ");
        return true;
    }

//        this.writeMessage("Flash is still invalid after retry: " + this.movieTagName);


    return false;
}



geber_flash_Movie.prototype.activateFlashLayer = function()
{

 this.writeMessage("showing flash '" + this.movieTagName + "'");

        // the flash is active by now. show it 
    try
    {
        this.writeMessage("showing flash '" + this.movieTagName + "' in layer '"  + this.flashLayerID + "'");

        var movieLayer = document.getElementById(this.flashLayerID);
        movieLayer.style.top = 0;
        movieLayer.style.left = 0;
        movieLayer.style.display = "block";
//        movieLayer.style.position = "relative";
    } catch(e) {}

    try
    {
        var alternativeLayer = document.getElementById(this.noFlashLayerID);
        alternativeLayer.style.display = "none";
//        alternativeLayer.innerHTML = "";
    } catch(e) {}
}




// *** show the flash movie only if it has been started to play
// some users my experience trouble if loading the XML file fails

geber_flash_Movie.prototype.showFlash = function ()
{
    var browser = geber_getBrowser();

    this.maxRetry--;

    if (browser && !browser.hasFlash )
    {
        this.writeMessage("no flash installed. Flash '" + this.movieTagName + "' can not be activated.");
        this.maxRetry = 0;         
        return;
    }
 

    // find the movie. Try until we have found it
    if (!this.isValid())
    {
        this.writeMessage("flash '" + this.movieTagName + "' not yet found: " + this.maxFlashSearch);
        return;
    }


    if (!this.isLoaded())
    {
        this.writeMessage("flash '" + this.movieTagName + "' not yet loaded");
        return;
    }

    // try to find the active flash
    if (!this.isActive())
    {
        this.writeMessage("waiting for flash '" + this.movieTagName + "' to become active on frame: " + this.startFrame);
        return;
    }


    this.maxRetry = 0;         
    this.activateFlashLayer();
    this.flashIsVisible = true;
}


function geber_lib_writeFlash(flashID, tagID, movieURL, baseURL, noPrint, isPrintPopUp, width, height, language, flashvars, wmode, startFrame, requestParams, bgcolor)
{

    if (bgcolor == null) 
    {
       bgcolor = "#ffffff";
    }

    if (String(noPrint).length <= 0 || '1' != String(isPrintPopUp))
    {

         var requestWidth, requestHeight;
         try { requestWidth = parseInt(geber_lib_getQueryParameter("width")); } catch(e) {}
         try { requestHeight = parseInt(geber_lib_getQueryParameter("height")); } catch(e) {}
         
         if ((width == null || (width <= 0 && width != "100%")) && requestWidth != null && requestWidth > 0)
             width = requestWidth;
         if ((height == null || (height <= 0 && height != "100%"))  && requestHeight != null && requestHeight > 0)
             height = requestHeight;

         // set the height and width for the layer
         var flashLayerID = "flashLayerID" + flashID;
         var flashLayer = document.getElementById(flashLayerID);
         if (flashLayer != null)
         {
             flashLayer.style.width = width;
             flashLayer.style.height = height;
         }


         // flash data for chart generator
         var requestFlashVars = '';
         var queryParams = new Array("rand", "width", "height", "dir");
         if (requestParams && typeof(requestParams) == 'string' && requestParams.length > 0)
         {
             var addQueryParams = requestParams.split(",");
             for (var idx=0; idx < addQueryParams.length; idx++)
             {
                 queryParams[queryParams.length] = addQueryParams[idx];
             }
         }

         try
         {
             for (var idx = 0; idx < queryParams.length; idx++)
             {
                 var paramValue = geber_lib_getQueryParameter(queryParams[idx]);
                 if (paramValue != null && paramValue.length > 0)
                     requestFlashVars += '&' + queryParams[idx] + "=" + paramValue;
             }
         } catch(e) {}


         var flashAlternativeLayer = document.getElementById("flashnoscriptLayer" + flashID);
         var flashAlternative = "";
         if (flashAlternativeLayer && browser.isIE) 
             flashAlternative = flashAlternativeLayer.innerHTML;

         var movieTagName = tagID;
         if (movieTagName.length <= 0) movieTagName = "FALSCH_Movie" + flashID;

         if (String('').length <= 0) movieURL += "?lang="  + language + "&language=" + language;

         var so = new SWFObject(movieURL, movieTagName, width, height, "6", bgcolor );
         so.nonFlashHTML = flashAlternative;
         so.addParam("quality", "best");
         so.addParam("salign", "lt");
         so.addParam("wmode", "opaque");
         so.addParam("swliveconnect", "true");
         so.addParam("FlashVars", "&dummy=1&lang="  + language + "&language="  + language + "&" + flashvars + "&uniqueId=" + Math.floor(Math.random()*99999) + "&" + requestFlashVars + "&tx=1");
         if (wmode != null && typeof(wmode) == "string" && wmode.length > 0)
             so.addParam("wmode", wmode);
         
         if (baseURL != null && baseURL.length > 0)
             so.addParam("base", baseURL);

         // show the flash
         var flashTagHTML = so.getSWFHTML();
         geber_lib_writeDocument(flashTagHTML);

         geber_flash_registerFlash(movieTagName, startFrame, "flashMessage" + flashID, 
                  "flashLayerID" + flashID + "Movie", "flashLayerID" + flashID + "NoFlash")

    }
}






function geber_lib_getBrowserWidth()
{
        if (window.innerWidth)
                return window.innerWidth;
        else if (document.documentElement && document.documentElement.clientWidth != 0)
                return document.documentElement.clientWidth;
        else if (document.body)
                return document.body.clientWidth;

        return 0;
};

function geber_lib_getBrowserHeight()
{
        if (window.innerHeight)
                return window.innerHeight;
        else if (document.documentElement && document.documentElement.clientHeight != 0)
                return document.documentElement.clientHeight;
        else if (document.body)
                return document.body.clientHeight;

        return 0;
};
