window.undefined; // [DE] MSIE 5.x kennt die globale variable "undefined" nicht; // [EN] in MSIE 5.x the global variable "undefined" doesn't exist;

// [DE] typen-ermittlung;
// [EN] type detection;
this.isUndefined = function(obj) {return(typeof(obj)=="undefined");};
this.isNull = function(obj) {return((typeof(obj)=="object")&&(obj===null));};
this.isNative = function(obj) {return(!isUndefined(obj)&&!isNull(obj)&&(typeof(obj.constructor)=="function"));}; // [EN] returns true for every ECMA-object that is this global functions argument;
this.isAlien = function(obj) {return(isObject(obj)&&(typeof(obj.constructor)!="function"));}; // [EN] return values depend on browser implementation - for instance in MSIE any DOM-node is an alien so far since such an object does not support the "constructor"-property (and of course the type of an objects constructor always has to be "function");
this.isNode = function(obj) {var isnode=false;if(obj&&((typeof obj.cloneNode=="function")||((typeof obj.cloneNode=="object")&&(!!obj.cloneNode)))){var node=obj.cloneNode(true),docRoot=(document.documentElement||document.getElementsByTagName("html")[0]||document);while(obj&&!isnode&&docRoot){isnode=((obj==docRoot)||(obj==document));obj=obj.parentNode;}if(!isnode){isnode=((typeof node.attributes=="object")&&(typeof node.childNodes=="object")&&(typeof node.firstChild=="object")&&(typeof node.lastChild=="object")&&(typeof node.nextSibling=="object")&&(typeof node.nodeName=="string")&&((typeof node.nodeType=="number")&&(node.nodeType>=1)&&(node.nodeType<=12))&&(typeof node.nodeValue=="object")&&(typeof node.parentNode=="object")&&(typeof node.previousSibling=="object"));}}return isnode;}; // [EN] applies to (x)html/xml-node-objects with a w3c-DOM- as well as an ECMAScript-conform implementation;
this.isBoolean = function(obj) {return(isNative(obj)&&(obj.constructor==Boolean));};
this.isNumber = function(obj) {return(isNative(obj)&&(obj.constructor==Number)&&isFinite(obj));};
this.isString = function(obj) {return(isNative(obj)&&(obj.constructor==String));};
this.isPrimitive = function(obj) {return(isString(obj)||isNumber(obj)||isBoolean(obj));}; // [EN] returns true in case of any of the ECMA-objects "Boolean", "Number" and "String" is this global functions argument;
this.isObject = function(obj) {return(!isUndefined(obj)&&!isNull(obj)&&!isPrimitive(obj));}; // [EN] returns true in case of any of the ECMA-objects "Date", "Error", "RegExp", "Function", "Array" and "Object", an object generated by a self-defined constructor function or a clients DOM-object is this global functions argument;
this.isDate = function(obj) {return(isNative(obj)&&(obj.constructor==Date));};
this.isError = function(obj) {return(isNative(obj)&&(obj.constructor==Error));};
this.isRegExp = function(obj) {return(isNative(obj)&&(obj.constructor==RegExp));};
this.isFunction = function(obj) {return(isNative(obj)&&(obj.constructor==Function));};
this.isArray = function(obj) {return(isNative(obj)&&(obj.constructor==Array));};
this.isObjectObject = function(obj) {return(isNative(obj)&&!isNode(obj)&&(obj.constructor==Object));}; // [EN] returns true in case the objects constructor exclusively is the global object "Object";
this.isConstructedObject = function(obj) {return(isNative(obj)&&!isNode(obj)&&(obj.constructor!=String)&&(obj.constructor!=Number)&&(obj.constructor!=Boolean)&&(obj.constructor!=Object)&&(obj.constructor!=Array)&&(obj.constructor!=Function)&&(obj.constructor!=RegExp)&&(obj.constructor!=Error)&&(obj.constructor!=Date));}; // [EN] returns true in case the objects constructor exclusively is a self defined constructor function;


// [DE] ermoeglicht einem js-"DHTMLObject" die referenzierung auf sich selbst aus dem HTML-DOM heraus;
// [EN] enables a js-"DHTMLObject" to backreference to itself from within its coresponding HTML-DOM;
Object.selfReferences = [];
Object.selfReferences.isFragmented = function() {var i,fragmented=false;for(i=0;i<Object.selfReferences.length;i++){if((!isNative(Object.selfReferences[i]))||(!isNumber(Object.selfReferences[i].selfIndex))){fragmented=true;break;}}return fragmented;};
Object.selfReferences.defragment = function() {var i,k,fctIsFrag=Object.selfReferences.isFragmented,fctDefrag=Object.selfReferences.defragment;for(i=0;i<Object.selfReferences.length;i++){if((!isNative(Object.selfReferences[i]))||(!isNumber(Object.selfReferences[i].selfIndex))){if(i===0){Object.selfReferences=Object.selfReferences.slice(1,Object.selfReferences.length);}else if(i==(Object.selfReferences.length-1)){Object.selfReferences=Object.selfReferences.slice(0,(Object.selfReferences.length-1));}else{Object.selfReferences=Object.selfReferences.slice(0,i).concat(Object.selfReferences.slice((i+1),Object.selfReferences.length));}for(k=i;k<Object.selfReferences.length;k++){if((isNative(Object.selfReferences[k]))&&(isNumber(Object.selfReferences[k].selfIndex))){Object.selfReferences[k].selfIndex=k;}}i--;}}if(!isFunction(Object.selfReferences.isFragmented)){Object.selfReferences.isFragmented=fctIsFrag;}if(!isFunction(Object.selfReferences.defragment)){Object.selfReferences.defragment=fctDefrag;}};
Object.prototype.setSelfReference = function() {if(isUndefined(this.selfIndex)){this.selfIndex=Object.selfReferences.length;Object.selfReferences[this.selfIndex]=this;}else if(!isNumber(this.selfIndex)){Object.selfReferences.defragment();this.selfIndex=Object.selfReferences.length;Object.selfReferences[this.selfIndex]=this;}};
Object.prototype.getSelfReference = function() {if(isNumber(this.selfIndex)){return("Object.selfReferences["+this.selfIndex+"]");}else{Object.selfReferences.defragment();return null;}};
Object.prototype.removeSelfReference = function() {this.selfIndex=null;Object.selfReferences.defragment();delete this.selfIndex;};


