// tocevents.js
// table of contents menu event handling script
//

with (pMenu)
{
startMenu('mInstructions', true, 100, -20, 300, hInstructions) ;
addItem('\'Page TOC\' links to headings on this page','') ;
addItem('...Clicking Menu items goes to other pages...','','');
addItem('(follow cascaded menus to their headings)','','') ;
addItem('Site Guide summarises pages','siteguide_m.htm','') ;
}

if (!isOp && navigator.userAgent.indexOf('rv:0.')==-1)
{

 tocMenu.showMenu = new Function('mN','menuAnim(this, mN, 10)');
 tocMenu.hideMenu = new Function('mN','menuAnim(this, mN, -10)');
}

if (!isNS4)
{
 pMenu.update(true) ;
 tocMenu.update(true);
}
else
{
 var popOldOL = window.onload;
 window.onload = function()
 {
  if (popOldOL) popOldOL();
  pMenu.update() ;
  tocMenu.update();
 }
}

// the event function here effectively overrides the earlier one in popupmbeamaster.js

var nsWinW = window.innerWidth, nsWinH = window.innerHeight, popOldOR = window.onresize;
window.onresize = function()
{
 if (popOldOR) popOldOR();
 if (isNS4 && (nsWinW!=innerWidth || nsWinH!=innerHeight)) history.go(0);
 pMenu.position();
 tocMenu.position();
}

window.onscroll = function()
{
 pMenu.position();
 tocMenu.position();
}

if (isNS4)
{
 document.captureEvents(Event.CLICK);
 document.onclick = function(evt)
 {
  with (pMenu) if (overI) click(overM, overI);
  with (tocMenu) if (overI) click(overM, overI);
  return document.routeEvent(evt);
 }
}

if (!isIE || isOp)
{
 var nsPX=pageXOffset, nsPY=pageYOffset;
 setInterval('if (nsPX!=pageXOffset || nsPY!=pageYOffset) ' +
 '{ nsPX=pageXOffset; nsPY=pageYOffset; window.onscroll() }', 50);
}

tocMenu.onmouseover = function(mN, iN) { with (this)
{
 // By now, you either have my JS Object Browser script from my site or you need it... try
 // embedding in an IFrame and typing 'pMenu' into its Go To field to see the menu internals.
 // my: added writing messages to status bar as mouseover menu itmes...
 with (menu[mN][iN])
 {if (!type && (href!='') )
 	 window.status = "Click to goto: " + href ;
  else
   if (type=="sm:")
    //if (isVert)
     window.status = "Move cursor " + (menu["root"][0].isVert ? "right" : "down") + " for page section headings: " + text	;

 }
}}

tocMenu.onmouseout = function() { window.status = '' }


-->

































