//------------ popup
    var IE = document.all?true:false
    var tempX = 0
    var tempY = 0
    var tipVis = 0;
    var tip;
    var tip2Vis = 0;
    var tip2;


function initPopup(){
    if (!IE) document.captureEvents(Event.MOUSEMOVE)
    document.onmousemove = getMouseXY;
    tip = document.getElementById('tip');
    tip2 = document.getElementById('tipoff');
}

function showTip(text){
    if(tipVis>0) return;
    if(tip){
        tip.style.display = 'block';
        tip.innerHTML = text;
//		alert(tip.style.left);
        tipVis = 1;
    }
}

function showTip2(text){
    if(tip2Vis>0) return;
    if(tip2){
        tipoff.style.display = 'block';
        tipoff.innerHTML = text;
//		alert(tip.style.left);
        tip2Vis = 1;
    }
}

function hideTip2(){
    if(tip2){
        tipoff.style.display = 'none';
        tip2Vis = 0;
    }
}

function hideTip(){
    if(tip){
        tip.style.display = 'none';
        tipVis = 0;
    }
}

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }
  if(tempX+155>document.body.clientWidth) tempX = document.body.clientWidth-155;
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  //document.Show.MouseX.value = tempX
  //document.Show.MouseY.value = tempY

  if(tip){
    tip.style.left = ''+(tempX-5)+'px';
    tip.style.top = ''+(tempY+15)+'px';
  }

  if(tip2){
    tipoff.style.left = ''+(tempX-5)+'px';
    tipoff.style.top = ''+(tempY+15)+'px';
  }


  return true
}
