var disappeardelay=25000;
var vertical_offset="-200px";
var horizontal_offset="-68px";

var ie4=document.all
var ns6=document.getElementById&&!document.all
                   
if (ie4||ns6)
document.write('<div id="showBoxCss" style=\'visibility:hidden; width: 268px; height: 268px; font-size: 1px; background: #3a3a3a; position:absolute; z-index:100;\' onmouseover=showBoxInside() onmouseout=hidetip()></div>')

function getposOffset(what, offsettype){
      var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
      var parentEl=what.offsetParent;
      while (parentEl!=null){
      totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
      parentEl=parentEl.offsetParent;
      }
      return totaloffset;
}


function showhide(obj, e, visible, hidden){
      tipwidth = "150px";
      if (ie4||ns6)
      dropmenuobj.style.left=dropmenuobj.style.top=-500
      if (tipwidth!=""){
      dropmenuobj.widthobj=dropmenuobj.style
      dropmenuobj.widthobj.width=tipwidth
      }
      if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
      obj.visibility=visible
      else if (e.type=="click")
      obj.visibility=hidden
}

function iecompattest(){
      return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
      var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
      if (whichedge=="rightedge"){
      var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
      dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
      if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
      edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
      }
      else{
      var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
      dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
      if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
      edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
      }
      return edgeoffset
}

function showBoxInside() {
      if (window.event) event.cancelBubble=true
      else if (e.stopPropagation) e.stopPropagation()
      clearhidetip()
      dropmenuobj=document.getElementById? document.getElementById("showBoxCss") : showBoxCss
      dropmenuobj.innerHTML=menucontents
      if (ie4||ns6){
      showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
      dropmenuobj.x=getposOffset(obj, "left")
      dropmenuobj.y=getposOffset(obj, "top")
      dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
      dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
      }
}

function showbox() {
    setTimeout("showBoxOn()",2000);
}

function showBoxOn(menucontents, obj, e){
    tipwidth = "150px";
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidetip()
    dropmenuobj=document.getElementById? document.getElementById("showBoxCss") : showBoxCss
    dropmenuobj.innerHTML=menucontents
    
    if (ie4||ns6){
    showhide(dropmenuobj.style, e, "visible", "hidden")
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
    }
}

function hidetip(e){
    if (typeof dropmenuobj!="undefined"){
    if (ie4||ns6)
    dropmenuobj.style.visibility="hidden"
    }
}

function hideBox(){
    if (ie4||ns6)
    delayhide=setTimeout("hidetip()",5000)
}

function clearhidetip(){
    if (typeof delayhide!="undefined")
    clearTimeout(delayhide)

