/* browser versionen */
var ie = (document.styleSheets && document.all)?true:false;
var ie5 = (ie && !document.compatMode)?true:false;
var ie6 = (ie && document.compatMode && !window.XMLHttpRequest) ? true:false;
var ie7 = (ie && document.compatMode && window.XMLHttpRequest && !window.getComputedStyle) ? true:false;

var ns4 = (document.ids)?true:false;
var ns6 = (document.getElementById && !document.all)?true:false;
var ns7 = (ns6 && navigator.userAgent.toLowerCase().indexOf("netscape6") == -1)?true:false;
var firefox = (ns6 && navigator.userAgent.toLowerCase().indexOf("firefox") > -1) ? true : false;

var opera = (document.all && !document.styleSheets)?true:false;
var opera7 = (window.opera && document.createComment) ? true : false;
var opera8up = (window.getComputedStyle && navigator.userAgent.toLowerCase().indexOf("opera") > -1) ? true : false;

var safari = ( (document.childNodes) && (!document.all) && (!navigator.taintEnabled) && (!navigator.accentColorName) ) ? true : false;
var safari2 = ( (safari && (window.XMLHttpRequest != null)) ) ? true : false;
var safari3 = (window.devicePixelRatio) ? true : false;

var old_IE = ie5;
var old_NS = ns4 || (!safari && ns6 && !window.getComputedStyle) ? true : false;
var old_Opera = ( navigator.userAgent.toLowerCase().indexOf("opera") > -1 && !(document.getComputedStyle || document.createComment) ) ? true : false;
var oldSafari = (safari && !(safari2 || safari3)) ? true : false;

//AC_RunActiveContent.js
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}


