// **************************************************************************************************
// Copyright 2005 LHTek, inc
//
// This code is not part of the public domain and may not be used without the express written consent
// of LHTek, Inc. in whole or in part.
//
// version 1.1
//
// **************************************************************************************************

var d = document;
d.doDHTML = 0;
d.versIE = 0;
var objImages = new Object();

if ((! d.cssonly && d.layers) || d.all || d.getElementById)
{
  var vers = navigator.appVersion.split ('MSIE ');
  vers = vers[vers.length - 1];
  d.versIE = parseInt (vers);
  LHTek_DHTML.isMac = navigator.platform.indexOf ('Mac') >= 0;
  LHTek_DHTML.isMacOSX = navigator.platform.indexOf ('Mac OS X') >= 0;
  if (navigator.appVersion.indexOf ('MSIE') < 0 || ! LHTek_DHTML.isMac || d.versIE >= 5)
  {
    d.doDHTML = 1;
    LHTek_DHTML.isOpera = navigator.userAgent.indexOf (' Opera ') >= 0;
    LHTek_DHTML.isKonq = navigator.userAgent.indexOf (' Konqueror') >= 0;
    LHTek_DHTML.Firefox = navigator.userAgent.indexOf("Firefox") >= 0;
  
    initLHTek_DHTML ();
    initToShow ();
    initDelay ();

    d.write ('<style type="text/css">' +
             '.DHTML { visibility: hidden; position: absolute; ' +
             'left: 0; top: 0; margin-right: -15px; margin-bottom: -15px;z-index:499;}' +
             '.DHTMLindent {font-size: xx-small; }<\/style>');
  }
}

function useLayer (id) {
  if (! d.doDHTML || ! d.body.appendChild)
	 return;
   var elem = findObj ('l_' + id);
  if (! elem)
	  return;
  //if (LHTek_DHTML.defs.preDetach)
	  //LHTek_DHTML.defs.preDetach (elem);
  if (elem.parentNode.tagName != 'BODY')
	d.body.appendChild (elem.parentNode.removeChild (elem));
  new LHTek_DHTML (id, 0);
}

