// dhtmllib js

// (c) by eskatoo
// no copy parts nor illegal use of any kind allowed

//Default browsercheck, added to all scripts!
function LIBcheckBrowser(){
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera 5")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6||this.ie7
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie7||this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
  return this
}
window.LIBbw=new LIBcheckBrowser()
window.browser=new LIBcheckBrowser();
//Default browsercheck, added to all scripts end

// getPostedParameter start (dr) v1.1 000515
function getPostedParameter( what ){
	var param = document.location.search
	var start = 1
	what = what + "="	
	var paramLC = param.toLowerCase()
	var whatLC = what.toLowerCase()	
	start = ( paramLC.indexOf( whatLC ) != -1 ? paramLC.indexOf( whatLC ) : paramLC.length ) + what.length
	var end = ( paramLC.indexOf( "&", start ) != -1 ? paramLC.indexOf( "&", start ) : paramLC.length )
	param = param.substring( start , end )
	return unescape(param)
}
// getPostedParameter ende

// for debugging
function objectProperties(Objekt, ObjName){
	var Ergebnis = "";
	for (var Eigenschaft in Objekt){
		Ergebnis += (ObjName?ObjName+".":"") + Eigenschaft + " = " + Objekt[Eigenschaft] + "     -     ";
	}
	return Ergebnis;
}
// for debugging end

// fixed ns resize problem
var origWidth; 
var origHeight; 
if (LIBcheckBrowser().ns4) { 
window.onresize = ReloadThisPage;
origWidth  = window.innerWidth;
origHeight = window.innerHeight; 
}
function ReloadThisPage(){ 
	if (origWidth == window.innerWidth && origHeight == window.innerHeight)return;
	window.history.go(0);
}
// fixed ns resize problem end

// openWindow start (dr-010223)
function openWindow( url, winname, width, height, left, top, switches){
	function openWindowUtility( attribute ){ return ","+attribute+"="+(switches.indexOf(attribute)>-1?"yes":"no") }
	var attributes = (width?",width="+width:"")+ (height?",height="+height:"")+ (left?",left="+left:"")+ (top?",top="+top:"")+		
		openWindowUtility("toolbar")+openWindowUtility("directories")+openWindowUtility("status")+openWindowUtility("scrollbars")+
		openWindowUtility("resizable")+openWindowUtility("menubar")+openWindowUtility("location")
	return window.open( url, (winname?winname:"_blank"), attributes);
}
// openWindow end

//-----------------------------------------------------------------------------
// dhtmllib Layer handling
//-----------------------------------------------------------------------------
function createDHTMLObjects(){ // ns4 frameset problem
	if (typeof window.LIBbw == "undefined") window.LIBbw = new LIBcheckBrowser()
}
//-----------------------------------------------------------------------------
// Layer visibility.
//-----------------------------------------------------------------------------

function hideLayer(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.visibility = "hide";
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.visibility = "hidden";
}

function showLayer(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.visibility = "show";
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.visibility = "visible";
}

function inheritLayer(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.visibility = "inherit";
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.visibility = "inherit";
}

function getVisibility(layer) {

  if (window.LIBbw.ns4) {
    if (layer.visibility == "show")
      return "visible";
    if (layer.visibility == "hide")
      return "hidden";
    return layer.visibility;
  }
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return layer.style.visibility;
  return "";
}

//-----------------------------------------------------------------------------
// Layer positioning.
//-----------------------------------------------------------------------------

function moveLayerTo(layer, x, y) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.moveTo(x, y);
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    layer.style.left = x;
    layer.style.top  = y;
  }
}
function moveLayerBy(layer, dx, dy) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.moveBy(dx, dy);
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    layer.style.pixelLeft += dx;
    layer.style.pixelTop  += dy;
  }
}

function getLeft(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.left;
  if (window.LIBbw.ns6)
    return layer.offsetLeft;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7)
    return layer.style.pixelLeft;
  return -1;
}

function getTop(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.pageY;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return layer.offsetTop;
  return -1;
}

function getRight(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.left + getWidth(layer);
  if (window.LIBbw.ns6)
    return layer.offsetLeft + getWidth(layer);
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7)
    return layer.style.pixelLeft + getWidth(layer);
  return -1;
}

function getBottom(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.top + getHeight(layer);
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return layer.offsetTop + getHeight(layer);
  return -1;
}

function getPageLeft(layer) {
  var x;
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.pageX;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    x = 0;
    while (layer.offsetParent != null) {
      x += layer.offsetLeft;
      layer = layer.offsetParent;
    }
    x += layer.offsetLeft;
    return x;
  }
  return -1;
}

