
var isIE4=false;
var isIE5=false;
var isNav4=false;
var isNav6=false;
 if ((document.getElementById)&& (navigator.appName == "Netscape")){
	isNav6=true;
	//alert("NN6 code");
}
 else if (document.getElementById) {
 	isIE5=true;
	//alert("IE5 code");
}
 else if (document.layers) {
	isNav4=true;
	//alert("NN4 code");
}
else {
	isIE4=true;	
	//alert(" IE 4 code");
}

 

  function DynLayer(id,nestref) {

          if (isNav4) {
                   this.css = (nestref)? eval("document."+nestref+".document."+id) : eval("document."+id);
                  this.x = this.css.left
                  this.y = this.css.top
		    this.writelayer=DynWriteLayerNav	
          }
          else if (isIE4) {
                  this.css = document.all[id].style
                  this.x = this.css.pixelLeft
                  this.y = this.css.pixelTop
		  this.writelayer=DynWriteLayerIE	
          }
           else if (isIE5) {
                  this.css = document.getElementById(id).style
                  this.x = this.css.pixelLeft
                  this.y = this.css.pixelTop
		  this.writelayer=DynWriteLayerIE	
          }
           else if (isNav6) {
                  this.css = document.getElementById(id).style
                  this.x = this.css.left
                  this.y = this.css.top
		     this.writelayer=DynWriteLayerNav6	
          }
   
          this.moveTo = DynLayerMoveTo
          this.moveBy = DynLayerMoveBy
          this.show = DynLayerShow
          this.hide = DynLayerHide
          this.addon = DynLayerAddon
          this.addon(id,nestref)
  }
  function DynLayerMoveTo(x,y) {
          if (x!=null) {
                  this.x = x
                  this.css.left = this.x
          }
          if (y!=null) {
                  this.y = y
                  this.css.top = this.y
          }
  }
  function DynLayerMoveBy(x,y) {
          this.moveTo(this.x+x,this.y+y)
  }
  function DynLayerShow() {
          this.css.visibility = (isNav4)? "show" : "visible"
  }
  function DynLayerHide() {
          this.css.visibility = (isNav4)? "hide" : "hidden"
  }
  function DynLayerAddon(id,nestref) {
          this.w = (isNav4)? this.css.clip.width : this.css.pixelWidth
          this.h = (isNav4)? this.css.clip.height : this.css.pixelHeight
          this.doc = (isNav4)? this.css.document : document
	   if(isNav4){	
 	         this.event =  this.css 
	  }
	  else if(isIE4){
		this.event=document.all[id];
	  }
	  else if(isIE5){
		this.event=document.getElementById(id);
	  }
	  else if(isNav6){
		this.event=document.getElementById(id);
	  }			
          if (isNav4) this.event.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
          this.obj = id + "DynLayer"
          eval(this.obj + "=this")
          this.setBGColor = DynLayerSetBGColor
   	   this.setzindex= DynLayerSetZindex;		
  }
  function DynLayerSetBGColor(color) {
          if (isNav4) this.doc.bgColor = color
          else if (isIE4 || isNav6 || isIE5) this.css.backgroundColor = color
  }
 
function DynLayerSetZindex(zorder){
		this.css.zIndex=zorder;
	     	
}
function DynWriteLayerNav(txt,dstyle){
		txt=dstyle+txt+"</div>";
		this.event.document.write(txt);
		this.event.document.close();
	     	
}
function DynWriteLayerIE(txt){
		this.event.innerHTML=txt;
		
	     	
}
function DynWriteLayerNav6(txt){
		this.event.innerHTML=txt;
		
	     	
}