// [DE] erweiterte array-methoden;
// [EN] extended array-methods;
Array.prototype.contains = function(obj) {var i,listed=false;for(i=0;i<this.length;i++){if(this[i]===obj){listed=true;break;}}return listed;};

Array.prototype.normalize = function() {var arr=this,i=0,k=0;while(i<arr.length){k=i+1;while(k<arr.length){if(arr[i]===arr[k]){arr=arr.slice(0,k).concat(arr.slice(k+1,arr.length));k--;}k++;}i++;}for(i=0;i<arr.length;i++){this[i]=arr[i];}this.length=arr.length;};
Array.prototype.getNormalized = function() {var arr=this,i=0,k=0;while(i<arr.length){k=i+1;while(k<arr.length){if(arr[i]===arr[k]){arr=arr.slice(0,k).concat(arr.slice(k+1,arr.length));k--;}k++;}i++;}return arr;};


// [DE] konvertierung von Number- und String- objekten;
// [EN] converting Numbers and Strings;
//
  Number.prototype.round = function() {var numberValue=this;if(!isNaN(numberValue)){if((arguments.length>=1)&&(!isNaN(parseFloat(arguments[0])))){var decimalPlaces=Math.round(parseFloat(arguments[0]));numberValue=((decimalPlaces>=1)?(Math.round(numberValue*Math.pow(10,decimalPlaces))/Math.pow(10,decimalPlaces)):(Math.round(numberValue)));}else{numberValue=Math.round(numberValue);}}return numberValue;};
  String.prototype.round = function() {var numberValue=parseFloat(this).round((arguments.length>=1)?(arguments[0]):(""));return((isNaN(numberValue))?(numberValue):(numberValue.toString()));};
//String.prototype.round = function() {var numberValue=Number.prototype.round.apply(parseFloat(this),arguments);return((isNaN(numberValue))?(numberValue):(numberValue.toString()));};
//"Function.apply": implemented in nnav 4.06++, msie 5.5++;  also proofed for opera 7.22/windows;
// [DE] wird auf Numbers oder Strings angewandt - liefert einen gerundeten zahlenwert im selben typ (number oder string) zurueck oder aber NaN - erwartet einen ganzzahligen parameter, der die anzahl der nachkommastellen enthaelt, auf die es zu runden gilt - bei anderen parametern oder ohne jegliche angabe verhaelt sich die methode wie "Math.round()";
// [EN] is to be used with both Numbers/Strings - returns the roundet value of a "number" transforming it into the calling-type or returns NaN - accepts a parameter of type integer that represents the number of decimal places that will be rounded to       - with other parameters or without any specification the method behaves like "Math.round()";
  Number.prototype.fixedDigits = function() {var content=this;if(!isNaN(content)){var separatorFlag="comma",decimalPlaces=-1,commaSymbol="",blockSymbol="",i;for(i=0;i<arguments.length;i++){if(arguments[i].constructor==Number){decimalPlaces=Math.round(arguments[i]);}else if(arguments[i].constructor==String){if(separatorFlag=="comma"){commaSymbol=arguments[i];}else if(separatorFlag=="block"){blockSymbol=arguments[i];}separatorFlag=((separatorFlag=="block")?("comma"):((separatorFlag=="comma")?("block"):("comma")));}}if(decimalPlaces<0){decimalPlaces=((content.toString().indexOf(".")>=0)?((content.toString().split("."))[1].length):(0));}if(commaSymbol===""){commaSymbol=".";}content=((decimalPlaces>=1)?(Math.round(content*Math.pow(10,decimalPlaces))/Math.pow(10,decimalPlaces)):(Math.round(content))).toString();if(decimalPlaces>=1){content=content.split(".");}else{content=new Array(content);commaSymbol="";}content[content.length]="";var blockCounter=0;for(i=content[0].length-1;i>=0;i--){content[content.length-1]=content[0].charAt(i)+content[content.length-1];blockCounter++;if(blockCounter==3){blockCounter=0;content[content.length-1]=blockSymbol+content[content.length-1];}}content[0]=content[content.length-1];content.length=content.length-1;if(content.length==1){content[1]="";}for(i=content[1].length;i<decimalPlaces;i++){content[1]+="0";}content=new String(content[0]+commaSymbol+content[1]);if(content.charAt(0)==blockSymbol){content=content.substring(1);}}return content;};
  String.prototype.fixedDigits = function() {var content=parseFloat(this);if(!isNaN(content)){var separatorFlag="comma",decimalPlaces=-1,commaSymbol="",blockSymbol="",i;for(i=0;i<arguments.length;i++){if(arguments[i].constructor==Number){decimalPlaces=Math.round(arguments[i]);}else if(arguments[i].constructor==String){if(separatorFlag=="comma"){commaSymbol=arguments[i];}else if(separatorFlag=="block"){blockSymbol=arguments[i];}separatorFlag=((separatorFlag=="block")?("comma"):((separatorFlag=="comma")?("block"):("comma")));}}content=content.fixedDigits(decimalPlaces,commaSymbol,blockSymbol);}return content;};