function getPageTop(layer) {
  var y;
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.pageY;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    y = 0;
    while (layer.offsetParent != null) {
      y += layer.offsetTop;
      layer = layer.offsetParent;
    }
    y += layer.offsetTop;
    return y;
  }
  return -1;
}

function getWidth(layer) {

  if (window.LIBbw.ns4) {
    if (layer.document.width)
      return layer.document.width;
    else
      return layer.clip.right - layer.clip.left;
  }
  if (window.LIBbw.ns6)
  	return layer.offsetWidth;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7) {
    if (layer.style.pixelWidth)
      return layer.style.pixelWidth;
    else
      return layer.clientWidth;
  }
  return -1;
}

function getHeight(layer) {

  if (window.LIBbw.ns4) {
    if (layer.document.height)
      return layer.document.height;
    else
      return layer.clip.bottom - layer.clip.top;
  }
  if (window.LIBbw.ns6)
  	return layer.offsetHeight;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7) {
    if (layer.style.pixelHeight)
      return layer.style.pixelHeight;
    else
      return layer.clientHeight;
  }
  return -1;
}

function getzIndex(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.zIndex;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return layer.style.zIndex;

  return -1;
}

function setzIndex(layer, z) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.zIndex = z;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.zIndex = z;
}

//-----------------------------------------------------------------------------
// Layer clipping.
//-----------------------------------------------------------------------------

function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {

  if (window.LIBbw.ns4) {
    layer.clip.left   = clipleft;
    layer.clip.top    = cliptop;
    layer.clip.right  = clipright;
    layer.clip.bottom = clipbottom;
  }
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';
}

function getClipLeft(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.clip.left;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    var str =  layer.style.clip;
    if (!str)
      return 0;
    var clip = getIEClipValues(layer.style.clip);
    return(clip[3]);
  }
  return -1;
}

function getClipTop(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.clip.top;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    var str =  layer.style.clip;
    if (!str)
      return 0;
    var clip = getIEClipValues(layer.style.clip);
    return clip[0];
  }
  return -1;
}

function getClipRight(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.clip.right;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    var str =  layer.style.clip;
    if (!str)
      return layer.style.pixelWidth;
    var clip = getIEClipValues(layer.style.clip);
    return clip[1];
  }
  return -1;
}

function getClipBottom(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.clip.bottom;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    var str =  layer.style.clip;
    if (!str)
      return layer.style.pixelHeight;
    var clip = getIEClipValues(layer.style.clip);
    return clip[2];
  }
  return -1;
}

function getClipWidth(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.clip.width;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    var str = layer.style.clip;
    if (!str)
      return layer.style.pixelWidth;
    var clip = getIEClipValues(layer.style.clip);
    return clip[1] - clip[3];
  }
  return -1;
}

function getClipHeight(layer) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return layer.clip.height;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    var str =  layer.style.clip;
    if (!str)
      return layer.style.pixelHeight;
    var clip = getIEClipValues(layer.style.clip);
    return clip[2] - clip[0];
  }
  return -1;
}

function getIEClipValues(str) {

  var clip = new Array();
  var i;

  // Parse out the clipping values for IE layers.

  i = str.indexOf("(");
  clip[0] = parseInt(str.substring(i + 1, str.length), 10);
  i = str.indexOf(" ", i + 1);
  clip[1] = parseInt(str.substring(i + 1, str.length), 10);
  i = str.indexOf(" ", i + 1);
  clip[2] = parseInt(str.substring(i + 1, str.length), 10);
  i = str.indexOf(" ", i + 1);
  clip[3] = parseInt(str.substring(i + 1, str.length), 10);
  return clip;
}

//-----------------------------------------------------------------------------
// Layer scrolling.
//-----------------------------------------------------------------------------

function scrollLayerTo(layer, x, y, bound) {

  var dx = getClipLeft(layer) - x;
  var dy = getClipTop(layer) - y;

  scrollLayerBy(layer, -dx, -dy, bound);
}

function scrollLayerBy(layer, dx, dy, bound) {

  var cl = getClipLeft(layer);
  var ct = getClipTop(layer);
  var cr = getClipRight(layer);
  var cb = getClipBottom(layer);

  if (bound) {
    if (cl + dx < 0)
      dx = -cl;
    else if (cr + dx > getWidth(layer))
      dx = getWidth(layer) - cr;
    if (ct + dy < 0)
      dy = -ct;
    else if (cb + dy > getHeight(layer))
      dy = getHeight(layer) - cb;
  }
  clipLayer(layer, cl + dx, ct + dy, cr + dx, cb + dy);
  moveLayerBy(layer, -dx, -dy);
}

