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 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 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);}