//String.prototype.fixedDigits = function() {return Number.prototype.fixedDigits.apply(parseFloat(this),arguments);};
//"Function.apply": implemented in nnav 4.06++, msie 5.5++;  also proofed for opera 7.22/windows;
// [DE] wird auf Numbers oder Strings angewandt - liefert immer einen als string formatierten zahlenwert oder aber NaN zurueck - akzeptiert kombinationen aus bis zu maximal 3 parametern: ein parameter vom typ integer wird immer als anzahl der erzwungenen nachkommastellen (z.b.:586.0100) interpretiert / der erste string-parameter (der vorletzte bei mehreren string-parametern) wird bei der formatierung als komma verwendet                 / der zweite string-parameter (der letzte bei mehr als 2 string-parametern) wird als trennzeichen fuer die visuelle teilung der zahl in tausender-bloecke genutzt             - fehlt das argument vom typ number, werden alle nachkommastellen uebernommen;
// [EN] is to be used with both Numbers/Strings - returns always a string that represents a formatted number  or  returns NaN  - accepts combinations of 3 or less parameters            : a integer type parameter always gets interpreted as amount of forced decimal places (e.g.: 586.0100)               / the first string type parameter (the next to last if there are more string parameters) gets used as comma within the formatting process / the second string type parameter (the last one if there are more then 2 string parameters) gets used as separator while dividing the number visually in blocks of thousends - if the number type argument is missing all decimal places behind the comma are accepted;
  String.prototype.forceNumber = function(commaSeparator) {var content=this;if((typeof commaSeparator=="string")&&((commaSeparator==".")||(commaSeparator==","))){content=content.split(commaSeparator);}else{var posDot=content.lastIndexOf(".");var posComma=content.lastIndexOf(",");if((posDot>=0)||(posComma>=0)){if((content.split(".").length==2)&&(content.split(",").length==2)){content=content.split((posDot>posComma)?("."):(","));}else if((content.split(".").length==2)&&(content.split(",").length!=2)){content=content.split(".");}else if((content.split(".").length!=2)&&(content.split(",").length==2)){content=content.split(",");}else{content=new Array(content);}}else{content=new Array(content);}}var regX=/\d+/g;var regXMatch,i,k;for(i=0;i<content.length;i++){regXMatch=content[i].match(regX);content[i]="";if(regXMatch){for(k=0;k<regXMatch.length;k++){content[i]+=regXMatch[k];}}}return parseFloat((content.length==1)?(content[0]):(content[0]+"."+content[1]));};
// [DE] wird nur auf Strings angewandt - versucht, einen formatierten dezimalzahl-string in einen zahlenwert umzuwandeln    - liefert diesen wert oder NaN zurueck;
// [EN] to be used with Strings only   - tries to convert a formatted string that represents a decimal number into a number - returns this value or returns NaN;


// [DE] erweiterte string-methoden;
// [EN] extended string-methods;
String.prototype.removeWhiteSpaces = function(){return(this.replace(/\s+/g,""));};
String.prototype.leftTrim = function(){return(this.replace(/^\s+/,""));};
String.prototype.rightTrim = function(){return(this.replace(/\s+$/,""));};
String.prototype.basicTrim = function(){return(this.replace(/\s+$/,"").replace(/^\s+/,""));};
String.prototype.superTrim = function(){return(this.replace(/\s+/g," ").replace(/\s+$/,"").replace(/^\s+/,""));};

//was: String.prototype.extendedReplace
String.prototype.globalReplace = function(searchValue,replaceValue,behaviour) {
  var regExpMaskArray = new Array("^","$",".","*","+","?","=","!",":","|","\\","/","(",")","[","]","{","}");
  for (var i=0;i<regExpMaskArray.length;i++) {
    searchValue = searchValue.replace(new RegExp("\\"+regExpMaskArray[i],"g"),("\\"+regExpMaskArray[i]));
  }
  return this.replace(((behaviour == "strictly") ? (new RegExp(searchValue,"g")) : (new RegExp(searchValue.replace(/\s+/g,"\\\s+"),"gi"))),replaceValue);
};