function makeLayer (id, title, overImg, outImg) {
  if (! d.doDHTML)
	  return;
  var a = arguments;
  var numsp = new Array;
  numsp.max = new Array;
  var pos = 0;
  numsp.max[0] = 0;
  for (var j = 4; j < a.length; ++j)
  {
    numsp[j] = a[j].length;
    if (numsp[j])
    {
      a[j] = a[j].replace (/^ +/, '');
      numsp[j] -= a[j].length;
      numsp.max[pos] = Math.max (numsp[j], numsp.max[pos]);
    }
    else
    {
      numsp.max[++pos] = 0;
    }
  }
	var DHTMLmenu = LHTek_DHTML.defs;
  //handle the iFrame
  if (! LHTek_DHTML.isMac && ! LHTek_DHTML.isMacOSX && ! LHTek_DHTML.Firefox)
  {
		d.write ('<iframe frameborder=0 id="iframe_' + id + '" style="width:1px;height:1px;position:absolute;top:1;left:1;display:none;z-index:400;Filter:' + DHTMLmenu.filter + ';"></iframe>');
	}
  d.write ('<div id="l_' + id + '" class="DHTML" overImg="' + overImg + '" outImg="' + outImg + '">');
	d.write('<table cellpadding="' + DHTMLmenu.outsideborderpadding + '" cellspacing="0" border="0" bgcolor="' + DHTMLmenu.background + '" bordercolor="' + DHTMLmenu.border + '" style="Filter:' + DHTMLmenu.filter + ';">');
  
  // create an associative array for each button of the in and out images
  objImages[id] = overImg + ";" + outImg;
  
  if (title)
  {
    var titleargs = 'align="center"';
    if (DHTMLmenu.titlebackground)
	    titleargs += ' bgcolor="' + DHTMLmenu.titlebackground + '"';
    d.write ('<tr>' +
    buildCell (title,
    DHTMLmenu.titleclass ? DHTMLmenu.titleclass : DHTMLmenu.useclass,
    titleargs) + '<\/tr>');
  }
  var divBegin = '<tr><td><table width="100%" cellpadding="' + DHTMLmenu.cellpadding + '" cellspacing="0" ' + 'border="0">' + "\n";
  d.write (divBegin);
  pos = 0;
  for (j = 4; j < a.length; ++j)
  {
    if (! a[j])
    {
	    d.write ('<\/table><\/td><\/tr>' + divBegin);
	    ++pos;
	    continue;
    }
    var args = '';
    var args2 = '';
    var i = numsp[j];
    if (i < numsp.max[pos])
      args = 'colspan="' + (numsp.max[pos] - i + 1) + '"';
    if (DHTMLmenu.alignright)
      args += ' align="right"';
    d.write ('<tr onMouseMove="javascript: this.style.backgroundColor=\'' + DHTMLmenu.hoverbackground + '\'" onMouseOut="javascript: this.style.backgroundColor=\'' + DHTMLmenu.background + '\';" style="cursor: hand;">');
    var spaces = '';
    while (i-- > 0)
    {
      //d.write ('<td class="DHTMLindent">&nbsp;&nbsp;<\/td>');
      spaces += '&nbsp;&nbsp;&nbsp;';
    }
    if (j == a.length - 1)
    {
      if(DHTMLmenu.border != "")
      {
        args2 = ' style="border-top: 1px ' + DHTMLmenu.border + ' solid;border-left: 1px ' + DHTMLmenu.border + ' solid;border-right: 1px ' + DHTMLmenu.border + ' solid;border-bottom: 1px ' + DHTMLmenu.border + ' solid;';
      }
    }
    else
    {
      if(DHTMLmenu.border != "")
      {
        args2 = ' style="border-top: 1px ' + DHTMLmenu.border + ' solid;border-left: 1px ' + DHTMLmenu.border + ' solid;border-right: 1px ' + DHTMLmenu.border + ' solid;';
      }
    }
    d.write (buildCell (spaces + a[j], DHTMLmenu.useclass, args + args2, id + '_' + j) + '<\/tr>' + "\n");
  }
  d.write ('<\/table><\/td><\/tr><\/table>')
	d.write ('<\/div>' + "\n");
  new LHTek_DHTML (id, 1);
}