//-----------------------------------------------------------------------------
// Layer background.
//-----------------------------------------------------------------------------

function setBgColor(layer, color) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.bgColor = color;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.backgroundColor = color;
}

function setBgImage(layer, src) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    layer.background.src = src;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    layer.style.backgroundImage = "url(" + src + ")";
}

//-----------------------------------------------------------------------------
// Layer utilities.
//-----------------------------------------------------------------------------

function getLayer(name) {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return findLayer(name, document);
  if (window.LIBbw.ns6)
	return document.getElementById( name );
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return document.all[name];
  return null;
}

function findLayer(name, doc) {

  var i, layer;
  for (i = 0; i < doc.layers.length; i++) {
    layer = doc.layers[i];
    if (layer.name == name)
      return layer;
    if (layer.document.layers.length > 0)
      if ((layer = findLayer(name, layer.document)) != null)
        return layer;
  }
  return null;
}

//-----------------------------------------------------------------------------
// Image utilities.
//-----------------------------------------------------------------------------

function getImage(name) {

  if (window.LIBbw.ns4) {
    return findImage(name, document);
  }
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {

  var i, img;

  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {
  var x, obj;

  if (window.LIBbw.ns4) {
    if (img.container != null)
      return img.container.pageX + img.x;
    else
      return img.x;
  }
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  return -1;
}

function getImagePageTop(img) {
  var y, obj;

  if (window.LIBbw.ns4) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}

//-----------------------------------------------------------------------------
// Window and page properties.
//-----------------------------------------------------------------------------

function getWindowWidth() {
  createDHTMLObjects()
  if (window.LIBbw.ns4 || window.LIBbw.ns6)
    return window.innerWidth;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7)
    return document.body.clientWidth;
  return -1;
}

function getWindowHeight() {
  createDHTMLObjects()
  if (window.LIBbw.ns4 || window.LIBbw.ns6)
    return window.innerHeight;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7)
    return document.body.clientHeight;
  return -1;
}

function getPageWidth() {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return document.width;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return document.body.scrollWidth;
  return -1;
}

function getPageHeight() {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return document.height;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return document.body.scrollHeight;
  return -1;
}

function getPageScrollX() {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return window.pageXOffset;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return document.body.scrollLeft;
  return -1;
}

function getPageScrollY() {
  createDHTMLObjects()
  if (window.LIBbw.ns4)
    return window.pageYOffset;
  if (window.LIBbw.ie4 || window.LIBbw.ie5 || window.LIBbw.ie6 || window.LIBbw.ie7 || window.LIBbw.ns6)
    return document.body.scrollTop;
  return -1;
}


// LIBHL - LIB HighLighting
// a better highlighting script 010827(dr)
// (c) by eskatoo
// no copy parts nor illegal use of any kind allowed

// compensating bugs
// #1: setting "global" vars - NS4 frame bug
window.debug=0
function LIBHLtype( type, suffix ){
	if (!this.types){
		this.types = new Array()
		this.typessuffix = new Array()
	}
	this.addtype = LIBHLaddtype
	this.addtype( "standard", "" )
}
function LIBHLaddtype( type, suffix ){
	var size = this.types.length; 
	this.types[size] = type
	this.typessuffix[size] = suffix
	this.length = size+1
	this.getType = LIBHLgetType
	this.getTypeSuffix = LIBHLgetTypeSuffix
}
function LIBHLgetType( pos ){ return ((this.types[ pos ])?this.types[ pos ]:"") }
function LIBHLgetTypeSuffix( pos ){ return ((this.typessuffix[ pos ])?this.typessuffix[ pos ]:"") }