String.prototype.parseEmail = function() {
  var tldString = ".aero.arpa.biz.com.coop.edu.gov.info.int.mil.museum.name.net.org.pro.ac.ad.ae.af.ag.ai.al.am.an.ao.aq.ar.as.at.au.aw.az.ba.bb.bd.be.bf.bg.bh.bi.bj.bm.bn.bo.br.bs.bt.bv.bw.by.bz.ca.cc.cd.cf.cg.ch.ci.ck.cl.cm.cn.co.cr.cu.cv.cx.cy.cz.de.dj.dk.dm.do.dz.ec.ee.eg.eh.er.es.et.fi.fj.fk.fm.fo.fr.ga.gd.ge.gf.gg.gh.gi.gl.gm.gn.gp.gq.gr.gs.gt.gu.gw.gy.hk.hm.hn.hr.ht.hu.id.ie.il.im.in.io.iq.ir.is.it.je.jm.jo.jp.ke.kg.kh.ki.km.kn.kp.kr.kw.ky.kz.la.lb.lc.li.lk.lr.ls.lt.lu.lv.ly.ma.mc.md.mg.mh.mk.ml.mm.mn.mo.mp.mq.mr.ms.mt.mu.mv.mw.mx.my.mz.na.nc.ne.nf.ng.ni.nl.no.np.nr.nu.nz.om.pa.pe.pf.pg.ph.pk.pl.pm.pn.pr.ps.pt.pw.py.qa.re.ro.ru.rw.sa.sb.sc.sd.se.sg.sh.si.sj.sk.sl.sm.sn.so.sr.st.sv.sy.sz.tc.td.tf.tg.th.tj.tk.tm.tn.to.tp.tr.tt.tv.tw.tz.ua.ug.uk.um.us.uy.uz.va.vc.ve.vg.vi.vn.vu.wf.ws.ye.yt.yu.za.zm.zw.";
  var protocoll = "(mailto\:)";
  var userName = "([a-zA-Z0-9][a-zA-Z0-9_\\.-]*|\"([^\\\\\x80-\xff\015\012\"]|\\\\[^\x80-\xff])+\")";
  var domainName = "(([a-zA-Z0-9][a-zA-Z0-9\\._-]*\\.)*[a-zA-Z0-9][a-zA-Z0-9\\._-]*)";
  var tldName = "([a-zA-Z]{2,6})";
  var regX = new RegExp("^" + protocoll + "?" + userName + "@" + domainName + "\\." + tldName + "$","");
  if (regX.test(this)) {
    regX.exec(this);
    protocoll = RegExp.$1;
    userName = RegExp.$2;
    domainName = RegExp.$4;
    tldName = RegExp.$6;
    if (tldString.search(new RegExp("\\."+tldName+"\\.","i")) >= 0) {
      return {protocoll:protocoll,user:userName,domain:domainName,tld:tldName};
    } else {
      return null;
    }
  } else {
    return null;
  }
};

String.prototype.appendUrlParameter = function(param) {
  var str = this;
  if (/\?/.test(str)) {
    str += "&" + param;
  } else {
    str += "?" + param;
  }
  return str;
};

// [DE] ueber das object "location.query" kann auf die name-wert-paare des "search"-teils einer hypertextreferenz zugegriffen werden (objecte "location.href" bzw. "location.search");
// [DE] this object "location.query" enables the access to name-value-pairs of the "search"-part of a hypertext reference (objects "location.href" respectively "location.search");
location.query = {};
location.getQuery = function() {
  var parameters = location.search;
  if (parameters.indexOf("=") >= 0) {
    parameters = parameters.substring(1).split("&");
    for (var i=0; i<parameters.length; i++) {
      parameters[i] = parameters[i].split("=");
      location.query[parameters[i][0]] = unescape(parameters[i][1]); //.replace(/\+/g," ");
    }
  }
};
location.getQuery();


function importImage(pathName,width,height) {
  width = ((isNative(width)) ? (parseInt(width)) : (null));
  height = ((isNative(height)) ? (parseInt(height)) : (null));
  width = ((isNumber(width)) ? (width) : (null));
  height = ((isNumber(height)) ? (height) : (null));
  var imgObj;
  if (width && height && isString(pathName)) {
    if (isString(pathName)) {
      imgObj = new Image(width,height);
      imgObj.src = pathName;
    }
  } else if (isString(pathName)) {
      imgObj = new Image();
      imgObj.src = pathName;
  } else {
      imgObj = new Image();
  }
  return imgObj;
}


var pictures = {}; // [DE] globales object aller bilder, die einen mouseover-effekt haben sollen - "ActiveImage"s; // [EN] global object of all images that will have a mouseover effect - "ActiveImage"s;

pictures.activeSuffix = "-a"; // [DE] namens-konvention fuer alle "aktiven" bilder im html-dokument, auf die spaeter ueber das "pictures"-objekt zugegriffen werden soll; // [EN] naming convention that applies for all "active" images within the html document that shall be manipulated by the "pictures"-object;
pictures.complete = false;    // [DE] diese kontroll-variable zeigt an, ob alle "ActiveImage"s geladen wurden; // [EN] flag that indicates whether all "ActiveImage"s are already loaded or not;