function buildCell (str, fc, args, id) {
  var DHTMLmenu = LHTek_DHTML.defs;
  var retstr = '<td nowrap class="' + fc + '"';
  if (args)
    retstr += ' ' + args;
  //retstr += '">';
  var eqpos = str.indexOf ('=');
  var atpos = str.indexOf ('@');
  var attribPos = str.indexOf ('~');

  var sTexthovercolor = '';
  if (DHTMLmenu.texthovercolor == '')
  {
    sTexthovercolor = DHTMLmenu.textcolor;
  }
  else
  {
    sTexthovercolor = DHTMLmenu.texthovercolor;
  }

  if (eqpos > 0)
  {
    if (atpos > eqpos)
    {
        //retstr += '">';
        retstr += '" onClick="aWindow = window.open(\'' + str.substr (eqpos + 1, atpos - eqpos - 1) + '\', target=\'' + str.substr (atpos + 1, attribPos - atpos - 1) + '\',\'' + str.substr (attribPos + 1, str.length) + '\'); aWindow.focus();" onMouseOver="javascript: document.getElementById(\'a_' + id + '\').style.color=\'' + sTexthovercolor + '\';window.status=document.getElementById(\'a_' + id + '\').href;" onMouseOut="javascript: document.getElementById(\'a_' + id + '\').style.color=\'' + DHTMLmenu.textcolor + '\';window.status=\'\';" style="cursor:pointer;">';
        
        retstr += '<a href="javascript: aWindow = window.open(\'' + str.substr (eqpos + 1, atpos - eqpos - 1) + '\', target=\'' + str.substr (atpos + 1, attribPos - atpos - 1) + '\',\'' + str.substr (attribPos + 1, str.length) + '\'); aWindow.focus();" style="font-family: ' + DHTMLmenu.fontfamily + '; font-size: ' + DHTMLmenu.fontsize + '; font-weight: ' + DHTMLmenu.fontweight + '; text-decoration: ' + DHTMLmenu.textdecoration + '; color: ' + DHTMLmenu.textcolor + '" onMouseOver="javascript: this.style.color=\'' + sTexthovercolor + '\'" onMouseOut="javascript: this.style.color=\'' + DHTMLmenu.textcolor + '\'" id="a_' + id + '" name="a_' + id + '">';
        retstr += str.substr (0, eqpos) + '<\/a>';
        //alert(str.substr (attribPos + 1, str.length));
    }
    else
    {
        //retstr += '">';
        var sLink = str.substr (eqpos + 1);
        retstr += '" onClick="top.location.href=\'' + sLink + '\';" onMouseOver="javascript: document.getElementById(\'a_' + id + '\').style.color=\'' + sTexthovercolor + '\';window.status=document.getElementById(\'a_' + id + '\').href;" onMouseOut="javascript: document.getElementById(\'a_' + id + '\').style.color=\'' + DHTMLmenu.textcolor + '\';window.status=\'\';" style="cursor:pointer;">';
        
        retstr += '<a href="' + str.substr (eqpos + 1) + '" style="font-family: ' + DHTMLmenu.fontfamily + '; font-size: ' + DHTMLmenu.fontsize + '; font-weight: ' + DHTMLmenu.fontweight + '; text-decoration: ' + DHTMLmenu.textdecoration + '; color:' + DHTMLmenu.textcolor + '" onMouseOver="javascript: this.style.color=\'' + sTexthovercolor + '\'" onMouseOut="javascript: this.style.color=\'' + DHTMLmenu.textcolor + '\'" id="a_' + id + '" name="a_' + id + '">';
        retstr += str.substr (0, eqpos) + '<\/a>';
    }
    //alert(sLink.replace('\'','\"'));
  }
  else
    retstr += str;
  onerror = null;
  return retstr + '<\/td>';
}

