// neues Layer-Object
// version 3.0 2003-03-12
// uwe Kommentar-Kennzeichen:!!!
var eventsOff = false;
        
function qeLayerSetVisibility( isVisible )
   {
   if ( isVisible )
      {// !!!nur noch auf nc4 abfragen
      this.css.visibility = (me.nc4) ? "show" : "visible";
      }
   else
      {//!!!nur noch auf nc4 abfragen
      this.css.visibility = (me.nc4) ? "hide" : "hidden";   
      }
   }

// ******************************************************
// ____________neu!!! schrift bold bei mouseOver_________
// ******************************************************
function qeLayerSetFtWeight( weight )
   {
   if ( this == null )
      { return; }
      // !!!nur auf nc4 abfragen NICHT me.nc
   if ( me.nc4 )
      {
      this.document.fontWeight = weight;
      }
   else
      {// !!! nc6/7 benennen es, lt. DOM jetzt wie IE
      this.css.fontWeight = weight;
      }
   } // ende function qeLayerSetFtWeight
   
// *************************************************************
// ____________neu!!! schrift farb-aenderung bei mouseOver_______
// **********************************************************
function qeLayerSetFtColor( ftCol )
   {
   if ( this == null )
      { return; }
      // !!!nur auf nc4 abfragen NICHT me.nc
   if ( me.nc4 )
      {
      this.document.color = ftCol;
      }
   else
      {// !!! nc6/7 benennen es, lt. DOM jetzt wie IE
      this.css.color = ftCol;
      }
   } // ende function qeLayerSetFtColor

   
// *************************************************************
// ____________neu!!! Rahmendicke bei mouseOver_______
//             fuer top, right, bottom, left in pixel
// **********************************************************
function qeLayerSetBdWid( bdTWid, bdRWid, bdBWid, bdLWid )
   {
   if ( this == null )
      { return; }
      // !!!nur auf nc4 abfragen NICHT me.nc
   if ( me.nc4 )
      {
      if ( bdTWid != "")
         {this.document.borderTopWidth = bdTWid;}
      if ( bdRWid != "")
         {this.document.borderRightWidth = bdRWid;}
      if ( bdBWid != "")
         {this.document.borderBottomWidth = bdBWid;}
      if ( bdLWid != "")
         {this.document.borderLeftWidth = bdLWid;}
         
      }
   else
      {// !!! nc6/7 benennen es, lt. DOM jetzt wie IE
      if ( (bdTWid != null) && (bdTWid != "") && (bdTWid != "none"))
         {this.css.borderTopWidth = bdTWid;}
      if ( (bdRWid != null) && (bdRWid != "") && (bdRWid != "none"))
         {this.css.borderRightWidth = bdRWid;}
      if ( (bdBWid != null) && (bdBWid != "") && (bdBWid != "none"))
         {this.css.borderBottomWidth = bdBWid;}
      if ( (bdLWid != null) && (bdLWid != "") && (bdLWid != "none"))
         {this.css.borderLeftWidth = bdLWid;}
      }
   } // ende function qeLayerSetBdWid

// *************************************************************
// ____________neu!!! Rahmenstil bei mouseOver_______
//             fuer top, right, bottom, left bei nc4 nicht dottet und dashed
//             muss noch abgefangen werden!!!!!!!!
// **********************************************************
function qeLayerSetBdSty ( bdTSty, bdRSty, bdBSty, bdLSty )
   {
   if ( this == null )
      { return; }
      // !!!nur auf nc4 abfragen NICHT me.nc
   if ( me.nc4 )
      {
      if ( bdTSty != "")
         {this.document.borderTopStyle = bdTSty;}
      if ( bdRSty != "")
         {this.document.borderRightStyle = bdRSty;}
      if ( bdBSty != "")
         {this.document.borderBottomStyle = bdBSty;}
      if ( bdLSty != "")
         {this.document.borderLeftStyle = bdLSty;}
         
      }
   else
      {// !!! nc6/7 benennen es, lt. DOM jetzt wie IE
      if ( (bdTSty != null) && (bdTSty != "") && (bdTSty != "none"))
         {this.css.borderTopStyle = bdTSty;}
      if ( (bdRSty != null) && (bdRSty != "") && (bdRSty != "none"))
         {this.css.borderRightStyle = bdRSty;}
      if ( (bdBSty != null) && (bdBSty != "") && (bdBSty != "none"))
         {this.css.borderBottomStyle = bdBSty;}
      if ( (bdLSty != null) && (bdLSty != "") && (bdLSty != "none"))
         {this.css.borderLeftStyle = bdLSty;}
      }
   } // ende function qeLayerSetBdSty
   
