
     if (window.Event) // Only Netscape will have the CAPITAL E.
       document.captureEvents(Event.MOUSEUP); // catch the mouse up event
      
     function getbrowserwidth()  {
       if (navigator.userAgent.indexOf("MSIE") > 0) {
         return(document.body.clientWidth);
         }
        else {
         return window.outerWidth;
        }
     }

     function getbrowserheight() {
       if (navigator.userAgent.indexOf("MSIE") > 0) {
         return(document.body.clientHeight);
       } 
       else {
         return(window.outerHeight);
       }
     }

     function CenterPopup(URL, width, height) {
       // get center of browser window
       var popup = new Object()
       var X = getbrowserwidth() / 2
       var Y = getbrowserheight() / 2

       popup = window.open ( URL, 'PopUp', 
             'scrollbars=no ' +
             'width=' + width + ' ' +
             'height=' + height + ' ' +
             'top=' + (window.screenTop + (Y - (height/2))) + ' ' +
             'left=' + (window.screenLeft + (X - (width/2))) 
             )
     }

     function CenterPopupS(URL, width, height) {
       // get center of browser window
       var popup = new Object()
       var X = getbrowserwidth() / 2
       var Y = getbrowserheight() / 2

       popup = window.open ( URL, 'PopUp', 
             'scrollbars=Yes ' +
             'width=' + width + ' ' +
             'height=' + height + ' ' +
             'top=' + (window.screenTop + (Y - (height/2))) + ' ' +
             'left=' + (window.screenLeft + (X - (width/2))) 
             )
     }

     function nocontextmenu()  // this function only applies to IE4, ignored otherwise.
     {
        event.cancelBubble = true
        event.returnValue = false;
     
        return false;
     }
     
     function norightclick(e) // This function is used by all others
     {
        if (window.Event) // again, IE or NAV?
        {
         if (e.which == 2 || e.which == 3)
          return false;
        }
        else
         if (event.button == 2 || event.button == 3)
         {
          event.cancelBubble = true
          event.returnValue = false;
          return false;
         }
        
     }
     
     document.oncontextmenu = nocontextmenu;  // for IE5+
     document.onmousedown = norightclick;  // for all others