function LIBHLloadAllImages( doc, types, gruppen, names ){ // #1
	if (!document.images) return
	if (typeof window.LIBHLimages == "undefined") window.LIBHLimages = new Array()
	for (var i=0; i < doc.images.length; i++){
		pic = doc.images[i]
		if (!names) names = ""
		if (pic.name && pic.name.indexOf(names) != -1 && !window.LIBHLimages[pic.name]){
			// gruppen status - noch zu implementieren
			window.LIBHLimages[pic.name] = new LIBHLpicture( pic, types )
		}
	}
	// rekursion
	if (LIBcheckBrowser().ns4){ for (var i = 0; i < doc.layers.length; i++){ if (typeof doc.layers[i].document != "undefined") LIBHLloadAllImages( doc.layers[i].document, types, gruppen, names ); }}
}
function LIBHLpreloadpicture( masterobj, type, typesuffix ){
	var image = new Image(); image.src = masterobj.image_path + masterobj.image_filename + typesuffix + "." + masterobj.image_suffix; 
	return image
}
function LIBHLpicture( objref, types ){ // Normal Highlight Status		
	this.object = objref
	this.name = this.object.name
	this.src = this.object.src
	this.image_path = this.src.substring( 0, this.src.lastIndexOf("/") + 1 )
	this.image_filename = this.src.substring( this.src.lastIndexOf("/") + 1 , this.src.lastIndexOf(".") )
	this.image_suffix = this.src.substring( this.src.lastIndexOf(".") + 1, this.src.length )
	this.original_state = "standard"
	this.state = "standard"

	this.images = new Array()
	this.additional = new Array()
	this.additionalchangeto = new Array()
	this.loadedPics=this.name+":\n"
	for( var i=0; i < types.length; i++){
		this.images[types.getType(i)] = new LIBHLpreloadpicture( this, types.getType(i), types.getTypeSuffix(i) )
		this.loadedPics+= types.getType(i)+", "+types.getTypeSuffix(i)+"\n"
	}	
	if (typeof debug != "undefined" && debug) alert(this.loadedPics)
	this.changeTo = LIBHLchangeTo
	this.reset = LIBHLreset
}
function LIBHLreset(){ this.changeTo( this.original_state ); }
function LIBHLchangeTo( what ){ 
	if (!this.images[ what ]){ if (typeof debug != "undefined" && debug) alert( "Warning: Image '" + this.name + "' has no state '" + what + "'!"); return; }
	this.object.src = this.images[ what ].src; this.state = what;
}
// public 
function LIBHLisLoaded( name ){ 
	return ( typeof window.LIBHLimages != "undefined" && typeof window.LIBHLimages[name] != "undefined")?true:false;  
}
function LIBHLImageToState( name, state ){ 
	if (!LIBHLisLoaded( name )) return; 
	window.LIBHLimages[name].changeTo(state); 
}
function LIBHLImageResetState( name ){ 
	if (!LIBHLisLoaded( name )) return; 
	window.LIBHLimages[name].reset(); 
}
function ImageState( name, state ){ LIBHLImageToState( name, state ) }
// aus kompatiblitätsgründen
function highlight( name ){	
	if (window.LIBHLhighlighted != name) 
		LIBHLImageToState( name, "high"); 
}
function lowlight( name ){ 	
	if (window.LIBHLhighlighted != name) 
		LIBHLImageToState( name, "norm"); 
}
function pressed( name ){
	if (window.LIBHLhighlighted) 
	
	LIBHLImageResetState(window.LIBHLhighlighted)
	LIBHLImageToState( name, "stat");
	window.LIBHLhighlighted = name
}
// LIBHL - LIB HighLighting end
// Funktionen für Layer Winbloc Startseite begin

var allLoaded = false
var ns, ie, w3c;

if(document.layers) {
        layerRef = document.layers;
        layerStyleRef = "document.";
        styleSwitch = "";
        ns = true;
} else if(document.all){
        layerRef = document.all;
        layerStyleRef = "document.all.";
        styleSwitch = ".style";
        ie = true;
} else if(document.documentElement){
        layerRef = document.documentElement;
        layerStyleRef = "document.getElementById('";
        styleSwitch = "').style";
        w3c = true;
}

/////////////////////////////////////////////////////////// Layermethoden
function show(layerName){ eval(layerStyleRef + layerName + styleSwitch + '.visibility="visible"') }
function hide(layerName){ eval(layerStyleRef + layerName + styleSwitch + '.visibility="hidden"')  }
function showTwo(layerName1, layerName2){
	eval(layerStyleRef + layerName1 + styleSwitch + '.visibility="visible"')
	eval(layerStyleRef + layerName2 + styleSwitch + '.visibility="visible"')
}
function hideTwo(layerName1, layerName2){
	eval(layerStyleRef + layerName1 + styleSwitch + '.visibility="hidden"')
	eval(layerStyleRef + layerName2 + styleSwitch + '.visibility="hidden"')
}
// Funktionen für Layer Winbloc Startseite end

// öffnen der Kontaktpopups begin
function openContactPopup( url ){    
	contactPopup = window.open(url,'contactPopup','width=580,height=650,locationbar=no,menubar=no,status=no,scrollbars=yes,ScreenX=10,ScreenY=10,left=10,top=10'); 
	contactPopup.focus();
}
// öffnen der Kontaktpopups end