// *************************************************************
// ____________neu!!! Rahmenfarbe bei mouseOver_______
//             fuer top, right, bottom, left 
// **********************************************************
function qeLayerSetBdCol ( bdTCol, bdRCol, bdBCol, bdLCol )
   {
   if ( this == null )
      {  }
      // !!!nur auf nc4 abfragen NICHT me.nc
   if ( me.nc4 )
      {
      if ( bdTCol != "")
         {this.document.borderTopColor = bdTCol;}
      if ( bdRCol != "")
         {this.document.borderRightColor = bdRCol;}
      if ( bdBCol != "")
         {this.document.borderBottomColor = bdBCol;}
      if ( bdLCol != "")
         {this.document.borderLeftColor = bdLCol;}
         
      }
   else
      {// !!! nc6/7 benennen es, lt. DOM jetzt wie IE
      if ( (bdTCol != null) && (bdTCol != "") && (bdTCol != "none") )
         {this.css.borderTopColor = bdTCol;}
      if ( (bdRCol != null) && (bdRCol != "") && (bdRCol != "none") )
         {this.css.borderRightColor = bdRCol;}
      if ( (bdBCol != null) && (bdBCol != "") && (bdBCol != "none") )
         {this.css.borderBottomColor = bdBCol;}
      if ( (bdLCol != null) && (bdLCol != "") && (bdLCol != "none") )
         {this.css.borderLeftColor = bdLCol;}
      }
   } // ende function qeLayerSetBdCol                         

function qeLayerSetBgColor(color)
   {
   // window.status = "this=" + this;
   if ( this == null )
      { return; }
      // !!!nur auf nc4 abfragen NICHT me.nc
   if ( me.nc4 )
      {
      this.document.bgColor = color;
      }
   else
      {// !!! nc6/7 benennen es, lt. DOM jetzt wie IE
      this.css.backgroundColor = color;
      }

     // this.bgColor = color;
   } // ende function qeLayerSetBgColor
                                 
function qeLayerMove( x, y )
   {
   this.x = x;
   this.y = y;   

   if ( me.nc4 ) { this.css.left = this.x; }
   if ( me.w3c ) { this.css.left = this.x; }

   else
      { this.css.pixelLeft = this.x; }

   if ( me.nc4 ) { this.css.top = this.y; }
   if ( me.w3c ) { this.css.top = this.y; }
// ( me.w3c && !me.iex && !me.opera )
   else
      { this.css.pixelTop = this.y; }
   }// ende Layer move
   
// _______________________
// ____funktion  Layer Resize____                         

function qeLayerResize( b, h )
   {
   return;   
   if (b!=null) this.b = b;
   if (h!=null) this.h = h;
/*
   if (me.iex)
      {
      if (me.ie4)
         {
         this.css.pixelWidth = this.w;
         this.css.pixelHeight = this.h;
         }
      else
         {
         this.css.setAttribute("width",this.w,"false");
         this.css.setAttribute("height",this.h,"false");
         }
      }
*/
   if (me.nc4) 
      {
      this.css.resizeTo(this.b,this.h);
      }
      // !!! evtl spaeter auch getrennt abfragen
   else 
      {
      this.css.resizeTo(this.b,this.h);
      }
   } // function resize

function qeLayerSetZIndex(z)
   {
   this.z = z;
   this.css.zIndex = z;
   }


// layer-Object
// sinn: die begrifflichkeiten gleichschalten zwischen
//       den verschiedenen versionen der browser und
//       natuerlich nc + ie 