//swfobject.js
/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
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(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[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;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

//nodomws.js
/**
 * http://www.mozilla.org/docs/dom/technote/whitespace/nodomws.js
 * Throughout, whitespace is defined as one of the characters
 *  "\t" TAB \u0009
 *  "\n" LF  \u000A
 *  "\r" CR  \u000D
 *  " "  SPC \u0020
 *
 * This does not use Javascript's "\s" because that includes non-breaking
 * spaces (and also some other characters).
 */


/**
 * Determine whether a node's text content is entirely whitespace.
 *
 * @param nod  A node implementing the |CharacterData| interface (i.e.,
 *             a |Text|, |Comment|, or |CDATASection| node
 * @return     True if all of the text content of |nod| is whitespace,
 *             otherwise false.
 */
function is_all_ws( nod )
{
  // Use ECMA-262 Edition 3 String and RegExp features
  return !(/[^\t\n\r ]/.test(nod.data));
}


/**
 * Determine if a node should be ignored by the iterator functions.
 *
 * @param nod  An object implementing the DOM1 |Node| interface.
 * @return     true if the node is:
 *                1) A |Text| node that is all whitespace
 *                2) A |Comment| node
 *             and otherwise false.
 */

function is_ignorable( nod )
{
  return ( nod.nodeType == 8) || // A comment node
         ( (nod.nodeType == 3) && is_all_ws(nod) ); // a text node, all ws
}

/**
 * Version of |previousSibling| that skips nodes that are entirely
 * whitespace or comments.  (Normally |previousSibling| is a property
 * of all DOM nodes that gives the sibling node, the node that is
 * a child of the same parent, that occurs immediately before the
 * reference node.)
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The closest previous sibling to |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function node_before( sib )
{
  while ((sib = sib.previousSibling)) {
    if (!is_ignorable(sib)) return sib;
  }
  return null;
}

/**
 * Version of |nextSibling| that skips nodes that are entirely
 * whitespace or comments.
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The closest next sibling to |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function node_after( sib )
{
  while ((sib = sib.nextSibling)) {
    if (!is_ignorable(sib)) return sib;
  }
  return null;
}

/**
 * Version of |lastChild| that skips nodes that are entirely
 * whitespace or comments.  (Normally |lastChild| is a property
 * of all DOM nodes that gives the last of the nodes contained
 * directly in the reference node.)
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The last child of |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function last_child( par )
{
  var res=par.lastChild;
  while (res) {
    if (!is_ignorable(res)) return res;
    res = res.previousSibling;
  }
  return null;
}

/**
 * Version of |firstChild| that skips nodes that are entirely
 * whitespace and comments.
 *
 * @param sib  The reference node.
 * @return     Either:
 *               1) The first child of |sib| that is not
 *                  ignorable according to |is_ignorable|, or
 *               2) null if no such node exists.
 */
function first_child( par )
{
  var res=par.firstChild;
  while (res) {
    if (!is_ignorable(res)) return res;
    res = res.nextSibling;
  }
  return null;
}

/**
 * Version of |data| that doesn't include whitespace at the beginning
 * and end and normalizes all whitespace to a single space.  (Normally
 * |data| is a property of text nodes that gives the text of the node.)
 *
 * @param txt  The text node whose data should be returned
 * @return     A string giving the contents of the text node with
 *             whitespace collapsed.
 */
function data_of( txt )
{
  var data = txt.data;
  // Use ECMA-262 Edition 3 String and RegExp features
  data = data.replace(/[\t\n\r ]+/g, " ");
  if (data.charAt(0) == " ")
    data = data.substring(1, data.length);
  if (data.charAt(data.length - 1) == " ")
    data = data.substring(0, data.length - 1);
  return data;
}


//common.js
function decryptlink(){
	var url='';
	for (i=0; i<arguments.length; i++){
		url = url + arguments[i];
	}
	window.open( url, '_blank' );	
}

/* cookie scripts */

function GetCookieParam(param){
	var p='';
	p=document.cookie;
	i=p.indexOf(param+'=');
	if (i>=0) {
		p=p.substr(i);
		i=p.indexOf(';');
		if (i>=0) p=p.substr(0,i);
		i=p.indexOf('=');
		if (i>=0) p=p.substr(i+1);
		return p;
	}
	else return '';
}

//if (!document.cookie) {
if (document.cookie.indexOf('source=') < 0){
	var ref=document.referrer;
	if (ref=="") {
		ref=window.location.href;
	}
	window.document.cookie = "source=" + ref + "; path=/; domain="+window.location.host+";";
}

function isDocOpinionSet(documentID) {
	return (GetCookieParam( "opDocs" ).indexOf(documentID)>=0);
}

/* img script */

function img_act(imgName,obj) {
	if (obj.src) {
		obj.src=eval(imgName+".src");
	} else if (document[obj]) {
		document[obj].src=eval(imgName+".src");
	}
}





// find position x and y
function findPosX(obj){
	var curleft = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}
function findPosY(obj){
	var curtop = 0;
	if (obj.offsetParent){
		while (obj.offsetParent){
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}



function trim(s) {
	return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
}


/* default value des suchfeldes setzen / ausblenden */
function clearSearchInput( defaultText, obj ) {
	if ( obj.value == defaultText )
		obj.value = "";
}
function setSearchInput( defaultText, obj ) {
	if ( obj.value == "")
		obj.value = defaultText;
}

function GetParam(param){
	var p='';
	p=window.location.search;
	i=p.indexOf('&'+param);
	if (i>0) {
		p=p.substr(i+1);
		i=p.indexOf('&');
		if (i>0) p=p.substr(0,i);
		i=p.indexOf('=');
		if (i>0) p=p.substr(i+1);
		i=p.indexOf('#');
		if (i>0) p=p.substr(0,i);
		return decodeURIComponent(p);
	}
	else return '';
}


/* validierung der einfachen suche */
function chkFOsearch( defaultText, param ){
	if ( $F("Tsearch") == defaultText || checkText ($("Tsearch"), 'Please enter a search term!') == false ){
		alert('Please enter a search term!')
		$("Tsearch").focus();
		return false;
	} else {
		var db = param;
		if (param != '' && param != null ){
			db = param;
		} else {
			db = dbPath;
		}
		window.location.href = '/' + db + '/search?SearchView&Query=' + encodeURIComponent( document.FOsearch.Tsearch.value ) + '&Count=10&Start=1&SearchFuzzy=1&SearchMax=0&SearchWv=1&SearchOrder=3';
	}
}


/* validierung - hilfsfunktionen */

function checkText(FOfield, ERRtext){
	if (!FOfield.value){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function checkTextarea(FOfield, ERRtext, FOfieldlength){
	if (FOfield.value.length > FOfieldlength){
		alert(ERRtext + FOfieldlength);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function checkList(fname,ftext){
	if (!fname.options[fname.selectedIndex].value || fname.options[fname.selectedIndex].value=="#"){
		alert(ftext);
		fname.focus();
		return false;
	} else {
		return true;
	}
}

function checkCheckbox(FOfield, ERRtext){
	if (!FOfield.checked == true){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function checkRadio(FOfield, ERRtext){
	retVal = false;
	for (var i=0;i<FOfield.length;i++){
		if (FOfield[i].checked==true)
			retVal = true
	}
	if (retVal == false){
		alert(ERRtext);
		FOfield[0].focus();
	}
	return retVal;
}

function checkEmail(FOfield, ERRtext){
	var x = FOfield.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x)){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function checkEmailList(FOfield, arrayValue, ERRtext){
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(arrayValue)){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function checkEmailSemicolon(FOfield, ERRtext){
	if (FOfield.value.indexOf(";") != -1){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function checkUrl(FOfield, ERRtext){
	var x = FOfield.value;
	var filter  = /^http(s)?:\/\//;
	if (!filter.test(x)){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function chkDate(FOfield, ERRtext){
	if (checkValidDate(FOfield.value) == false){
		alert(ERRtext);
		FOfield.focus();
		return false;
	} else {
		return true;
	}
}

function isDigit(theDigit){
	var digitArray = new Array('0','1','2','3','4','5','6','7','8','9'),j;
	for (j = 0; j < digitArray.length; j++)
		if (theDigit == digitArray[j])
			return true
	return false 
}

function isPositiveInteger(theString){
	var theData = new String(theString);
	if (!isDigit(theData.charAt(0)))
		if (!(theData.charAt(0)== '+'))
			return false
	
	for (var i = 1; i < theData.length; i++)
		if (!isDigit(theData.charAt(i)))
			return false
	return true 
}

function isDate(s){
	// datum in tag, monat, jahr zerlegen
	var a1=s.split(".");
	var e=true;
	// test auf tag UND monat UND jahr
	if (a1.length!=3)
		e=false
	else{
		if (isPositiveInteger(a1[0]) && isPositiveInteger(a1[1]) && isPositiveInteger(a1[2])){
			var d=a1[0];
			var m=a1[1];
			var y=a1[2];
			if (((e) && (y<1800)||y.length>4))
				e=false
			
			if (e){
				v=new Date(m+"/"+d+"/"+y);
				if (v.getMonth()!=m-1)
					e=false
			}
		}else
			e=false
	}
	return e;
}

function checkValidDate(v){
	if (!isDate(v))
		return false
	else
		return true
}





//XHR.js
/***************************************/
/*                                     */
/* scripts using AJAX                  */
/* (XMLHttpRequest)                    */
/*                                     */
/***************************************/


/* submit form */
function submitForm(p,f,l){
	$("dvPopupWait").style.display = "block";
	$("dvBtnSubmit").innerHTML = "<img src=\"/benecom/files_p.nsf/Lookup/waiting/$file/waiting.gif\" alt=\"\">";
	var url = "/"+mainPath+"/form.html?OpenForm&Seq=1&form="+f+"&ie="+ie+"&src="+encodeURIComponent(GetCookieParam('source'));
	var postBdy = Form.serialize(f);
	var ajax = new Ajax.Request(
		url,
		{
			  method:"post"
			, postBody: postBdy
			, contentType: "application/x-www-form-urlencoded"
			, onComplete: showFormResponse
		}
	);
	function showFormResponse(originalRequest){
		$("dvPopup").innerHTML = originalRequest.responseText;		 

		window.setTimeout(
			function(){
		 		 if ( document.getElementsByClassName("inputError").length > 0 ) {
		 		 		document.getElementsByClassName("inputError")[0].focus();
		 		 } else {
						pageTracker._trackPageview("/forms/success/" + f + "/" + l);
				}
			}, 
		200)
	}
}

/* confirmation */
function confirmation(db,id,lang){
	$("dvPopupWait").style.display = "block";
	$("dvErrorTxt").innerHTML = $("dvErrorTxt").innerHTML + "<br><br><img src=\"/benecom/files_p.nsf/Lookup/waiting/$file/waiting.gif\" alt=\"\">";
	var targetContainer = $("dvPopup");
	var url = "/" + mainPath + "/confirm?OpenAgent&type=ajax";
	var pars = new Array();
	pars[0] = "id="+id;
	pars[1] = "ie="+ie;
	pars[2] = "src="+encodeURIComponent(GetCookieParam('source'));
	var params = pars.join("&");
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
		 		pageTracker._trackPageview("/forms/confirmation/" + lang);
				}
		}
	);
}

// kontakt formular
function openKontakt(db,id,urlmod,lang,comment){
	waitingScreen();
	var targetContainer = $("dvPopup");
	var url = "/" + mainPath + "/AJAX?OpenAgent&code=0820";
	var pars = new Array();
	pars[0] = "id="+id;
	pars[1] = "mod="+urlmod;
	pars[2] = "ie="+ie;
	pars[3] = "src="+encodeURIComponent(GetCookieParam('source'));
	pars[4] = "comment="+encodeURIComponent(comment);
	var params = pars.join("&");
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
				$("dvWaiting").style.display = "none";
		 		pageTracker._trackPageview("/forms/contact/" + lang);
				}
		}
	);
}

/* send this */
function openSendthis(id,urlmod,lang){
	waitingScreen();
	var targetContainer = $("dvPopup");
	var url = "/" + mainPath + "/AJAX?OpenAgent&code=0812";
	var pars = new Array();
	pars[0] = "id="+id;
	pars[1] = "mod="+urlmod;
	pars[2] = "ie="+ie;
	pars[3] = "src="+encodeURIComponent(GetCookieParam('source'));
	var params = pars.join("&");
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
	 			$("dvWaiting").style.display = "none";
		 		pageTracker._trackPageview("/forms/sendthis/" + lang);
				}
		}
	);
}


/* postings */
function submitPosting(p,f,id,urlmod,l){
	$("dvBtnSubmit").innerHTML = "<img src=\"/benecom/files_p.nsf/Lookup/waiting/$file/waiting.gif\" alt=\"\">";
	var url = "/"+mainPath+"/form.html?OpenForm&Seq=1&form="+f+"&ie="+ie+"&src="+encodeURIComponent(GetCookieParam('source'));
	var postBdy = Form.serialize(f);
	var ajax = new Ajax.Request(
		url,
		{
			  method:"post"
			, postBody: postBdy
			, contentType: "application/x-www-form-urlencoded"
			, onComplete: showPostingResponse
		}
	);
	function showPostingResponse(originalRequest){
		if ( originalRequest.responseText.indexOf("inputError") > 0 ) {
			$("dvWritePosting").innerHTML = originalRequest.responseText;
			Recaptcha.create("6LfzXgIAAAAAAH_opGwDcbpmTyFzPv8eLOR-vC3v", "recaptcha", {
				theme: "custom",
				lang: l,
				tabindex: 5
			});

		
 		} else {
			$("dvWritePosting").innerHTML = originalRequest.responseText;

			window.setTimeout(
				function(){
					$("dvWritePosting").style.display = "none";
					openModulePostings(id,urlmod,l);
				}, 
			5000)
		}

		window.setTimeout(
			function(){
		 		 if ( document.getElementsByClassName("inputError").length > 0 ) {
		 		 		document.getElementsByClassName("inputError")[0].focus();
		 		 } else {
						pageTracker._trackPageview("/forms/success/" + f + "/" + l);
				}
			}, 
		200)
	}
}


function openPostings(id,urlmod,lang){
//	waitingScreen();
	var targetContainer = $("dvWritePosting");
	var url = "/" + mainPath + "/AJAX?OpenAgent&code=3617";
	var pars = new Array();
	pars[0] = "id="+id;
	pars[1] = "mod="+urlmod;
	pars[2] = "ie=false";
	pars[3] = "src="+encodeURIComponent(GetCookieParam('source'));
	var params = pars.join("&");
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
				Recaptcha.create("6LfzXgIAAAAAAH_opGwDcbpmTyFzPv8eLOR-vC3v", "recaptcha", {
					theme: "custom",
					lang: lang,
					tabindex: 5
				});
//	 			$("dvWaiting").style.display = "none";
		 		pageTracker._trackPageview("/forms/comment/" + lang);
				}
		}
	);
}

function openModulePostings(id,urlmod,lang){
	var targetContainer = $("dvPostings");
	var url = "/" + mainPath + "/AJAX?OpenAgent&code=4557";
	var pars = new Array();
	pars[0] = "id="+id;
	pars[1] = "mod="+urlmod;
	pars[2] = "ie="+ie;
	pars[3] = "src="+encodeURIComponent(GetCookieParam('source'));
	var params = pars.join("&");
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
				$("dvPostings").style.display = "block";
				}
		}
	);
}