function positionLayer () {
    var img = this.image;
    this.getObjMetrics (img);
    this.normalizeVars ();
	if (this.menuplacement == 'bottom')
	{
	  if(LHTek_DHTML.isMac)
	  {
	    var xpos = img.menuX;
	    var ypos = img.menuY + img.height + this.vpad + this.positiontop + 185;
	  }
	  else
	  {
	    var xpos = img.menuX + this.hpad;
	    var ypos = img.menuY + img.height + this.vpad + this.positiontop + 2;
	  }
	}
  else if (this.menuplacement == 'top')
	{
	  if(LHTek_DHTML.isMac)
	  {
	    var xpos = img.menuX;
	    var ypos = img.menuY + img.height + this.vpad + this.positiontop - this.lyr.offsetHeight + 526;
	  }
	  else
	  {
	    var xpos = img.menuX + this.hpad;
	    var ypos = img.menuY - this.vpad - this.lyr.offsetHeight - 2;
	  }
	}
  else if (this.menuplacement == 'left')
	{
	  var xpos = img.width + this.hpad;
	  xpos = -this.lyr.offsetWidth - this.hpad;
	  xpos += img.menuX;
	  var ypos = img.menuY + this.vpad + this.positiontop;
	}
	else
	{
    // this.menuplacement == 'right'
    if(LHTek_DHTML.isMac)
	  {
      var xpos = img.width + this.image.offsetLeft + this.hpad - 3;
	    var ypos = img.menuY + img.height + this.vpad + this.positiontop + 194;
	  }
	  else
	  {
      var xpos = img.width + this.image.offsetLeft + this.hpad - 3;
      var ypos = img.menuY + this.vpad + this.positiontop;
	  }
	}
	// handle complex menu positioning
  // Ex: "IMG|m=m;picture|b>b;logo|b<t"
  if (this.position)
  {
    var strs = this.position.split (';');
    for (var i = 0; i < strs.length; ++i)
    {
      var str = strs[i];
      if ((pos = str.search (/[-|]/)) <= 0)
        continue;
	    var direct = str.substr (pos, 1);
	    var obj = img;
	    if (str.substr (0, pos) != 'IMG')
      {
        if (! (obj = findObj (str.substr (0, pos), d)))
          continue;
        this.getObjMetrics (obj);
	    }
	    var posstr = str.substr (pos + 1);
	    var cmp = posstr.search (/[<=>]/);
	    if (cmp <= 0)
        continue;
	    var opos, mpos;
	    if (direct == '-')
      {
        opos = targetPos (posstr.substr (0, cmp), obj.menuX, obj.width);
        mpos = targetPos (posstr.substr (cmp + 1), xpos, this.lyr.offsetWidth);
	    }
      else
      {
        opos = targetPos (posstr.substr (0, cmp ), obj.menuY, obj.height);
        mpos = targetPos (posstr.substr (cmp + 1), ypos, this.lyr.offsetHeight);
	    }
	    var rel = posstr.substr (cmp, 1);
	    if ((rel == '<' && mpos < opos) || (rel == '>' && mpos > opos) || rel == '=')
      {
        if (direct == '-')
          xpos += opos - mpos;
        else
          ypos += opos - mpos;
	    }
    }
  } // if (this.position)
	xpos = posInWindow (xpos, this.lyr.offsetWidth, window.pageXOffset, window.innerWidth);
  ypos = posInWindow (ypos, this.lyr.offsetHeight, window.pageYOffset, window.innerHeight);
  this.moveTo (xpos, ypos);
	if (this.tbl)
    this.lyr.style.clip = 'rect ( 0px ' + this.tbl.offsetWidth + 'px ' +
	this.tbl.offsetHeight + 'px 0px )';
	//handle the iFrame 
  if (! LHTek_DHTML.isMac && ! LHTek_DHTML.isMacOSX && ! LHTek_DHTML.Firefox)
  {
    var iFrame = findObj ('iframe_' + this.id);
    iFrame.style.top = ypos;
    iFrame.style.left = xpos;
    iFrame.style.width = this.tbl.offsetWidth;
    iFrame.style.height = this.tbl.offsetHeight;
    iFrame.style.clip = 'rect ( 0px ' + this.tbl.offsetWidth + 'px ' + this.tbl.offsetHeight + 'px 0px )';
  }
}

function getObjMetricsIE (obj) {
    var oObj = obj;
    oObj.width = obj.offsetWidth || obj.width;
    oObj.height = obj.offsetHeight || obj.height;
    oObj.menuX = oObj.menuY = 0;
    var seenTable = 0;
    if (LHTek_DHTML.isMac && oObj.offsetParent.tagName == 'BODY') {
	if (getInt (oObj.clientLeft) + getInt (oObj.clientTop)) {
	    oObj.menuX = oObj.clientLeft;
	    oObj.menuY = oObj.clientTop;
	} else {
	    oObj.menuX = oObj.offsetLeft;
	    oObj.menuY = oObj.offsetTop;
	}
	return;
    }
    for (; obj; obj = obj.offsetParent) {
	var tag = obj.tagName;
	if (! LHTek_DHTML.noCpos[tag] && (! LHTek_DHTML.isMac || obj != oObj) &&
		! LHTek_DHTML.isOpera) {
	    oObj.menuX += getInt (obj.clientLeft);
	    oObj.menuY += getInt (obj.clientTop);
	}
	var noOent = LHTek_DHTML.noOpos[tag];
	if (! noOent || (noOent < 0 && obj.currentStyle &&
		obj.currentStyle.display != 'block')) {
	    oObj.menuX += getInt (obj.offsetLeft);
	    oObj.menuY += getInt (obj.offsetTop);
	}
	if (LHTek_DHTML.isMac && tag == 'TABLE')
	    if (seenTable++)
		oObj.menuY += getInt (obj.cellSpacing);
    }
}