function qeLayer( name )
   {
   this.eb = name + "u";
   
   if (me.nc4)
      {
      this.css      = document.layers[this.eb];
      this.document = this.css.document;
      this.elm      = this.css;
      this.bgColor  = this.css.bgColor;
      this.ftWeight = this.elm.fontWeight; // !!! neu fuer mouseOver-fettSchrift
      this.ftColor  = this.elm.color; // !!! neu fuer mouseOver-colorSchrift
      this.bdTWid   = this.elm.borderTopWidth; // !!! neu fur rahmendicke oben
      this.bdRWid   = this.elm.borderRightWidth; // !!! neu fuer rahmendicke rechts
      this.bdBWid   = this.elm.borderBottomWidth; // !!! neu fuer rahmendicke unten
      this.bdLWid   = this.elm.borderLeftWidth; // !!! neu fuer rahmendicke links     
      this.bdTSty   = this.elm.borderTopStyle; // !!! neu fur rahmenstil oben
      this.bdRSty   = this.elm.borderRightStyle; // !!! neu fuer rahmenstil rechts
      this.bdBSty   = this.elm.borderBottomStyle; // !!! neu fuer rahmenstil unten
      this.bdLSty   = this.elm.borderLeftStyle; // !!! neu fuer rahmenstil links
      this.bdTCol   = this.elm.borderTopColor; // !!! neu fur rahmenfarbe oben
      this.bdRCol   = this.elm.borderRightColor; // !!! neu fuer rahmenfarbe rechts
      this.bdBCol   = this.elm.borderBottomColor; // !!! neu fuer rahmenfarbe unten
      this.bdLCol   = this.elm.borderLeftColor; // !!! neu fuer rahmenfarbe links
      
      this.x        = this.css.left;
      this.y        = this.css.top;
      this.b        = this.css.clip.width;
      this.h        = this.css.clip.height;
      }
   else
      {      
      if ( me.w3c ) // ist gleich: me.nc6 || me.nc7 || me.iex6 || me.op7
         {
         this.css      = eval ( document.getElementById( this.eb ).style );
         this.document = document;
         this.elm      = document.getElementById( this.eb );
         }
         
      if ( me.iex && !me.w3c )
         {
         this.css       = document.all[this.eb].style;
         this.document  = document;
         this.elm       = document.all[this.eb];
         }
       
      // uebereinstimmungen mit w3cDOM
      this.bgColor  = this.css.backgroundColor;
      this.ftWeight = this.css.fontWeight;   //!!! neu fuer mouseOver-fettSchrift
      this.ftColor  = this.css.color;        //!!! neu fuer mouseOver-colorSchrift
      this.bdTWid   = this.css.borderTopWidth; // !!! neu fur rahmendicke oben
      this.bdRWid   = this.css.borderRightWidth; // !!! neu fuer rahmendicke rechts
      this.bdBWid   = this.css.borderBottomWidth; // !!! neu fuer rahmendicke unten
      this.bdLWid   = this.css.borderLeftWidth; // !!! neu fuer rahmendicke links
      this.bdTSty   = this.css.borderTopStyle; // !!! neu fur rahmenstil oben
      this.bdRSty   = this.css.borderRightStyle; // !!! neu fuer rahmenstil rechts
      this.bdBSty   = this.css.borderBottomStyle; // !!! neu fuer rahmenstil unten
      this.bdLSty   = this.css.borderLeftStyle; // !!! neu fuer rahmenstil links
      this.bdTCol   = this.css.borderTopColor; // !!! neu fur rahmenfarbe oben
      this.bdRCol   = this.css.borderRightColor; // !!! neu fuer rahmenfarbe rechts
      this.bdBCol   = this.css.borderBottomColor; // !!! neu fuer rahmenfarbe unten
      this.bdLCol   = this.css.borderLeftColor; // !!! neu fuer rahmenfarbe links
      this.x        = this.elm.offsetLeft;
      this.y        = this.elm.offsetTop;
      this.b        =  (me.iex4) ?  this.elm.scrollWidth  : this.elm.offsetWidth;
      this.h        =  (me.iex4) ?  this.elm.scrollHeight : this.elm.offsetHeight;
      }
 
   // methoden...
   
   this.setBgColor    = qeLayerSetBgColor;
   this.setFtWeight   = qeLayerSetFtWeight;  // !!! neu fuer mouseOver-fettSchrift
   this.setFtColor    = qeLayerSetFtColor;  // !!! neu fuer mouseOver-colorSchrift
   this.setBdWid      = qeLayerSetBdWid;    // !!! neu fuer mouseover-border-dicke
   this.setBdSty      = qeLayerSetBdSty;    // !!! neu fuer mouseover-border-stil
   this.setBdCol      = qeLayerSetBdCol;    // !!! neu fuer mouseover-border-farbe
   this.resizeTo      = qeLayerResize;
   this.moveTo        = qeLayerMove;
   this.setVisibility = qeLayerSetVisibility;
   this.setZIndex     = qeLayerSetZIndex;
   
   if ( me.nc4 )
      {
      this.elm.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
      }
      
   if ( me.nc6 || me.nc7 ) // !!! neu DOM fuer eventlistener (nicht op6/7 als IE)
   	{
   	this.elm.addEventListener("click", qeClickEff, true);
   	this.elm.addEventListener("mouseover", qeOverEff, true);
   	this.elm.addEventListener("mouseout", qeOutEff, true);
   	}
   else
	   {
	   this.elm.onmouseover =  qeOverEff;
	   this.elm.onmouseout  =  qeOutEff;
	   this.elm.onmouseup   =  qeClickEff;
		}
   } // function qeLayer
  