/* subscribe newsletter */
function openSubscribe(db,list,lang,email){
	waitingScreen();
	var targetContainer = $("dvPopup");
	var url = "/" + mainPath + "/AJAX?OpenAgent&code=7879";
	var pars = new Array();
	pars[0] = "email="+email;
	pars[1] = "ie="+ie;
	pars[2] = "list="+list;
	pars[3] = "src="+encodeURIComponent(GetCookieParam('source'));
	var params = pars.join("&");
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
	 			$("dvWaiting").style.display = "none";
		 		pageTracker._trackPageview("/forms/subscribe/" + list + "/" + lang );
				}
		}
	);
}





/* zoom article image */
function zoomArticleImg(img,obj){
	waitingScreen();
	pic = new Image();
	pic.onload = function(){
		zoomArticleImg2(img,obj);
	}
	pic.src = img;
}

function zoomArticleImg2(img,obj){
	pic = new Image();
	pic.src = img;
	
	if (window.innerHeight){
		winHeight = parseInt(window.innerHeight);
		winWidth = parseInt(window.innerWidth);
	} else {
		winHeight = parseInt(document.documentElement.clientHeight);
		winWidth = parseInt(document.documentElement.clientWidth);
	}

	if (window.innerHeight){
		posY = window.pageYOffset;
		posX = window.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {
		posY = document.documentElement.scrollTop;
		posX = document.documentElement.scrollLeft;
	} else if (document.body) {
		posY = document.body.scrollTop;
		posX = document.body.scrollLeft;
	}

	var offsetY = 38;
	var offsetX = 14;
	
	if (pic.height > 0) {
		winHeight -= (pic.height + offsetY);
		winWidth -= (pic.width + offsetX);
	} else {
		winHeight -= 300;
		winWidth -= 600;
	}
	
	winHeight = (winHeight - (winHeight%2))/2;
	winWidth = (winWidth - (winWidth%2))/2;
	if (winHeight < 10) winHeight = 10;
	if (winWidth < 10) winWidth = 10;
	posY += winHeight;
	posX += winWidth;


	$("dvPopup").innerHTML = "<div id=\"dvZoomArticleImg\"></div>";
	$("dvZoomArticleImg").style.left = posX + "px";
	$("dvZoomArticleImg").style.top = posY + "px";
	var targetContainer = $("dvZoomArticleImg");
	var url = "/" + mainPath + "/AJAX?OpenAgent&code=1620";
	var params = "img="+img;
	var ajax = new Ajax.Updater(
		targetContainer,
		url,
		{
			  method:"get"
			, parameters:params
			, onComplete:function(){
	 			$("dvWaiting").style.display = "none";
		 		pageTracker._trackPageview("/forms/zoom/" + img );
				}
		}
	);
}

/* Doc opinion */
function setDocOpinion(articleID,rating,lang){
	if (document.cookie){
		var ExpiresOn = new Date();
		ExpiresOn.setTime(ExpiresOn.getTime() + 10000000000);
		document.cookie = "opDocs=" + articleID + GetCookieParam( "opDocs" ) + "; path=/; domain="+window.location.host+"; expires=" + ExpiresOn.toGMTString();

		// buttons ausblenden => kein erneutes voting
		$('one-star').style.visibility= 'hidden';
		$('two-stars').style.visibility= 'hidden';
		$('three-stars').style.visibility= 'hidden';
		$('four-stars').style.visibility= 'hidden';
		$('five-stars').style.visibility= 'hidden';

		var targetContainer = $("voting");
		var url = "/" + mainPath + "/AJAX?OpenAgent&code=1208";
		var pars = new Array();
		pars[0] = "articleID="+articleID;
		pars[1] = "rating="+rating;
		var params = pars.join("&");
		var ajax = new Ajax.Updater(
			targetContainer,
			url,
			{
				  method:"get"
				, parameters:params
				, onComplete:function(){
					window.setTimeout(
						function(){
							$("votingThx").style.visibility= 'hidden';
							pageTracker._trackPageview("/forms/vote/" + articleID );
						}
					, 5000 );
					}
			}
		);
	} else {
		old_msg = $("voting").innerHTML;
		if( lang == "de" ) {
			$("voting").innerHTML = "BITTE AKTIVIEREN SIE COOKIES UM IHRE WERTUNG ABZUGEBEN.";
		} else {
			$("voting").innerHTML = "PLEASE ACTIVATE COOKIES TO RATE ARTICLES.";
		}
		window.setTimeout(
			function(){
				$("voting").innerHTML = old_msg;
			}
			, 5000 );
	}
}



/* AJAX windows */
function waitingScreen(){
	if (window.innerHeight){
		winHeight = parseInt(window.innerHeight);
		winWidth = parseInt(window.innerWidth);
	} else {
		winHeight = parseInt(document.documentElement.clientHeight);
		winWidth = parseInt(document.documentElement.clientWidth);
	}

	if (window.innerHeight){
		posY = window.pageYOffset;
		posX = window.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {
		posY = document.documentElement.scrollTop;
		posX = document.documentElement.scrollLeft;
	} else if (document.body) {
		posY = document.body.scrollTop;
		posX = document.body.scrollLeft;
	}

	winHeight -= 19;
	winWidth -= 220;
	winHeight = (winHeight - (winHeight%2))/2;
	winWidth = (winWidth - (winWidth%2))/2;
	if (winHeight < 10) winHeight = 10;
	if (winWidth < 10) winWidth = 10;
	posY += winHeight;
	posX += winWidth;


	$("dvWaiting").style.left = posX + "px";
	$("dvWaiting").style.top = posY + "px";
	$("dvWaiting").innerHTML = "<img src=\"/benecom/files_p.nsf/Lookup/waiting/$file/waiting.gif\" alt=\"\">";
	$("dvWaiting").style.display = "block";
	
	$("dvCover").style.display = "none";
	setOpacity();
}

function setOpacity() {
	var winHeight = 0;
	if (window.innerHeight)
		winHeight = parseInt(window.innerHeight);
	else
		winHeight = parseInt(document.documentElement.clientHeight);
	var cHeight = parseInt(findPosY($("dvFooter"))) + 40;
	if (cHeight < winHeight)
		cHeight = winHeight;
	$("dvCover").style.height = cHeight + "px";
	$("dvCover").style.display = "block";
	$("dvPopup").style.display = "block";

	window.setTimeout(
		 function(){
		 		 if ( document.getElementsByClassName("input").length > 0 ) {
		 		 	document.getElementsByClassName("input")[0].focus();
		 		 }
		 }, 
		 500
	)
}

function clearOpacity() {
	window.setTimeout
		(
			function()
				{
					$("dvPopup").style.display = "none";
					$("dvCover").style.display = "none";
					$("dvPopup").innerHTML = "";
				},
				500
		);
}






//DropDown.js
var ToggleImage = {

	create: function( imgElement, initialActiveState, activeImagePath, inactiveImagePath ) 
	{
		imgElement = $(imgElement);

		imgElement = Object.extend( imgElement, 
																{
																	srcActive: activeImagePath,
																	srcInactive: inactiveImagePath,
																	
																	setActive: function(active) 
																	{
																		this.src = (active) ? this.srcActive : this.srcInactive;
																	},
																	
																	isActive: function() 
																	{ 
																		return (this.src == this.srcActive); 
																	},
																	
																	toggleActive: function() 
																	{
																		this.setActive( !this.active );
																	}
																}
															);
			
		imgElement.setActive( initialActiveState );
	}
}


var DropDownList = {

	create: function( containerElement, options ) 
	{
		options = options || {};
		containerElement = $(containerElement);
		
		var newOptions = containerElement.options || {};
		newOptions.valueElement = $(options.valueElement) || $(containerElement.id + '.Value');
		newOptions.textElement = $(options.textElement) || $(containerElement.id + '.Text');
		newOptions.listElement = $(options.listElement) || $(containerElement.id + '.List');
		newOptions.toggleImageElement = $(options.toggleImageElement) || $(containerElement.id + '.ToggleImage');
		newOptions.toggleImageActivePath = options.toggleImageActivePath || newOptions.toggleImageActivePath || 'shim.gif';
		newOptions.toggleImageInactivePath = options.toggleImageInactivePath || newOptions.toggleImageInactivePath || 'shim.gif';
		newOptions.positionAbove = options.positionAbove || newOptions.positionAbove || false;
		
		// as a convenience, switch active/inactive src if positionAbove is true and no src are specified
		if (newOptions.positionAbove && (!options.toggleImageActivePath) && (!options.toggleImageInactivePath) )
		{
			var tmpSrc = newOptions.toggleImageActivePath;
			newOptions.toggleImageActivePath = newOptions.toggleImageInactivePath;
			newOptions.toggleImageInactivePath = tmpSrc;
		}
		
		var obj = Object.extend( containerElement, this );
		obj.options = newOptions;
		obj.collapse();
		return obj;
	},
	
	select: function( text, value, collapse )
	{
		this.options.valueElement.value = value;
		this.options.textElement.value = text;
		if (collapse) this.collapse();
	},
	
	expand: function()
	{
		this.options.toggleImageElement.src = this.options.toggleImageActivePath;
	
		this.options.listElement.show();
//		Position.absolutize(this.options.listElement);
		
		var textElementDimensions = this.options.textElement.getDimensions();
		var listElementDimensions = this.options.listElement.getDimensions();

		var pos = Position.positionedOffset(this.options.textElement);

		if (this.options.positionAbove)
			this.options.listElement.style.top = (pos[1] - listElementDimensions.height) + "px";
		else
			this.options.listElement.style.top = (pos[1] + textElementDimensions.height) + "px";
			
		this.options.listElement.style.left = (pos[0]) + "px";
//		this.options.textElement.style.backgroundColor = "#fff";
	},
	
	collapse: function()
	{
		this.options.toggleImageElement.src = this.options.toggleImageInactivePath;	
		this.options.listElement.hide();		
//		this.options.textElement.style.backgroundColor = "#fff";
	},
	
	toggleExpansionState: function()
	{
		if (this.options.listElement.visible())
		{
			this.collapse();
		}
		else
		{
			this.expand();
		}
	}
}

//imgGallery.js
/* gallerie scripts */

picScrollLefton = new Image();
picScrollLefton.src = "/bueromoebel/btnGalleryPreviousR.gif";
picScrollLeftoff = new Image();
picScrollLeftoff.src = "/bueromoebel/btnGalleryPrevious.gif";
picScrollRighton = new Image();
picScrollRighton.src = "/bueromoebel/btnGalleryNextR.gif";
picScrollRightoff = new Image();
picScrollRightoff.src = "/bueromoebel/btnGalleryNext.gif";
var mainHTML = "";
var lastIndexInnerHTML = "";
var lastIndex;

function showGalleryImage(obj, picGallery, docBU){
	if(lastIndexInnerHTML==""){
		lastIndexInnerHTML = $("GalleryThumb0").innerHTML;
	}
	
	if( $(obj).id=="GalleryThumb0" ){
		$("imgSource").innerHTML = mainHTML;
	} else {
		$("imgSource").innerHTML = "<img src=\"" + picGallery + "\" alt=\"" + docBU + "\">";
	}
	
	$("imgCaption").innerHTML = docBU + "&nbsp;"

	if($(lastIndex)==null){
		$("GalleryThumb0").innerHTML = lastIndexInnerHTML;
	} else {
		$(lastIndex).innerHTML = lastIndexInnerHTML;
	}

	lastIndexInnerHTML = $(obj).innerHTML;
	lastIndex = obj;
	
	$(obj).innerHTML = "<img src=\"/benecom/files_p.nsf/Lookup/white/$file/white.gif\" height=\"21\" alt=\"\">"
}


function galleryScrollLeft() {
	var thumbsInnerLeft = $("dvGalleryThumbsInner").offsetLeft;
	var galleryLength = $("GalleryEnd").offsetLeft*-1;

	if ( thumbsInnerLeft > (galleryLength + 200) )
		$("dvGalleryThumbsInner").style.left = (thumbsInnerLeft - 34) + "px";
}


function galleryScrollRight() {
	var thumbsInnerLeft = $("dvGalleryThumbsInner").offsetLeft;
	if ( thumbsInnerLeft < 0 )
		$("dvGalleryThumbsInner").style.left = (thumbsInnerLeft + 34) + "px";
}

function showGalleryPreview (obj, picName, objName) {
	try {
		if (objName != ""){
			$("dvGalleryPreviewPic").innerHTML = "<img class=\"imgPreviewPic\" src=\"/benecom/files_p.nsf/Lookup/previewPlaceholder/$file/previewPlaceholder.gif\" height=\"120\" alt=\"" + objName + "\"><span id=\"spPreviewPic\">" + objName + "</span>";
		} else {
			$("dvGalleryPreviewPic").innerHTML = "<img class=\"imgPreviewPic\" src=\"/benecom/files_p.nsf/Lookup/previewPlaceholder/$file/previewPlaceholder.gif\" height=\"120\" alt=\"\">";
		}
		$("dvGalleryPreviewPic").firstChild.src = picName;
		var divX = findPosX(obj);
		var divY = findPosY(obj);
		var offsetX;
		var offsetY;

		var imgWidth = $("dvGalleryPreviewPic").firstChild.width;
		var imgHeight = $("dvGalleryPreviewPic").firstChild.height;

		// safari liefert andere werte fuer die bildbreite:
		// breite des originalbilds statt breite des gestauchten bildes
		if (safari){
			if (imgHeight > 120 ) {
				imgWidth = imgWidth * 120 / imgHeight;
				imgHeight = 120;
			}
		}

		$("dvGalleryPreviewPic").style.width = imgWidth + "px";
		$("dvGalleryPreviewPic").firstChild.style.left = "0px";
		$("dvGalleryPreviewPic").style.left = "0px";
		
		offsetY = imgHeight + 14;
		offsetX = ( imgWidth - ( imgWidth % 2 ) ) / 2 - 10;
				
		if (ie && navigator.userAgent.indexOf("MSIE 6")!=-1)
			offsetX -= parseInt(galleryDX);

		$("dvGalleryPreview").style.width = (imgWidth+6) + "px";
		$("dvGalleryPreview").style.top = (divY-offsetY) + "px";
		$("dvGalleryPreview").style.left = (divX-offsetX) + "px";
	} catch(ex) {
		// ignore
	}
}

function clearGalleryPreview() {
	$("dvGalleryPreview").style.left = "-5000px";
	$("dvGalleryPreview").style.top = "-2000px";
}


function initGallery(){
	mainHTML = $("imgSource").innerHTML;
	lastIndexInnerHTML = $("GalleryThumb0").innerHTML;
	$("GalleryThumb0").innerHTML = "<img src=\"/benecom/files_p.nsf/Lookup/white/$file/white.gif\" height=\"21\" alt=\"\">";

	var defaultImg = GetParam( "img" );
	if (defaultImg != "" ) {
		var html = $(defaultImg).innerHTML;
		html = html.substring(html.indexOf('src=\"')+5, html.indexOf('>'));
		html = html.substring(0, html.indexOf('\"'));
		showGalleryImage( $(defaultImg), html, '');
	}
}


// relaunch 09 functions.js
function OpenCloseSidebarBox (obj){
	obj_li = obj.parentNode; //set obj_li to li parent element
	if ($(obj).hasClassName('close')) {
		Effect.SlideDown($(obj_li).down("div"), { duration: 0.5 });
		$(obj).removeClassName('close');
		$(obj).addClassName('open');
	} else {
		Effect.SlideUp($(obj_li).down("div"), { duration: 0.5 });
		$(obj).removeClassName('open');
		$(obj).addClassName('close');
	}

	return false;
}

function close_themenundlinks_window () {
	counter=counter+1;
	timer=setTimeout("close_themenundlinks_window()",300);
	if (counter==10) {
		var obj_parent=document.getElementById("themenundlinks");
		if ($(obj_parent)!=null) {
			Effect.SlideUp($(obj_parent).down("div"), { duration: 0.5 });
			$(obj_parent).down("h4").removeClassName('open');
			$(obj_parent).down("h4").addClassName('close');
		}
		clearTimeout(timer);
		counter=0;
	}
}


function OpenCloseInvestorBox (obj) {
	obj_li = obj.parentNode;
	if ($(obj_li).down("span").hasClassName('close')) {
		Effect.SlideUp('investor_slidup', { duration: 0.5 });
		$(obj_li).down("span").removeClassName('close');
		$(obj_li).down("span").addClassName('open');
	} else {
		Effect.SlideDown('investor_slidup', { duration: 0.5 });
		$(obj_li).down("span").removeClassName('open');
		$(obj_li).down("span").addClassName('close');
	}
	return false;
}


function close_relations_window () {
	counter=counter+1;
	timer=setTimeout("close_relations_window()",300);
	if (counter==14) {
		var obj_parent=document.getElementById("dvNews");
		if ($(obj_parent)!=null) {
				Effect.SlideUp('investor_slidup', { duration: 0.5 });
				$(obj_parent).down("span").removeClassName('close');
				$(obj_parent).down("span").addClassName('open');
		}
	clearTimeout(timer);
	counter=0;
	}
}


/*Prototype Navi Function*/
function opennav (obj) {
	obj_li = obj.parentNode; //set obj_li to li parent element
	if ($(obj_li).hasClassName('active')) {
		$(obj_li).removeClassName('active')
	} else {
		$(obj_li).addClassName('active');
	}
	if ($(obj).readAttribute('href')=="#") {
		return false;
	} //not working with prototype!?
}


function start() { 
	/*Start close_relations_window*/
	counter = 0;
	close_relations_window();
	close_themenundlinks_window();
} 
 
window.onload = start; 