pictures.checkExceptions = function (imgSource) { // [DE] hier werden ausnahmeregeln fuer alle die bilder in code gegossen, fuer die keine zweite bildquelle nachgeladen werden soll;
  var regXPathException = /\/(checkboxes|pov)\//i; // [DE] die URL enth?lt das Verz. "/checkboxes/" oder das Verz. "/pov/";
  var regXNameException = /-a\.[^\.]+$/i; // [DE] der Dateiname endet bereits auf "-a";
  return !(regXPathException.test(imgSource) || regXNameException.test(imgSource));
};
pictures.addImage = function(imgName,defaultSrc,highlightSrc) { // [DE] methode des "pictures"-objektes mit der regulaere "Image"-objekte und/oder "ActiveImage"-objekte dem "pictures"-objekt hinzugefuegt werden koennen; // [EN] "pictures"-object method that adds regular "Image"-objects and/or "ActiveImage"-objects onto the "pictures"-object;
  if (isString(imgName)) {
    if ((isString(defaultSrc)) && (isString(highlightSrc))) {
      pictures[imgName] = new ActiveImage(defaultSrc,highlightSrc);
    } else if (isString(defaultSrc)) {
      pictures[imgName] = {};
      pictures[imgName].regular = importImage(defaultSrc);
    }
  }
};
// [DE] konstruktor fuer bild-objekte, die den zugriff auf zwei bildquellen ermoeglichen - z.b.: fuer mouseover-effekte;
// [EN] konstruktor for image-objects that can handle 2 image sources - e.g.: as for mouseover effects;
//function ActiveImage(defaultSrc,highlightSrc){this.regular=new Image();this.regular.src=defaultSrc;this.highlight=new Image();this.highlight.src=highlightSrc;}
function ActiveImage(defaultSrc,highlightSrc) {
  this.regular = importImage(defaultSrc);
  this.highlight = importImage(highlightSrc);
}
// [DE] laedt fuer jedes image-tag mit einem name-attribut das dazugehoerige mouseover-bild nach  /  !! auch aus n-verschachtelten netscape4-layern !!
// [EN] requests the mouseover source for every image within the document that has a name attribute /  !! this also is true for n-cascading layers in netscape4-browsers !!
function preloadActiveImages() {
  var i, imgObj, imgName, imgSource, imgSourcePath, imgSourceName, imgSourceExtension, regX = /[-_a-zA-Z0-9]*\.([a-zA-Z]*)$/;
  var imgCollection = ((document.images) ? (document.images) : ((document.getElementsByTagName && document.getElementsByTagName("img")) ? (document.getElementsByTagName("img")) : ([])));
  for (i=0; i<imgCollection.length; ++i) {
    imgObj = ((imgCollection.item) ? (imgCollection.item(i)) : (imgCollection[i]));
    imgName = ((imgObj.name !== "") ? (imgObj.name) : (imgObj.id));
    imgSource = imgObj.src;
    if (imgName && !pictures[imgName] && regX.test(imgSource) && pictures.checkExceptions(imgObj.src)) {
      imgSourcePath = ((imgSource.lastIndexOf("/") >= 0) ? (imgSource.substring(0,(imgSource.lastIndexOf("/")+1))) : (""));
      imgSourceName = ((imgSource.lastIndexOf("/") >= 0) ? (imgSource.substring((imgSource.lastIndexOf("/")+1),imgSource.lastIndexOf("."))) : (imgSource.substring(0,imgSource.lastIndexOf("."))));
      imgSourceExtension = regX.exec(imgSource)[1];
    //alert(imgSource + "\n\n" + (imgSourcePath + imgSourceName + pictures.activeSuffix + "." + imgSourceExtension));
      pictures[imgName] = new ActiveImage(imgSource,(imgSourcePath + imgSourceName + pictures.activeSuffix + "." + imgSourceExtension));
    }
  }
  pictures.complete = true;
}
if (typeof window.addEventListener == "function") {
  window.addEventListener("load",preloadActiveImages,true);
} else if ((typeof window.attachEvent == "object") || (typeof window.attachEvent == "function")) {
  window.attachEvent("onload",preloadActiveImages);
}

// [DE] verlangt nach einem im html-dokument vorkommenden gueltigen image-namen und setzt fuer dieses bild die quelle neu;
// [EN] requires an existing and within the html document valid image name and resets the source attribute for this image;
function setImageSrc(imgName,imgSrc) {
  if (isString(imgName) && isString(imgSrc)) {
    var imgObj = document.getImageByName(imgName);
    if (imgObj) {
      imgObj.src = imgSrc;
    }
  }
}

// [DE] findet das mit seinem namen angeforderte image-objekt in verschachtelten netscape4-layern und liefert dieses zurueck - wird von den funktionen "mouseOver" und "mouseOut" verwendet;
// [DE] detects an image object within a cascading netscape4 layer hirarchie by its name and returns it - the functions "mouseOver" and "mouseOut" make use of it;
if (document.layers) {

  document.getImageByName = function(imgName) {
    var imgObj = null;
    var findImage = function(docImages) {
      var imgFound = false;
      for (var i=0; i<docImages.length; i++) {
        if (docImages[i].name == imgName) {
          imgObj = docImages[imgName];
          imgFound = true;
          break;
        }
      }
      return imgFound;
    };
    var browseLayers = function(doc) {
      if (findImage(doc.images)) {
        return;
      }
      for (var i=0; i<doc.layers.length; i++) {
        browseLayers(doc.layers[i].document);
      }
    };
    browseLayers(document);
    return imgObj;
  };

} else {

  document.getImageByName = function(imgName) {return document.images[imgName];};

}