function getObjMetricsDOM (obj) {
    var oObj = obj;
    obj.width = obj.width || obj.offsetWidth;
    obj.height = obj.height || obj.offsetHeight;
    oObj.menuX = oObj.menuY = 0;
    for (; obj; obj = obj.offsetParent) {
	if (obj.tagName == 'TABLE') {
	    var bord = parseInt (obj.border);
	    if (isNaN (bord)) {
		if (obj.getAttribute ('frame')) {
		    ++oObj.menuX;
		    ++oObj.menuY;
		}
	    } else if (bord > 0) {
		oObj.menuX += bord;
		oObj.menuY += bord;
	    }
	}
	oObj.menuX += obj.offsetLeft;
	oObj.menuY += obj.offsetTop;
    }
}

function getInt (n) {
    n = parseInt (n);
    if (isNaN (n))
	return 0;
    return n;
}

function targetPos (wherestr, start, len) {
    var where = wherestr.substr (0, 1);
    var adj = getInt (wherestr.substr (1));
    if (where == 'l' || where == 't')
	return start + adj;
    if (where == 'r' || where == 'b')
	return start + len + adj;
    return start + len / 2 + adj;
}

function posInWindow (loc, objSize, scroll, winSize) {
    var move = loc + objSize - scroll - winSize;
    move += LHTek_DHTML.nsOffset;
    if (move > 0)
	loc -= move;
    if (loc < scroll)
	loc = scroll;
    return loc;
}

function LHTek_DHTML (id, doclip) {
  this.lyr = findObj ('l_' + id);
  if (! d.all && ! d.getElementById) {
	  this.lyr.captureEvents (Event.MOUSEOUT | Event.MOUSEOVER);
	  this.lyr.bgColor = LHTek_DHTML.defs.background;
  }
  this.lyr.onmouseover = function () {
    LHTek_DHTML.showing.stopdelay ();
    ToShow.stopdelay ();
  };
  this.lyr.onmouseout = function () { mOut () };
  this.id = id;
  if (doclip && this.lyr.children && ! LHTek_DHTML.isMac)
    this.tbl = this.lyr.children[0];
  LHTek_DHTML.lyrs[id] = this;
  for (var a in LHTek_DHTML.defs)
    this[a] = LHTek_DHTML.defs[a];
}

function menuDefs (defs) {
  if (! defs || ! d.doDHTML)
	  return;
  for (var def in defs)
	  LHTek_DHTML.defs[def] = defs[def];
}

