var cbeVersion = "v3b10"; window.status = "Loading CBE " + cbeVersion; window.onload = function() { cbeInitialize(); if (window.windowOnload) { window.windowOnload(); } } function CrossBrowserElement(eleObject, indexNum) { if (arguments.length > 2) { alert('cbe error: invalid number of arguments for CrossBrowserElement constructor'); return; } if (!eleObject) { alert("cbe error: CrossBrowserElement constructor requires non-null argument"); return; } if (indexNum == 0) { this.id = cbeBodyId; this.parent = null; } else { this.id = eleObject.id; this.parent = cbeGetElementParent(eleObject); } this.ele = eleObject; this.index = indexNum; this.w = 0; this.h = 0; this.x = 0; this.y = 0; this.path = new Array(); this.sizeTo = cbeSizeTo; this.sizeBy = cbeSizeBy; this.moveTo = cbeMoveTo; this.moveBy = cbeMoveBy; this.show = cbeShow; this.hide = cbeHide; this.contains = cbeContains; this.scrollLeft = cbeScrollLeft; this.scrollTop = cbeScrollTop; this.getImgByName = cbeGetImageByName; this.left = domLeft; this.top = domTop; this.width = domWidth; this.height = domHeight; this.offsetLeft = domOffsetLeft; this.offsetTop = domOffsetTop; this.zIndex = domZIndex; this.innerHtml = domInnerHtml; this.visibility = domVisibility; this.color = domColor; this.background = domBackground; this.relativePosition = cbeRelativePosition; this.clip = domClip; this.clipTop = domClipTop; this.clipRight = domClipRight; this.clipBottom = domClipBottom; this.clipLeft = domClipLeft; this.clipWidth = domClipWidth; this.clipHeight = domClipHeight; this.clipArray = domClipArray; if (is.ie4up) { this.left = ieLeft; this.top = ieTop; this.width = ieWidth; this.height = ieHeight; } else if (is.opera) { this.left = ieLeft; this.top = ieTop; this.width = ieWidth; this.height = ieHeight; this.offsetLeft = cbeReturnZero; this.offsetTop = cbeReturnZero; this.background = opBackground; this.clip = opClip; this.clipTop = cbeReturnZero; this.clipRight = cbeReturnZero; this.clipBottom = cbeReturnZero; this.clipLeft = cbeReturnZero; this.clipWidth = opClipWidth; this.clipHeight = opClipHeight; this.clipArray = nnClipArray; this.innerHtml = opInnerHtml; this.scrollBy = cbeReturnZero; this.clipBy = cbeReturnZero; this.autoClip = cbeReturnZero; } else if (is.gecko) { ; } else if (is.nav4up) { this.left = nnLeft; this.top = nnTop; this.width = nnWidth; this.height = nnHeight; this.offsetLeft = nnOffsetLeft; this.offsetTop = nnOffsetTop; this.visibility = nnVisibility; this.zIndex = nnZIndex; this.background = nnBackground; this.color = nnColor; this.clip = nnClip; this.clipTop = nnClipTop; this.clipRight = nnClipRight; this.clipBottom = nnClipBottom; this.clipLeft = nnClipLeft; this.clipWidth = nnClipWidth; this.clipHeight = nnClipHeight; this.clipArray = nnClipArray; this.innerHtml = nnInnerHtml; } else { alert("cbe error: Unsupported browser"); return; } this.ele.cbe = this; if (this.index != 0) { if (is.ie) this.sizeTo(this.ele.offsetWidth, this.ele.offsetHeight); else if (is.gecko) this.sizeTo(this.ele.offsetWidth, this.ele.offsetHeight); else if (is.nav) this.sizeTo(this.ele.clip.width, this.ele.clip.height); else if (is.opera) this.sizeTo(this.ele.style.pixelWidth, this.ele.style.pixelHeight); this.hide(); this.clip('auto'); } } function cbeInitialize() { window.cbeBodyId = 'cbeBodyId'; window.is = new ClientSnifferJr(); if (!is.ie && !is.nav && !is.gecko && !is.opera) { alert("Diese Seite kann mit Ihrem Browser nicht angezeigt werden!"); } if (window.cbeEventJsLoaded) { CrossBrowserElement.prototype.addEventListener = _cbeAddEventListener; CrossBrowserElement.prototype.removeEventListener = _cbeRemoveEventListener; window.cbeEvent = new CrossBrowserEvent(); } if (window.cbeAnimJsLoaded) { CrossBrowserElement.prototype.slideTo = cbeSlideTo; CrossBrowserElement.prototype.arcTo = cbeArcTo; CrossBrowserElement.prototype.linearPath = cbeLinearPath; CrossBrowserElement.prototype.circularPath = cbeCircularPath; CrossBrowserElement.prototype.ellipticalPath = cbeEllipticalPath; CrossBrowserElement.prototype.followPath = cbeFollowPath; CrossBrowserElement.prototype.cyclePaths = cbeCyclePaths; CrossBrowserElement.prototype.stopCycle = cbeStopCycle; CrossBrowserElement.prototype.slideToY = cbeSlideToY; CrossBrowserElement.prototype.yTarget = 0; CrossBrowserElement.prototype.moving = false; CrossBrowserElement.prototype.walk = null; CrossBrowserElement.prototype.stop = true; if (!CrossBrowserElement.prototype.timeout) CrossBrowserElement.prototype.timeout = 10; } if (window.cbeClipJsLoaded) { CrossBrowserElement.prototype.clipBy = cbeClipBy; CrossBrowserElement.prototype.autoClip = cbeAutoClip; CrossBrowserElement.prototype.scrollBy = cbeScrollBy; CrossBrowserElement.prototype.clipSpeed = 50; CrossBrowserElement.prototype.clipping = false; if (!CrossBrowserElement.prototype.timeout) CrossBrowserElement.prototype.timeout = 10; } if (!document.getImageByName) document.getImageByName = cbeGetImageByName; if (!document.getElementById) document.getElementById = cbeGetElementById; if (!document.getElementsByTagName) document.getElementsByTagName = cbeGetElementsByTagName; if (!document.body) { document.body = new Object(); document.body.id = cbeBodyId; } var i, j, ele, divArray; window.cbeAll = new Array(); cbeAll[0] = new CrossBrowserElement(document.body, 0); divArray = document.getElementsByTagName('DIV'); for (i = 0, j = 1; i < divArray.length; i++) { ele = divArray[i]; if ( ele.id != "") { cbeAll[j] = new CrossBrowserElement(ele, j); ++j; } } if (!is.nav4) { divArray = document.getElementsByTagName('SPAN'); for (i = 0; i < divArray.length; i++) { ele = divArray[i]; if ( ele.id != "") { cbeAll[j] = new CrossBrowserElement(ele, j); ++j; } } } window.status = ""; } function cbeGetElementById(eleId) { var ele = null; if (is.ie5up || is.gecko || is.opera) ele = document.getElementById(eleId); else if (is.ie4up) ele = document.all[eleId]; else if (is.nav4up) ele = nnGetElementById(window, eleId); return ele; } function nnGetElementById(parent, searchId) { for (var i = 0; i < cbeAll.length; i++) { if ( cbeAll[i].id == searchId ) return cbeAll[i].ele; } return null; } function cbeGetElementsByTagName(tagName) { var eleArray; if (is.opera) eleArray = document.body.getElementsByTagName(tagName); else if (is.ie4) eleArray = document.all.tags(tagName); else if (is.ie5up || is.gecko || is.nav5up) eleArray = document.getElementsByTagName(tagName); else if (is.nav4) { eleArray = new Array(); nnGetAllLayers(window, eleArray, 0); } return eleArray; } function nnGetAllLayers(parent, layerArray, nextIndex) { var i, layer; for (i = 0; i < parent.document.layers.length; i++) { layer = parent.document.layers[i]; layerArray[nextIndex++] = layer; if (layer.document.layers.length) nextIndex = nnGetAllLayers(layer, layerArray, nextIndex); } return nextIndex; } function cbeGetElementParent(child) { var parent = document.body; if (is.ie || is.gecko || is.opera) { if (child.parentElement) parent = child.parentElement; else if (child.parentNode) parent = child.parentNode; else if (child.offsetParent) parent = child.offsetParent; } else if (is.nav4up) { if (child.parentLayer) { if (child.parentLayer != window) parent = child.parentLayer; } } return parent; } function cbeGetImageByName(imgName) { var i, j, imgObj=null; for (i = 0; i < document.images.length; i++) { if (imgName == document.images[i].name) { return document.images[i]; } } if (is.nav4) { for (i = 0; i < cbeAll.length; i++) { if (cbeAll[i].ele.document) { for (j = 0; j < cbeAll[i].ele.document.images.length; j++) { if (imgName == cbeAll[i].ele.document.images[j].name) { return cbeAll[i].ele.document.images[j]; } } } } } return null; } function cbeContains(leftPoint, topPoint, margin) { if (arguments.length < 3) margin = 0; return ( leftPoint > this.left() + margin && leftPoint < this.left() + this.width() - margin && topPoint > this.top() + margin && topPoint < this.top() + this.height() - margin ); } function cbeMoveTo(x_cr, y_mar, outside) { if (isFinite(x_cr)) { this.left(x_cr); this.top(y_mar); } else { this.relativePosition(x_cr, y_mar, outside); this.left(this.x); this.top(this.y); } } function cbeMoveBy(dX, dY) { if (dX) this.left(this.left() + dX); if (dY) this.top(this.top() + dY); } function domLeft(newLeft) { if (arguments.length == 1) this.ele.style.left = newLeft + "px"; return parseInt(this.ele.style.left); } function ieLeft(newLeft) { if (arguments.length == 1) this.ele.style.pixelLeft = newLeft; return this.ele.style.pixelLeft; } function nnLeft(newLeft) { if (arguments.length == 1) this.ele.left = newLeft; return this.ele.left; } function domTop(newTop) { if (arguments.length == 1) this.ele.style.top = newTop + "px"; return parseInt(this.ele.style.top); } function ieTop(newTop) { if (arguments.length == 1) this.ele.style.pixelTop = newTop; return this.ele.style.pixelTop; } function nnTop(newTop) { if (arguments.length == 1) this.ele.top = newTop; return this.ele.top; } function domOffsetLeft() { return this.ele.offsetLeft; } function domOffsetTop() { return this.ele.offsetTop; } function nnOffsetLeft() { return this.ele.pageX; } function nnOffsetTop() { return this.ele.pageY; } function cbeSizeTo(newWidth, newHeight) { this.width(newWidth); this.height(newHeight); } function cbeSizeBy(dW, dH) { this.width(this.width() + dW); this.height(this.height() + dH); } function domWidth(newWidth) { if (arguments.length == 1) { this.w = newWidth; this.ele.style.width = newWidth + "px"; } else if (this.index == 0) { this.w = cbeInnerWidth(); } return this.w } function ieWidth(newWidth) { if (arguments.length == 1) { this.w = newWidth; this.ele.style.pixelWidth = newWidth; } else if (this.index == 0) { this.w = cbeInnerWidth(); } return this.w } function nnWidth(newWidth) { if (arguments.length == 1) { this.w = newWidth; } else if (this.index == 0) { this.w = cbeInnerWidth(); } return this.w } function domHeight(newHeight) { if (arguments.length == 1) { this.h = newHeight; this.ele.style.height = newHeight + "px"; } else if (this.index == 0) { this.h = cbeInnerHeight(); } return this.h } function ieHeight(newHeight) { if (arguments.length == 1) { this.h = newHeight; this.ele.style.pixelHeight = newHeight; } else if (this.index == 0) { this.h = cbeInnerHeight(); } return this.h } function nnHeight(newHeight) { if (arguments.length == 1) { this.h = newHeight; } else if (this.index == 0) { this.h = cbeInnerHeight(); } return this.h } function cbeScrollLeft() { var value = 0; if (is.ie4up) { value = this.ele.scrollLeft; } else if (is.nav4up || is.opera || is.gecko) { if (this.index == 0) value = window.pageXOffset; else { value = 0; } } return value; } function cbeScrollTop() { var value = 0; if (is.ie4up) { value = this.ele.scrollTop; } else if (is.nav4up || is.opera || is.gecko) { if (this.index == 0) value = window.pageYOffset; else { value = 0; } } return value; } function cbeShow() { this.visibility(1); } function cbeHide() { this.visibility(0); } function domVisibility(vis) { if (arguments.length == 1) { switch(typeof(vis)) { case 'number': case 'boolean': if (vis) this.ele.style.visibility = is.opera ? 'visible' : 'inherit'; else this.ele.style.visibility = 'hidden'; break; case 'string': this.ele.style.visibility = vis; break; default: alert('invalid argument in domVisibility()'); } } else { return ( this.ele.style.visibility == 'visible' || this.ele.style.visibility == 'inherit' || this.ele.style.visibility == '' ); } } function nnVisibility(vis) { if (arguments.length == 1) { switch(typeof(vis)) { case 'number': case 'boolean': if (vis) this.ele.visibility = 'inherit'; else this.ele.visibility = 'hide'; break; case 'string': this.ele.style.visibility = vis; break; default: alert('invalid argument in nnVisibility()'); } } else { return ( this.ele.visibility == 'show' || this.ele.visibility == 'inherit' || this.ele.visibility == '' ); } } function domZIndex(newZ) { if (arguments.length == 1) this.ele.style.zIndex = newZ; return this.ele.style.zIndex } function nnZIndex(newZ) { if (arguments.length == 1) this.ele.zIndex = newZ; return this.ele.zIndex; } function domBackground(newBgColor, newBgImage) { if (arguments.length >= 1) { if (newBgColor == null || newBgColor == 'transparent') newBgColor = 'transparent'; this.ele.style.backgroundColor = newBgColor; if (arguments.length == 2) this.ele.style.backgroundImage = "url(" + newBgImage + ")"; } return this.ele.style.backgroundColor; } function nnBackground(newBgColor, newBgImage) { if (arguments.length >= 1) { if (newBgColor == null || newBgColor == 'transparent') newBgColor = null; this.ele.bgColor = newBgColor; if (arguments.length == 2) this.ele.background.src = newBgImage || null; } return this.ele.bgColor; } function opBackground(newBgColor, newBgImage) { if (arguments.length >= 1) { this.ele.style.background = newBgColor; } return this.ele.style.background; } function domColor(newColor) { if (arguments.length == 1) { this.ele.style.color = newColor; } return this.ele.style.color; } function nnColor(newColor) { return; } function domClip(top, right, bottom, left) { if (arguments.length == 4) { var clipRect = "rect(" + top + "px " + right + "px " + bottom + "px " + left + "px" + ")"; this.ele.style.clip = clipRect; } else if (arguments.length == 1) { this.clip(0, this.width(), this.height(), 0); } else return this.ele.style.clip; } function nnClip(top, right, bottom, left) { if (arguments.length == 4) { this.ele.clip.top = top; this.ele.clip.right = right; this.ele.clip.bottom = bottom; this.ele.clip.left = left; } else if (arguments.length == 1) { this.clip(0, this.width(), this.height(), 0); } else { var clipRect = "rect(" + this.ele.clip.top + "px " + this.ele.clip.right + "px " + this.ele.clip.bottom + "px " + this.ele.clip.left + "px" + ")"; return clipRect; } } function opClip(top, right, bottom, left) { if (arguments.length == 0) return "rect()"; } function domClipArray() { var re = /\(|px,?\s?\)?|\s|,|\)/; return this.ele.style.clip.split(re); } function nnClipArray() { alert('method not implemented for NN4 nor Opera'); } function domClipTop() { var a = this.clipArray(); return parseInt(a[1]); } function nnClipTop() { return this.ele.clip.top; } function domClipRight() { var a = this.clipArray(); return parseInt(a[2]); } function nnClipRight() { return this.ele.clip.right; } function domClipBottom() { var a = this.clipArray(); return parseInt(a[3]); } function nnClipBottom() { return this.ele.clip.bottom; } function domClipLeft() { var a = this.clipArray(); return parseInt(a[4]); } function nnClipLeft() { return this.ele.clip.left; } function domClipWidth() { var a = this.clipArray(); return (a[2] - a[4]); } function nnClipWidth() { if (this.index == 0) return cbeInnerWidth(); return this.ele.clip.width; } function opClipWidth() { return this.w; } function domClipHeight() { var a = this.clipArray(); return (a[3] - a[1]); } function nnClipHeight() { if (this.index == 0) return cbeInnerHeight(); return this.ele.clip.height; } function opClipHeight() { return this.h; } function cbeReturnZero() { return 0; } function cbeReturnVoid() { } function domInnerHtml(newHtml) { this.ele.innerHTML = newHtml; } function nnInnerHtml(newHtml) { if (newHtml == '') newHtml = ' '; this.ele.document.open(); this.ele.document.write(newHtml); this.ele.document.close(); } function opInnerHtml(newHtml) { return; } function cbeRelativePosition(rp, margin, outside) { var x = this.left(); var y = this.top(); var w = this.clipWidth(); var h = this.clipHeight(); var pw = this.parent.cbe.width(); var ph = this.parent.cbe.height(); var sx = this.parent.cbe.scrollLeft(); var sy = this.parent.cbe.scrollTop(); var right = sx + pw; var bottom = sy + ph; var cenLeft = sx + Math.floor(pw/2) - Math.floor(w/2); var cenTop = sy + Math.floor(ph/2) - Math.floor(h/2); if (arguments.length > 1) { if (outside) margin = -margin; sx += margin; sy += margin; right -= margin; bottom -= margin; } switch (rp.toLowerCase()) { case 'center': x = cenLeft; y = cenTop; break; case 'centerh': x = cenLeft; break; case 'centerv': y = cenTop; break; case 'n': x = cenLeft; if (outside) y = sy - h; else y = sy; break; case 'ne': if (outside) { x = right; y = sy - h; } else { x = right - w; y = sy; } break; case 'e': y = cenTop; if (outside) x = right; else x = right - w; break; case 'se': if (outside) { x = right; y = bottom; } else { x = right - w; y = bottom - h } break; case 's': x = cenLeft; if (outside) y = sy - h; else y = bottom - h; break; case 'sw': if (outside) { x = sx - w; y = bottom; } else { x = sx; y = bottom - h; } break; case 'w': y = cenTop; if (outside) x = sx - w; else x = sx; break; case 'nw': if (outside) { x = sx - w; y = sy - h; } else { x = sx; y = sy; } break; default: alert("invalid 'rp' argument in relativePosition()"); } this.x = x; this.y = y; } function cbeInnerWidth() { var w = 0; if (is.nav4up) { w = window.innerWidth; if (document.height > window.innerHeight) w -= 16; } else if (is.ie4up) { w = document.body.clientWidth; } else if (is.opera) { w = window.innerWidth; } return w; } function cbeInnerHeight() { var h = 0; if (is.nav4up) { h = window.innerHeight; if (document.width > window.innerWidth) h -= 16; } else if (is.ie4up) { h = document.body.clientHeight; } else if (is.opera) { h = window.innerHeight; } return h; } function cbePageXOffset() { var offset; if (is.nav4up || is.opera) { offset = window.pageXOffset; } else if (is.ie4up) { offset = document.body.scrollLeft; } return offset; } function cbePageYOffset() { var offset; if (is.nav4up || is.opera) { offset = window.pageYOffset; } else if (is.ie4up) { offset = document.body.scrollTop; } return offset; } function ClientSnifferJr() { this.ua = navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.opera = this.ua.indexOf('opera') != -1; if (this.opera) { if (this.ua.indexOf("opera/7") !=-1) { this.opera=false; this.ua='mozilla/gecko'; this.major=4; } else { return; } } this.ie = this.ua.indexOf('msie') != -1; if (this.ie) { this.ie3 = this.major == 2; this.ie4 = ( this.major == 4 && this.ua.indexOf('msie 5.0') == -1 ); this.ie4up = this.major >= 4; this.ie5up = !this.ie3 && !this.ie4; return; } this.gecko = this.ua.indexOf('gecko') != -1; this.nav = ( this.ua.indexOf('mozilla') != -1 && this.ua.indexOf('spoofer') == -1 && this.ua.indexOf('compatible') == -1 ); if (this.nav) { this.nav4 = this.major == 4; this.nav4up= this.major >= 4; this.nav5up= this.major >= 5; return; } this.hotjava = this.ua.indexOf('hotjava') != -1; this.webtv = this.ua.indexOf('webtv') != -1; this.aol = this.ua.indexOf('aol') != -1; }