var ns=(document.layers)? true:false;var dom=(document.getElementById)? true:false;var ie=(document.all)? true:false;function getWindowWidth(){if(window.innerWidth) return window.innerWidth;else if(document.body && document.body.offsetWidth) return document.body.offsetWidth;else return 0;}function getWindowHeight(){if(window.innerHeight) return window.innerHeight;else if(document.body && document.body.offsetHeight) return document.body.offsetHeight;else return 0;}function openWin(which,width,height){var t=window.open(which,'PopUp','width='+width+',height='+height+',screenX=10, left=10, screenY=10, top=10, scrollbars=1, resizable=1');t.focus();return void(t);}function openFullWin(which,width,height){var t=window.open(which,'PopUp','width='+width+',height='+height+',screenX=10, left=10, screenY=10, top=10, scrollbars=1, resizable=1, toolbar=1, menuebar=1, location=1, status=1');t.focus();return void(t);}function GetImagePath(){var imgpath=this.src;return this.path=imgpath.substring(imgpath.lastIndexOf(this.protocol), imgpath.lastIndexOf('/')+1);}ImageObject.prototype.getImagePath=GetImagePath; function SetSrc(string){return this.image.src=this.path+string;}ImageObject.prototype.setSrc=SetSrc;function GetHeight(){if(this.image){return this.height=this.image.height;}}ImageObject.prototype.getHeight=GetHeight;function GetWidth(){if(this.image){return this.width=this.image.width;}}ImageObject.prototype.getWidth=GetWidth;function GetImagePos(){if(document.all){if(!document.getElementById){temp=document.all[this.id];}else{var temp=document.getElementById(this.id);}while(temp){if(temp.offsetParent){this.x+=temp.offsetLeft;if(temp.offsetTop){this.y+=parseInt(temp.offsetTop);}}temp=temp.offsetParent;}}else if(document.layers) {if(this.image){this.y=this.image.y; this.x=this.image.x; }}else if(document.getElementById && navigator.appCodeName=="Mozilla"){var temp=document.getElementById(this.id);while(temp){if(temp.offsetParent){this.x+=temp.offsetLeft;if(temp.offsetTop){this.y+=parseInt(temp.offsetTop);}}temp=temp.offsetParent;}}else if(document.getElementById){this.y=document.getElementById(this.id).offsetTop; this.x=document.getElementById(this.id).offsetLeft; }return this.x,this.y;}ImageObject.prototype.getImagePos=GetImagePos;function ImageObject(id,parent){this.id=id;this.parent=parent;if(this.parent && document.layers){this.image    =this.parent.document.images[this.id];}else{this.image    =document.images[this.id];}this.src      =this.image.src;this.protocol =window.location.protocol;this.path     =this.getImagePath();this.y=0;this.x=0;this.getImagePos();this.width =this.getWidth();this.height=this.getHeight();}function ShowLayer(){this.css.visibility="visible";}LayerObject.prototype.show=ShowLayer;function HideLayer(){this.css.visibility="hidden";}LayerObject.prototype.hide=HideLayer;function CutLayer(){this.css.display="none";}LayerObject.prototype.cut=CutLayer;function PasteLayer(){this.css.display="inline";}LayerObject.prototype.paste=PasteLayer;function RewriteLayer(string){if(document.layers){with(this.d){open();writeln(string);close();}}else{ this.d.innerHTML=string;}}LayerObject.prototype.rewrite=RewriteLayer;function ClipLayer(t,r,b,l){if(document.layers){with(this.css.clip){top=t;right=r;bottom=b;left=l;}}else{ this.css.clip="rect("+t+"px, "+r+"px, "+b+"px, "+l+"px)";}}LayerObject.prototype.setClip=ClipLayer;function SetLayerXpos(x){if(document.all){ this.css.pixelLeft=x;}else             { this.css.left     =x;}}LayerObject.prototype.setLeft=SetLayerXpos;function SetLayerYpos(y){if(document.all){ this.css.pixelTop=y;}else             { this.css.top     =y;}}LayerObject.prototype.setTop=SetLayerYpos;function SetLayerXYpos(x,y){this.setLeft(x);this.setTop(y);}LayerObject.prototype.setPos=SetLayerXYpos;function SetZIndex(index){this.css.zIndex=index;}LayerObject.prototype.setZindex=SetZIndex;function SetLayerOverflow(type){if(!document.layers) this.css.overflow=type;}LayerObject.prototype.setOverflow=SetLayerOverflow;function GetLayerHeight(){if(document.layers){ this.height=this.d.height;}else                { this.height=this.d.offsetHeight;}return this.height;}LayerObject.prototype.getHeight=GetLayerHeight;function GetLayerWidth(){if(document.layers) { this.width=this.d.width;}else                 { this.width=this.d.offsetWidth;}return this.width;}LayerObject.prototype.getWidth=GetLayerWidth;function GetLayerYpos(){if(document.all){ this.y=this.css.pixelTop;}else             { this.y=this.css.top;}if(isNaN(this.y)) this.y=parseInt(this.y.substring(0,this.y.lastIndexOf('px')));return this.y;}LayerObject.prototype.getTop=GetLayerYpos;function GetLayerXpos(){if(document.all){ this.x=this.css.pixelLeft;}else             { this.x=this.css.left;}if(isNaN(this.x))  this.x=parseInt(this.x.substring(0,this.x.lastIndexOf('px')));return this.x;}LayerObject.prototype.getLeft=GetLayerXpos;function GetLayerXYpos(){this.x=this.getLeft();this.y=this.getTop();}LayerObject.prototype.getPos=GetLayerXYpos;function GetLayerVisibility(){if(this.css.visibility=="hidden"||this.css.visibility=="hide"){ return false;}else return true;}LayerObject.prototype.getVisibility=GetLayerVisibility;function GetDisplay(){return this.css.display;}LayerObject.prototype.getDisplay=GetDisplay;function SwitchLayerVisibility(){if(this.css.visibility=="hidden"||this.css.visibility=="hide"){ this.show(); }else{this.hide(); }}LayerObject.prototype.switchLayer=SwitchLayerVisibility;function RotateLayer(kreis,radius,mitteX,mitteY,bewegung,zeit){this.kreis   =kreis;this.radius  =radius;this.mitteX  =mitteX;this.mitteY  =mitteY;this.bewegung=bewegung; this.zeit    =zeit;this.timeout ="";this.bogen  =(this.kreis*Math.PI/180);this.r_x=this.mitteX+(Math.sin(this.bogen) * this.radius);this.r_y=this.mitteY+(Math.cos(this.bogen) * this.radius);this.setPos(this.r_x,this.r_y);this.kreis+=this.bewegung;if(this.kreis>360){ this.kreis=0; clearTimeout(this.timeout);}else{this.timeout=setTimeout(this.id+".rotate("+this.kreis+","+this.radius+","+this.mitteX+","+this.mitteY+","+this.bewegung+","+this.zeit+")",this.zeit);}}LayerObject.prototype.rotate=RotateLayer;function LayerObject(id){this.id=id;if(document.all)           { this.d=document.all[this.id];}if(document.layers)        { this.d=document.layers[this.id].document;}if(document.getElementById){ this.d=document.getElementById(this.id);}if(document.layers){ this.css=document.layers[this.id];}else                { this.css=this.d.style;}this.x=this.getLeft(); this.y=this.getTop();this.width =this.getWidth();this.height=this.getHeight();this.o="";this.visibility=this.getVisibility();this.setClip(0,this.width,(this.y+this.height),0);}
