// for right mouse popup
if (document.layers) {
    doc = "document";
    sty = "";
    htm = ".document"; }
else {
    doc = "document.all";
    sty = ".style";
    htm = "";
 }

function defPop() {
   popLyr =   eval(doc + '["rmMenu"]' + sty); 
   popLyr.visibility="hidden";
}
//
var menu;  
var mousex = 0;
var mousey = 0;

function showMenu(evt) {  
 mousex = (document.layers) ? evt.pageX : event.x;
 mousey = (document.layers) ? evt.pageY : event.y;
 mousey += 5;
 mousex -= 75;
 if ( mousex < 0 ) {
    mousex = 10;
  }
  if (document.all) { 
    popLyr.left = mousex;
    popLyr.top = mousey;
    popLyr.visibility = 'visible'; 
    return false; 
  } 
  else if (document.layers) { 
    if (evt.which == 3) { 
      popLyr.left = mousex;
      popLyr.top = mousey;
      popLyr.onmouseout = function (evt) { this.visibility = 'hide'; };
      popLyr.visibility = 'show'; 
      return false; 
    } 
  } 
  return true; 
} 
if (document.all) 
  document.oncontextmenu = showMenu; 
if (document.layers) { 
  document.captureEvents(Event.MOUSEDOWN); 
  document.onmousedown = showMenu; 
}  
