
function dynamicStyles(object) { 
(myBrowser.dom)?this.element=object.style:false; 
(myBrowser.nc4)?this.element=object:false;
this.object=object }

dynamicStyles.prototype.element=null,dynamicStyles.prototype.object=null;

function getLayer(container,id) { 
for(var i=0; i<container.layers.length; ++i) { 
if(container.layers[i].id&&id==container.layers[i].id) { 
return container.layers[i] } 
subLayer=container.layers[i].document;
object=getLayer(subLayer,id); 
if(object!=null) { 
return object } } 
return null }

(myBrowser.ie4||myBrowser.ie5)?document.getElementById=new Function("id","return document.all[id]"):false;
(myBrowser.nc4)?document.getElementById=getLayerById:false;

function getLayerById(id,container) { !container?container=this:false; return getLayer(container,id) }
function dSetPosition(position) { this.element.position=position }
function dSetVisibility(visibility) { this.element.visibility=visibility }
function dShowObject() { this.element.visibility="visible" }
function dHideObject() { this.element.visibility="hidden" }
function dSetColor(color) { this.element.color=color }  
function dSetColorNC4(color) { return null } 
function dSetBackgroundColor(color) { this.element.backgroundColor=color } 
function dSetBackgroundColorNC4(color) { this.element.bgColor=color; this.object.document.bgColor=color }
function dGetLeft() { if(this.element.left=='') { this.element.left=this.object.offsetLeft+'px' } return parseInt('0'+this.element.left,10) } 
function dGetLeftNC4() { return this.element.left } 
function dGetTop() { if(this.element.top=='') { this.element.top=this.object.offsetTop+'px' } return parseInt('0'+this.element.top,10) } 
function dGetTopNC4() { return this.element.top } 
function dSetLeft(left) { this.element.left=left+'px' } 
function dSetLeftNC4(left) { this.element.left=left } 
function dSetTop(top) { this.element.top=top+'px' } 
function dSetTopNC4(top) { this.element.top=top } 
function dMoveBy(x,y) { this.moveTo(this.getLeft()+x,this.getTop()+y) }
function dMoveTo(x,y) { this.setLeft(x); this.setTop(y) }
function dGetzIndex() { return this.element.zIndex }
function dSetzIndex(z) { this.element.zIndex=z }
function dDoNothing() { return null } 

if(myBrowser.dom) {
dynamicStyles.prototype.setPositionability=dSetPosition;
dynamicStyles.prototype.setVisibility=dSetVisibility;
dynamicStyles.prototype.showObject=dShowObject;
dynamicStyles.prototype.hideObject=dHideObject;
dynamicStyles.prototype.moveBy=dMoveBy;
dynamicStyles.prototype.moveTo=dMoveTo;
dynamicStyles.prototype.getzIndex=dGetzIndex;
dynamicStyles.prototype.setzIndex=dSetzIndex;
dynamicStyles.prototype.setBackgroundColor=dSetBackgroundColor;
dynamicStyles.prototype.setColor=dSetColor;
dynamicStyles.prototype.getLeft=dGetLeft;
dynamicStyles.prototype.setLeft=dSetLeft;
dynamicStyles.prototype.getTop=dGetTop;
dynamicStyles.prototype.setTop=dSetTop }

else if(myBrowser.nc4) {
dynamicStyles.prototype.setPositionability=dSetPosition;
dynamicStyles.prototype.setVisibility=dSetVisibility;
dynamicStyles.prototype.showObject=dShowObject;
dynamicStyles.prototype.hideObject=dHideObject;
dynamicStyles.prototype.moveBy=dMoveBy;
dynamicStyles.prototype.moveTo=dMoveTo;
dynamicStyles.prototype.getzIndex=dGetzIndex;
dynamicStyles.prototype.setzIndex=dSetzIndex;
dynamicStyles.prototype.setBackgroundColor=dSetBackgroundColorNC4;
dynamicStyles.prototype.setColor=dSetColorNC4;
dynamicStyles.prototype.getLeft=dGetLeftNC4;
dynamicStyles.prototype.setLeft=dSetLeftNC4;
dynamicStyles.prototype.getTop=dGetTopNC4;
dynamicStyles.prototype.setTop=dSetTopNC4;
window.onresize=onResizeNC4  }

else { 
dynamicStyles.prototype.setPositionability=dDoNothing;
dynamicStyles.prototype.setVisibility=dDoNothing;
dynamicStyles.prototype.showObject=dDoNothing;
dynamicStyles.prototype.hideObject=dDoNothing;
dynamicStyles.prototype.moveBy=dDoNothing;
dynamicStyles.prototype.moveTo=dDoNothing;
dynamicStyles.prototype.getzIndex=dDoNothing;
dynamicStyles.prototype.setzIndex=dDoNothing;
dynamicStyles.prototype.setBackgroundColor=dDoNothing;
dynamicStyles.prototype.setColor=dDoNothing;
dynamicStyles.prototype.getLeft=dDoNothing;
dynamicStyles.prototype.setLeft=dDoNothing;
dynamicStyles.prototype.getTop=dDoNothing;
dynamicStyles.prototype.setTop=dDoNothing } 

function windowWidth() { if(myBrowser.ie4||myBrowser.ie5) { return width=document.body.clientWidth }  return width=window.innerWidth }
function windowHeight() { if(myBrowser.ie4||myBrowser.ie5) { return height=document.body.clientHeight } return height=window.innerHeight } 

if(myBrowser.nc4) { initialWidth=windowWidth(); initialHeight=windowHeight() }
function onResizeNC4() { (initialWidth!=windowWidth()||initialHeight!=windowHeight())?location.reload():false; return false }