function initLHTek_DHTML () {
  LHTek_DHTML.prototype.doHide = function () {
	this.stopdelay ();
	this.realHide ();

  var id = this.lyr.id.substring(2,this.lyr.id.length);
  var tmp = objImages[id].split(";");
  if(tmp[0]!="" && tmp[0]!=null)
    var overImg = tmp[0];
  if(tmp[1]!="" && tmp[1]!=null)
    var outImg = tmp[1];
  if(outImg != "" && outImg != null)
  {
    this.image.src = outImg;
  }

  LHTek_DHTML.showing = null;
  };
	LHTek_DHTML.prototype.doShow = function () {
	if (! this.image && ! (this.image = findObj (this.id)))
	    return;
	this.positionLayer ();

  var id = this.lyr.id.substring(2,this.lyr.id.length);
  var tmp = objImages[id].split(";");
  if(tmp[0]!="" && tmp[0]!=null)
    var overImg = tmp[0];
  if(tmp[1]!="" && tmp[1]!=null)
    var outImg = tmp[1];
  if (! outImg && this.image.tagName == 'IMG')
  {
	  this.outimg = this.image.src;
  }
	else if (overImg && this.image.tagName == 'IMG')
  {
	  this.image.src = overImg;
  }

	this.realShow ();
	LHTek_DHTML.showing = this;
    };
    LHTek_DHTML.prototype.delayCallback = function () {
	if (this == LHTek_DHTML.showing)
	    this.doHide ();
    };
    LHTek_DHTML.prototype.setdelay = function () {
	this.delay = new Delay (this.timeout, this);
    };
    LHTek_DHTML.prototype.stopdelay = function () {
	if (this.delay)
	    this.delay.stop ();
	return this.delay;
    };

    LHTek_DHTML.lyrs = new Object ();
    LHTek_DHTML.defs = {
      background: '#ffffff',
      hoverbackground: '#000000',
      titlebackground: '#333322',
      textcolor: "#333322",
      texthovercolor: "",
      textdecoration: "underline",
      fontfamily: "verdana",
      fontsize: "11",
      fontweight: "bold",
      border: '',
      useclass: 'navlink',
      titleclass: 'barlink',
      filter: '',
      pause: 250,
      timeout: 1000,
      alignright: 0,
      hpad: 2,
      vpad: -2,
      outsideborderpadding: 2,
      cellpadding: 2,
      position: '',
      positiontop: 0,
      menuplacement: 'right'
  }
  LHTek_DHTML.prototype.positionLayer = positionLayer;
  LHTek_DHTML.nsOffset = 0;

  if (d.all && ! LHTek_DHTML.isKonq) {
    LHTek_DHTML.prototype.realHide = function () {
      this.lyr.style.visibility = 'hidden';
      if (! LHTek_DHTML.isMac && ! LHTek_DHTML.isMacOSX && ! LHTek_DHTML.Firefox)
      {
        // handle the iframe
        var iFrame = findObj ('iframe_' + this.lyr.id.substring(2,this.lyr.id.length));
        iFrame.style.display = 'none';
      }
  };
	LHTek_DHTML.prototype.realShow = function () {
	    this.lyr.style.visibility = 'visible';
      if (! LHTek_DHTML.isMac && ! LHTek_DHTML.isMacOSX && ! LHTek_DHTML.Firefox)
      {
        // handle the iframe
        var iFrame = findObj ('iframe_' + this.lyr.id.substring(2,this.lyr.id.length));
        iFrame.style.display = 'block';
      }
	};
	LHTek_DHTML.prototype.getObjMetrics = getObjMetricsIE;
	if (LHTek_DHTML.isOpera)
	    LHTek_DHTML.prototype.normalizeVars = function () {};
	else
	    LHTek_DHTML.prototype.normalizeVars = function () {
		var de = d.documentElement && d.documentElement.clientWidth ?
				d.documentElement : d.body;
		window.innerWidth = de.clientWidth;
		window.innerHeight = de.clientHeight;
		window.pageXOffset = d.body.scrollLeft;
		window.pageYOffset = d.body.scrollTop;
	    };
	LHTek_DHTML.prototype.moveTo = function (x, y) {
	    this.lyr.style.pixelLeft = x;
	    this.lyr.style.pixelTop = y;
	};
	LHTek_DHTML.noCpos = {
	    'BODY': 1,
	    'TABLE': 1
	};
	LHTek_DHTML.noOpos = {};
	if (! LHTek_DHTML.isOpera)
	    LHTek_DHTML.noOpos['A'] = -1;
	if (LHTek_DHTML.isMac && ! LHTek_DHTML.isOpera) {
	    LHTek_DHTML.noOpos = LHTek_DHTML.noCpos;
	    LHTek_DHTML.noCpos = {
		'DIV': 1,
		'TD': 1,
		'TH': 1
	    };
	}
    } else if (d.getElementById) {
	LHTek_DHTML.prototype.realHide = function () {
	    this.lyr.style.visibility =  'hidden';

	};
	LHTek_DHTML.prototype.realShow = function () {
	    this.lyr.style.visibility = 'visible';
	}
	LHTek_DHTML.prototype.getObjMetrics = getObjMetricsDOM;
	LHTek_DHTML.prototype.normalizeVars = function () {};
	LHTek_DHTML.prototype.moveTo = function (x, y) {
	    this.lyr.style.left = x + 'px';
	    this.lyr.style.top = y + 'px';
	};
    } else {
	LHTek_DHTML.prototype.realHide = function () {
	    this.lyr.visibility = 'hide';
	};
	LHTek_DHTML.prototype.realShow = function () {
	    this.lyr.visibility = 'show';
	};
	LHTek_DHTML.prototype.getObjMetrics = function (obj) {
	    obj.menuX = obj.x;
	    obj.menuY = obj.y;
	};
	LHTek_DHTML.prototype.normalizeVars = function () {
	    this.lyr.offsetHeight = this.lyr.clip.bottom;
	    this.lyr.offsetWidth = this.lyr.clip.right;
	};
	LHTek_DHTML.prototype.moveTo = function (x, y) {
	    this.lyr.moveTo (x, y);
	};
	LHTek_DHTML.nsOffset = 16;
    }
}

