function yg_Browser() {  
  d = document;
  var nav=navigator; this.agt=nav.userAgent.toLowerCase(); this.major = parseInt(nav.appVersion); this.ns=(d.layers); this.dom=(d.getElementById)?1:0; this.ns4up=(this.ns && this.major >=4); this.ns6=(this.agt.indexOf("Netscape6")!=-1); this.op=(window.opera? 1:0); this.ie=(d.all); this.ie5=(d.all&&this.dom); this.fb=(this.agt.indexOf("firebird")!=-1); this.sf=(this.agt.indexOf("safari")!=-1); this.win=((this.agt.indexOf("win")!=-1) || (this.agt.indexOf("16bit")!=-1)); this.mac=(this.agt.indexOf("mac")!=-1); 
}
var oBw = new yg_Browser();
function yg_getW(o) { var w=0; w=(oBw.op)? o.style.pixelWidth:o.offsetWidth; return w; }
function yg_getH(o) { var h=0; h=(oBw.op)? o.style.pixelHeight:o.offsetHeight; return h; }
function yg_getPageX(o) { if (oBw.op) {  var x=0; while(eval(o)) { x+=o.style.pixelLeft; e=o.offsetParent; } return x; } else { var m=(oBw.mac&&oBw.ie)? document.body.leftMargin:0; var x=0; while(eval(o)) { x+=o.offsetLeft; o=o.offsetParent; } return parseInt(x)+parseInt(m) } }
function yg_getPageY(o) { if(oBw.ns) { var y=(o.pageY)? o.pageY:o.y; return y; } else if (oBw.op) {  var y=0; while(eval(o)) { y+=o.style.pixelTop; o=o.offsetParent; } return y; }  else { var m = (oBw.mac&&oBw.ie)? document.body.topMargin:0; var y=0; while(eval(o)) { y+=o.offsetTop; o=o.offsetParent; }  return parseInt(y)+parseInt(m); } }
 
  
    if( document.all ) {
  ;
    } else if( document.getElementById ) {
      document.captureEvents( Event.MOUSEMOVE );
      document.onmousemove = getCoord;
    }

    var mouseX;
    var mouseY;
    
    function getCoord( event ) {
      
      mouseX = event.pageX;
      mouseY = event.pageY;
     
    }

function showNote(index)
{
  trigger = document.getElementById("title_" + index);  
  popup = document.getElementById("note_" + index);  
  
  if (   !(popup == null || popup == undefined)   &&    !(trigger == null || trigger == undefined))
  {
     
     if(mouseX==undefined) {

	popup.style.left = event.clientX-220;
     popup.style.top = yg_getPageY(trigger)+yg_getH(trigger)-50; 

     }

	else {

     popup.style.left = mouseX-220;
     popup.style.top = mouseY-50;

	}

     popup.style.visibility = "visible";
  }

  return false;
}

function hideNote(index)
{
  popup = document.getElementById(index);  
  if (!(popup == null || popup == undefined))
  {
     popup.style.visibility="hidden";
  }

  return false;
}