// [DE] erwartet mindestens 1 parameter vom typ "string" bzw. "object", wobei "object" ein gueltiger <img>-knoten des html-dokumentes sein sollte - schaltet alle "ActiveImage"s, die ueber die argumenten-liste dieser funktion ermittelt werden konnten, in deren "highlight"-ansichten;
// [EN] expects at least 1 "string" type or "object" type parameter, the "object" type should be a valid image node of the html document - switches all "ActiveImage"s that could be evaluated from the functions arguments list into their "highlight"-modi;
function mouseOver() {
  var imgName = "";
  for (var i=0; i<arguments.length; i++) {
    imgName = arguments[i];
  //if (imgName.constructor == String) {
    if (isString(imgName)) {
      if (pictures.complete && pictures[imgName]) {
        document.getImageByName(imgName).src = pictures[imgName].highlight.src;
      }
  //} else if ((typeof(imgName).search(/object/i) >= 0) && (imgName.nodeType) && (imgName.nodeType == 1)) {
    } else if (isNode(imgName) && (imgName.nodeType) && (imgName.nodeType == 1)) {
      imgName = imgName.getAttribute("name");
      if (imgName && pictures.complete && pictures[imgName]) {
        document.getImageByName(imgName).src = pictures[imgName].highlight.src;
      }
    }
  }
}
// [DE] erwartet mindestens 1 parameter vom typ "string" bzw. "object", wobei "object" ein gueltiger <img>-knoten des html-dokumentes sein sollte - schaltet alle "ActiveImage"s, die ueber die argumenten-liste dieser funktion ermittelt werden konnten, in deren default-ansichten ("regular");
// [EN] expects at least 1 "string" type or "object" type parameter, the "object" type should be a valid image node of the html document - switches all "ActiveImage"s that could be evaluated from the functions arguments list into their default-modi ("regular");
function mouseOut() {
  var imgName = "";
  for (var i=0; i<arguments.length; i++) {
    imgName = arguments[i];
  //if (imgName.constructor == String) {
    if (isString(imgName)) {
      if (pictures.complete && pictures[imgName]) {
        document.getImageByName(imgName).src = pictures[imgName].regular.src;
      }
  //} else if ((typeof(imgName).search(/object/i) >= 0) && (imgName.nodeType) && (imgName.nodeType == 1)) {
    } else if (isNode(imgName) && (imgName.nodeType) && (imgName.nodeType == 1)) {
      imgName = imgName.getAttribute("name");
      if (imgName && pictures.complete && pictures[imgName]) {
        document.getImageByName(imgName).src = pictures[imgName].regular.src;
      }
    }
  }
}
// [DE] erwartet mindestens 1 parameter vom typ "string" bzw. "object", wobei "object" ein gueltiger <img>-knoten des html-dokumentes sein sollte - haelt alle "ActiveImage"s, die ueber die argumenten-liste dieser funktion ermittelt werden konnten, dauerhaft in deren "highlight"-ansichten;
// [EN] expects at least 1 "string" type or "object" type parameter, the "object" type should be a valid image node of the html document - keeps permanently all "ActiveImage"s that could be evaluated from the functions arguments list in their "highlight"-modi;
function setPermanentHigh() {
  var imgName = "";
  for (var i=0; i<arguments.length; i++) {
    imgName = arguments[i];
  //if (imgName.constructor == String) {
    if (isString(imgName)) {
      if (pictures.complete && pictures[imgName]) {
        pictures[imgName].regular.src = pictures[imgName].highlight.src;
        document.getImageByName(imgName).src = pictures[imgName].highlight.src;
      }
  //} else if ((typeof(imgName).search(/object/i) >= 0) && (imgName.nodeType) && (imgName.nodeType == 1)) {
    } else if (isNode(imgName) && (imgName.nodeType) && (imgName.nodeType == 1)) {
      imgName = imgName.getAttribute("name");
      if (imgName && pictures.complete && pictures[imgName]) {
        pictures[imgName].regular.src = pictures[imgName].highlight.src;
        document.getImageByName(imgName).src = pictures[imgName].highlight.src;
      }
    }
  }
}
// [DE] erwartet mindestens 1 parameter vom typ "string" bzw. "object", wobei "object" ein gueltiger <img>-knoten des html-dokumentes sein sollte - haelt alle "ActiveImage"s, die ueber die argumenten-liste dieser funktion ermittelt werden konnten, dauerhaft in deren default-ansichten ("regular");
// [EN] expects at least 1 "string" type or "object" type parameter, the "object" type should be a valid image node of the html document - keeps permanently all "ActiveImage"s that could be evaluated from the functions arguments list in their default-modi ("regular");
function dropPermanentHigh() {
  var imgName = "";
  for (var i=0; i<arguments.length; i++) {
    imgName = arguments[i];
  //if (imgName.constructor == String) {
    if (isString(imgName)) {
      if (pictures.complete && pictures[imgName]) {
      //pictures[imgName].regular.src = pictures[imgName].regular.src.replace(/([^-a\.]*)-a\.([a-zA-Z]*)$/i,"$1.$2");
      //pictures[imgName].regular.src = pictures[imgName].regular.src.replace(/-a\./i,".");
        pictures[imgName].regular.src = pictures[imgName].regular.src.replace(new RegExp((pictures.activeSuffix+"\\."),"i"),".");
        document.getImageByName(imgName).src = pictures[imgName].regular.src;
      }
  //} else if ((typeof(imgName).search(/object/i) >= 0) && (imgName.nodeType) && (imgName.nodeType == 1)) {
    } else if (isNode(imgName) && (imgName.nodeType) && (imgName.nodeType == 1)) {
      imgName = imgName.getAttribute("name");
      if (imgName && pictures.complete && pictures[imgName]) {
      //pictures[imgName].regular.src = pictures[imgName].regular.src.replace(/([^-a\.]*)-a\.([a-zA-Z]*)$/i,"$1.$2");
      //pictures[imgName].regular.src = pictures[imgName].regular.src.replace(/-a\./i,".");
        pictures[imgName].regular.src = pictures[imgName].regular.src.replace(new RegExp((pictures.activeSuffix+"\\."),"i"),".");
        document.getImageByName(imgName).src = pictures[imgName].regular.src;
      }
    }
  }
}