// öffnen der downloadpopups begin
function openDownloadPopupDE(){ openDownloadPopup("de") }
function openDownloadPopupEN(){ openDownloadPopup("en") }
function openDownloadPopup( language ){
	var url = "https://wss.moeller.net/"+language+"/popups/product_upgrade/formular.jsp"
	contactPopup = window.open(url,'downloadPopup','width=580,height=650,locationbar=no,menubar=no,status=no,scrollbars=yes,resizable=yes,ScreenX=10,ScreenY=10,left=10,top=10'); 
	contactPopup.focus();
}
// öffnen der downloadpopups end
function openWindow( url, width, height, left, top, winname ) {
	var trails = "width=" + width + ",height=" + height + ",left=" + left +",top=" + top +",toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no";
	newWindow = window.open( url, winname, trails);
}
// industry
  function wopen(img,winX,breite,hoehe) {
   win1 = window.open(img,winX,"scrollbars=no,width="+breite+",height="+hoehe);
  }
//Funktionen für Xion begin
function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
}

function showHideLayers() {
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//Funktionen für Xion end
// systems proloe begin Funktionen für Text-Layer-Highlighting in proloe-start
var okIe = ( document.all );
var okNs = ( document.layers );

var layerSty="";
var layerRef="";
var	styleSwt="";

if( okNs ) {
	layerSty="layer.";
	layerRef="document.layers";
	styleSwt="";
} else if ( okIe ) {
	layerSty="layer.style.";
	layerRef="document.all";
	styleSwt=".style";
}

var okVer4 = ( layerSty != "" );
var modi = new Array();
modi[0] = "hidden";
modi[1] = "visible";

function txtOver( style, stat )  {
	if( okVer4 ) {
		eval( layerRef + '["txt' + style + '"]' + styleSwt + '.visibility="' + modi[stat] + '"' );
	}
}


// Funktion a_href fuer startseiten de un den. wird von selectboxen benutzt, um links zu oeffnen.
//020618(rm) Extended for loading target content in named window (default remains '_blank')
function a_href() {
  if (document.main) {
    Formular = document.main.document.moeller_sites;
  } else {
    Formular = document.moeller_sites;
  }
  linkauswahl = Formular.auswahl.options.selectedIndex;
  ausgewaehlterLink = Formular.auswahl.options[linkauswahl].value;

  var targetString = "_blank"
  
  if(ausgewaehlterLink.indexOf("|")!=-1){
  		targetString = ausgewaehlterLink.substring(ausgewaehlterLink.indexOf("|") + 1,ausgewaehlterLink.length)
		ausgewaehlterLink = ausgewaehlterLink.substring(0,ausgewaehlterLink.indexOf("|"))
  }
  
  if (ausgewaehlterLink != "-1") {
    open(ausgewaehlterLink, targetString);
  }
  Formular.reset();
}
//Bereich Company/Training
function createBestellung(pSeminar) {
	top.location.href = "buchen.jsp?seminar=" + escape(pSeminar);
}

//Bereich Newsletter
function openNewsletter(chooseLanguage){
	var language = "de";
	if (chooseLanguage == "en" || chooseLanguage == "e") language = "en";
	var newsletterPopup =
window.open('https://wss.moeller.net/'+language+'/newsletter/subscribe.jsp','newsletterPopup','width=600,height=650,locationbar=no,menubar=yes,status=yes,resizable=no,scrollbars=yes,ScreenX=10,ScreenY=10,left=10,top=10');
	newsletterPopup.focus();
}
function openNewsletterRegister(chooseLanguage){
	var language = "de";
	if (chooseLanguage == "en" || chooseLanguage == "e") language = "en";
	var newsletterPopup = window.open('https://wss.moeller.net/'+language+'/newsletter/register.jsp','newsletterPopup','width=600,height=650,locationbar=no,menubar=yes,status=yes,resizable=no,scrollbars=yes,ScreenX=10,ScreenY=10,left=10,top=10');
	newsletterPopup.focus();
}
function openNewsletterDeregister(chooseLanguage){
	var language = "de";
	if (chooseLanguage == "en" || chooseLanguage == "e") language = "en";
	var newsletterPopup = window.open('https://wss.moeller.net/'+language+'/newsletter/deregister.jsp','newsletterPopup','width=600,height=650,locationbar=no,menubar=yes,status=yes,resizable=no,scrollbars=yes,ScreenX=10,ScreenY=10,left=10,top=10');
	newsletterPopup.focus();
}
/// end dhtmllib js
