
//
// These functions are for a right click menu.  When the right mouse button is clicked,
// a popp menu shows up to offer other links.
//

//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=0;


function showmenuie5()
   {
   //Find out how close the mouse is to the corner of the window
   var rightedge=document.body.clientWidth-event.clientX;
   var bottomedge=document.body.clientHeight-event.clientY;

   //if the horizontal distance isn't enough to accomodate the width of the context menu
   if (rightedge<ie5menu.offsetWidth)
      //move the horizontal position of the menu to the left by it's width
      ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth;
   else
      //position the horizontal position of the menu where the mouse was clicked
      ie5menu.style.left=document.body.scrollLeft+event.clientX;

   //same concept with the vertical position
   if (bottomedge<ie5menu.offsetHeight)
      ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight;
   else
      ie5menu.style.top=document.body.scrollTop+event.clientY;

   ie5menu.style.visibility="visible";
   return false;
   }

function hidemenuie5()
   {
   ie5menu.style.visibility="hidden";
   }

function highlightie5()
   {
   if (event.srcElement.className=="menuitems")
      {
      event.srcElement.style.backgroundColor="highlight";
      event.srcElement.style.color="white"'
      if (display_url==1)
         window.status=event.srcElement.url;
      }
   }

function lowlightie5()
   {
   if (event.srcElement.className=="menuitems")
      {
      event.srcElement.style.backgroundColor="";
      event.srcElement.style.color="black";
      window.status='';
      }
   }

function jumptoie5()
  {
   if (event.srcElement.className=="menuitems")
      window.location=event.srcElement.url;
   }