// [DE] setzt den klassen-namen eines oder mehrerer beliebiger ueber eine "id" identifizierbaren html-element-knoten(s) auf den wert des letzten arguments - erkennt, ob die argumente der funktion, die fuer html-knoten stehen ("objectId") vom typ "string" oder html-knoten-objekte sind;
// [EN] sets the class name of one ore any more html element node(s) that can be identified by an "id" to the functions last parameter value - recognizes whether the functions arguments that refer to a html-node ("objectId") are of type "string" or html  node objects;
if (document.all && !window.opera) {

  this.setClass = function() { // function(objectId [, objectId02, objectId03, objectIdXX ], cssClassName);
    var argumentsLength = arguments.length;
    if ((argumentsLength >= 2) && isString(arguments[argumentsLength-1]) && !isNode(document.all(arguments[argumentsLength-1]))) {
      var cssClassName = arguments[argumentsLength-1], objectId = null, i;
      for (i=0; i<argumentsLength-1; i++) {
        objectId = arguments[i];
        if (isString(objectId)) {
          document.all(objectId).className = cssClassName;
        } else if (isNode(objectId) && (objectId.nodeType) && (objectId.nodeType == 1)) {
          objectId.className = cssClassName;
        }
      }
    }
  };

} else if (document.getElementById) {

  this.setClass = function() { // function(objectId [, objectId02, objectId03, objectIdXX ], cssClassName);
    var argumentsLength = arguments.length;
    if ((argumentsLength >= 2) && isString(arguments[argumentsLength-1]) && !isNode(document.getElementById(arguments[argumentsLength-1]))) {
      var cssClassName = arguments[argumentsLength-1], objectId = null, i;
      for (i=0; i<argumentsLength-1; i++) {
        objectId = arguments[i];
        if (isString(objectId)) {
          var objNode = document.getElementById(objectId);
          if (objNode) objNode.className = cssClassName;
        } else if (isNode(objectId) && (objectId.nodeType) && (objectId.nodeType == 1)) {
          objectId.className = cssClassName;
        }
      }
    }
  };

} else {

  this.setClass = function() {
    return;
  };
}

function getAbsoluteLeft(obj) {
  var x = 0;
  while (obj.offsetParent !== null) {
    x += obj.offsetLeft;
    obj = obj.offsetParent;
  }
  x += obj.offsetLeft;
  return x;
}
function getAbsoluteTop(obj) {
  var y = 0;
  while (obj.offsetParent !== null) {
    y += obj.offsetTop;
    obj = obj.offsetParent;
  }
  y += obj.offsetTop;
  return y;
}
function getCurrentStyle(nodeObject,propertyName) {
  var propertyValue;
  if (document.documentElement && document.defaultView) { // w3c-DOM
    propertyValue = document.defaultView.getComputedStyle(nodeObject,"").getPropertyValue(propertyName); // hier gilt nur die html-css-style-schreibweise - also: "z-index" oder "background-color" usw. ;
  } else if (document.documentElement && document.documentElement.currentStyle) { // msie-DOM
  //propertyName = propertyName.replace(/([a-z]*)\-([a-z])([a-z]*)/g,"$1+$2.toUpperCase()+$3");
    var regX = /([a-z]*)\-([a-z])([a-z]*)/;
    while (regX.test(propertyName)) {
      regX.exec(propertyName);
      propertyName = RegExp.$1 + RegExp.$2.toUpperCase() + RegExp.$3;
    }
    propertyValue = nodeObject.currentStyle[propertyName]; // hier gilt nur die js-css-attribute-schreibweise - also: "zIndex" oder "backgroundColor" usw. - das "propertyName"-attribute dieser funktion muss aber immer der konvention des w3c-DOM folgen (um z.b. mozilla zu unterstuetzen), so dass es mit einem RegExp auf das msie-DOM angepasst wird;
  }
  return propertyValue;
}
/*
if (document.all && !document.getElementsByTagName) { // bringt diese w3c-dom methode den MSIEs mit einer versionsnummer kleiner als 6 bei;
  document.getElementsByTagName = function(tagName) {
    return document.all.tags(tagName);
	};
}*/

