function lib_getBrowser(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}

var bw = new lib_getBrowser()
var px = bw.ns4||window.opera?"":"px";


function lib_ancPosX(anchorPtr)
{
  if (document.layers)
    return anchorPtr.x;
  else
    if (document.getElementById || document.all)
    {
      var pos = anchorPtr.offsetLeft;
      while (anchorPtr.offsetParent != null)
      {
        anchorPtr = anchorPtr.offsetParent;
        pos += anchorPtr.offsetLeft;
      }
      return pos;
    }
}

function lib_ancPosY(anchorPtr)
{
  if (document.layers)
    return anchorPtr.y;
  else
    if (document.getElementById || document.all)
    {
      var pos = anchorPtr.offsetTop;
      while (anchorPtr.offsetParent != null)
      {
        anchorPtr = anchorPtr.offsetParent;
        pos += anchorPtr.offsetTop;
      }
      return pos;
    }
}

function lib_getPos(ancName)
{
  for (var i = 0; i < document.anchors.length; i++)
  {
    if (document.anchors[i].name == ancName)
    {
      this.x = lib_ancPosX(document.anchors[i]);
      this.y = lib_ancPosY(document.anchors[i]);
      return this;
    }
  }
}

function lib_showLeer(obj)
{
  document.getElementById(obj).style.visibility = "visible";
}

function lib_hideLeer(obj)
{
  document.getElementById(obj).style.visibility = "hidden";
}

function lib_getTop(){
	var gleft=(bw.ns4 || bw.ns6)?parseInt(this.css.top):eval(this.css.pixelTop);
	return gleft;
}

function lib_makeLeer(obj){
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval('document.'+obj):0;
  this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval('document.'+obj):0;
	this.height=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.top=lib_getTop										
	return this
}

function lib_initLeer(obj, anc)
{
  ancPos = new lib_getPos(anc);

  mnLeer = new lib_makeLeer(obj)
  mnLeer.css.left = (ancPos.x+1110)+px
  mnLeer.css.top = (ancPos.y+20)+px
  mnLeer.css.visibility = "hidden"
}