function ToShow (lyr) {
    if (! lyr || lyr == LHTek_DHTML.showing)
	    return;
    this.lyr = lyr;
    ToShow.stopdelay ();
    ToShow.queued = this;
    this.delay = new Delay (LHTek_DHTML.defs.pause, this);
}

function initToShow () {
    ToShow.stopdelay = function () {
	var q = ToShow.queued;
	if (q) {
	    q.delay.stop ();
	    ToShow.queued = null;
	}
  return q;
    };
    ToShow.prototype.delayCallback = function () {
	ToShow.queued = null;
	if (LHTek_DHTML.showing)
	    LHTek_DHTML.showing.doHide ();
	if (this.lyr)
	    this.lyr.doShow ();
    };
}

function Delay (delay, obj) {
    this.obj = obj;
    var uid = ++Delay.nuid;
    this.timeoutid = setTimeout ('Delay.dispatch (' + uid + ')', delay);
    this.uid = uid;
    Delay.disparr[uid] = this;
}

function initDelay () {
    Delay.prototype.stop = function () {
	clearTimeout (this.timoutid);
	Delay.disparr[this.uid] = 0;
    };
    Delay.dispatch = function (uid) {
	var item = Delay.disparr[uid];
	if (! item)
	    return;
	item.obj.delayCallback ();
	item.stop ();
    };
    Delay.nuid = 0;
    Delay.disparr = new Object;
}

function findObj (n, od) {
    var p, i, x;
    if (! od)
	od = d;
    if ((p = n.indexOf ('?')) > 0 && parent.frames.length) {
	od = parent.frames[n.substring (p + 1)].document;
	n = n.substring (0, p);
    }
    if (! (x = od[n]) && d.all)
	x = od.all[n];
    if (! x && d.getElementById)
	x = d.getElementById (n);
    for (i = 0; ! x && i < od.forms.length; i++)
	x = od.forms[i][n];
    for (i = 0; ! x && od.layers && i < od.layers.length; i++)
	x = findObj (n, od.layers[i].document);
    return x;
}

function mIn (id) {
  if (! d.doDHTML)
  {
	  return;
  }
  var lyr = LHTek_DHTML.lyrs[id];
  if (! lyr)
  {
	  if (findObj ('l_' + id))
    {
	    useLayer (id);
    }
	  lyr = LHTek_DHTML.lyrs[id];
	  if (! lyr)
    {
	    return;
    }
  }
  if (lyr == LHTek_DHTML.showing)
  {
    lyr.stopdelay ();
  }
  else
  {
	  new ToShow (lyr);
  }
}

function mOut () {
  if (! d.doDHTML)
	{
    return;
  }
	var lyr = LHTek_DHTML.showing;
	if (! ToShow.stopdelay () && lyr)
  {
	  lyr.setdelay ();
  }
}

function showObjectTree(obj)
{
  for (a in obj)
  {
    alert(a + ": " + obj[a]);
  }
}