if (isNumber(window.innerWidth) && isNumber(window.innerHeight)) { // mozilla;
  document.getClientWidth = function() {return window.innerWidth;};
  document.getClientHeight = function() {return window.innerHeight;};
} else if (document.all || window.opera) { // msie && opera;
  document.getClientWidth = function() {return document.body.clientWidth;};
  if (document.documentElement && isNumber(document.documentElement.clientHeight) && document.documentElement.clientHeight != 0) {
    document.getClientHeight = function() {return document.documentElement.clientHeight;};  
  } else {
    document.getClientHeight = function() {return document.body.clientHeight;};
  }
}
document.getScrollWidth = function() {return document.body.scrollWidth;};
document.getScrollHeight = function() {return document.body.scrollHeight;};

document.getElementsByClassNames = function(classNames) {
//  - inspiriert durch Thomas Meinike - siehe hierzu auch: "http://selfforum.teamone.de/archiv/2002/12/32611/#m176936";
//  - dank an Dr. Thomas Meinike fuer den tip mit der erlaubten wildcart innnerhalb von javascript - document.getElementsByTagName("*");
// -- http://www.styleassistant.de/ - http://www.handmadecode.de/ - http://www.datenverdrahten.de - http://www.et.fh-merseburg.de/person/meinike/ --
//
  /*  - erwartet genau einen parameter, der wiederum "String" oder regulaerer ausdruck ("RegExp") sein darf;

      - die string-parameter-variante sucht sowohl nach einzel-klassen als auch  nach klassen-gruppen:
        * einzeln zu suchende klassen-namen werden dabei innerhalb des parameters durch komma (",") voneinandner getrennt;
        * klassen-namen innerhalb einer zu identifizierenden gruppe werden durch leerzeichen (" ") voneinandner getrennt;
        * bsp.:
              <span class="red">...</span>            <!-- einzel-klasse  -->
              <span class="blue"...</span>>           <!-- einzel-klasse  -->
              <span class="red big kursiv">...</span> <!-- klassen-gruppe -->
              <span class="blue box">...</span>       <!-- klassen-gruppe -->

              document.getElementsByClassNames("red,blue,red big,blue box");

          > document.getElementsByClassNames("red,.................); findet sowohl <span class="red">...</span> als auch <span class="red big kursiv">...</span>;
          > document.getElementsByClassNames("...,blue,............); findet sowohl <span class="blue">...</span> als auch <span class="blue box">...</span>;
          > document.getElementsByClassNames("...,...,red kursiv,..); findet NICHTS;
          > document.getElementsByClassNames("...,...,red big,.....); findet <span class="red big kursiv">...</span>;
          > document.getElementsByClassNames("...,...,...,blue box"); findet <span class="blue box">...</span>;

         -> im beispiel werden die letzten beiden elemente nicht noch einmal der trefferliste hinzugefuegt, da diese elemente schon durch die klassen-namen "red" bzw "blue" gefunden wurden;

      - die RegExp-parameter-variante findet alle elemente auf deren "className"-attribut-werte der suchausdruck passt;
  */
  var i = 0, k = 0, exc, nodeClassName = "", elementsCollection = null, nodeCollection = ((document.getElementsByTagName) ? (document.getElementsByTagName("*")) : (null));
  if (navigator.userAgent.toLowerCase().indexOf("safari") != -1) {
	nodeCollection = document.getSafariElementsByTagName("*");
  }
  if (nodeCollection) {
    if (isString(classNames)) {
      classNames = classNames.replace(/\s+/g," ").replace(/\s+$/,"").replace(/^\s+/,"").split(","); // kosmetik, falls sich ueber das "classNames"-argument der function leerzeichen eingeschmuggelt haben sollten;
      elementsCollection = [];
      for (i=0; i<nodeCollection.length; i++) {
        for (k=0; k<classNames.length; k++) {
          if (isString(nodeCollection[i].className)) {
            nodeClassName = nodeCollection[i].className.replace(/\s+/g," ").replace(/\s+$/,"").replace(/^\s+/,""); // kosmetik, falls sich ueber den "className"-string des html-knotens leerzeichen eingeschmuggelt haben sollten;
            if ((nodeClassName.search(new RegExp("\\b"+classNames[k]+"\\b","")) >= 0) && (!elementsCollection.contains(nodeCollection[i]))) {
              elementsCollection[elementsCollection.length] = nodeCollection[i];
            }
          }
        }
      }
    } else if (isRegExp(classNames)) {
      elementsCollection = [];
      for (i=0; i<nodeCollection.length; i++) {
        if (isString(nodeCollection[i].className)) {
          nodeClassName = nodeCollection[i].className.replace(/\s+/g," ").replace(/\s+$/,"").replace(/^\s+/,"");
          if ((nodeClassName.search(classNames) >= 0) && (!elementsCollection.contains(nodeCollection[i]))) {
            elementsCollection[elementsCollection.length] = nodeCollection[i];
          }
        }
      }
    }
  }
  return elementsCollection;
};

if (navigator.userAgent.toLowerCase().indexOf("safari") != -1) {
	document.getSafariElementsByTagName = document.getElementsByTagName;
	document.getElementsByTagName = function (str) {
		var i, arr = [], list = document.getSafariElementsByTagName(str);
		if (list) {
			for (i = 0; i<list.length; i++) {
				arr[i] = list[i];
				if (list[i].name) {
					arr[list[i].name] = arr[i];
				}
				if (list[i].id) {
					arr[list[i].id] = arr[i];
				}
			}
		}
		return arr;
	};
}