// JS help popups, Andrew Daviel TRIUMF September 2002
// Tested only on Netscape 4 so far...
var arg1 ;
function help(topic,width,height,screenx,screeny) {
  if (width == null) width = 800  ; if (height == null) height = 300 ;
  if (screenx== null) screenx = 20 ; if (screeny == null) screeny = 20 ;
  var arg = "width="+width+",height="+height+",toolbar=no,scrollbars=yes,dependent=yes,screenX="+screenx+",screenY="+screeny ;
// if a help window exists, is open, and has the same size as the
// desired window, use it (whereever the user might have dragged it to),
// otherwise, open a new window. If a window is open, but is the wrong
// size, close it first
  if (arg1) {
    if (arg != arg1) {
      if (!helpwin.closed) helpwin.close() ;
      helpwin=window.open("","help_win",arg) ;
    } else {
      if (helpwin.closed) { helpwin=window.open("","help_win",arg) ; }
    }
  } else {
    helpwin=window.open("","help_win",arg) ;
  }
  arg1 = arg ;
  with(helpwin.document) {
    writeln('<!doctype html public "-//w3c//dtd html 4.0 transitional//en">');
    writeln('<html>');
    writeln('<head>');
    writeln('   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
    writeln('   <meta name="GENERATOR" content="Mozilla/4.78 [en] (X11; U; Linux 2.4.9-21 i686) [Netscape]">');
    writeln('   <meta name="Description" content="MUSR Midas help page">');
    writeln('   <title>How_To for MUSR Help</title>');
    writeln('</head>');
    writeln('<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">');
    writeln('<!--  This file is used to generate the help information  (filename.js) needed by filename.help.html');
    writeln('      filename.js is generated by');
    writeln('            mk-jshelp filename.html');
    writeln('     links were generated in links.html renamed to links_filename.html');
    writeln('     To make changes to help information, edit filename.html with  and regen with mk-jshelp');
    writeln('     --><!-- Local Targets are at the end of the file  ... add BACK button after each one ...');
    writeln('         links - open external links in target="new"');
    writeln('     -->');
    writeln('<h1>');
    writeln('TRIUMF MUSR Midas DAQ Help Information for Users</h1>');
    if (topic == 'Introduction') {
      writeln('<h3>Introduction</h3>');
      writeln('A new linux-based&nbsp; system using');
      writeln('<a href="http://ladd00.triumf.ca/~daqweb/doc/midas/html/quickstart.html" target="new">Midas</a>');
      writeln('has been implemented for MUSR data acquistion,&nbsp; replacing the present');
      writeln('VAX-based system.');
      writeln('<br>Currently, systems for TD-MUSR have been installed in all counting');
      writeln('rooms.');
      writeln('<p><i>NOTE: I-MUSR is not yet available under the new system; users of');
      writeln('I-MUSR continue to use the VAX-based system.</i>');
      writeln('<p>All information refers to TD-MUSR only.');
      writeln('<br>&nbsp;');
      writeln('<br>&nbsp;');
   } else if (topic == 'Hardware') {
      writeln('<h3>Hardware</h3>');
      writeln('The following table summarizes the hardware changes made for the new DAQ');
      writeln('system. The VME Clock (TDC) is shown for completeness. Changes are highlighted');
      writeln('in red.');
      writeln('<br>&nbsp;');
      writeln('<br>&nbsp;');
      writeln('<table BORDER COLS=4 WIDTH="100%" NOSAVE >');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center><b><font color="#000000">Old DAQ hardware</font></b></center>');
      writeln('</td>');
      writeln('<td><b><font color="#000000">Remarks</font></b></td>');
      writeln('<td>');
      writeln('<center><b><font color="#FF0000">New </font><font color="#000000">DAQ hardware</font></b></center>');
      writeln('</td>');
      writeln('<td><b><font color="#000000">Remarks</font></b></td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center><font color="#000000">VAX</font></center>');
      writeln('</td>');
      writeln('<td><font color="#000000">host computer (VME) running MODAS DAQ system</font></td>');
      writeln('<td>');
      writeln('<center><font color="#FF0000">Intel pc</font></center>');
      writeln('</td>');
      writeln('<td><font color="#000000">host computer</font><font color="#FF0000"> (linux)');
      writeln('running Midas DAQ system</font></td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center><font color="#000000">CAMAC scalers (e.g. KS3615</font>)</center>');
      writeln('</td>');
      writeln('<td>8 Scaler Channels per module</td>');
      writeln('<td>');
      writeln('<center><font color="#FF0000">VME SIS3801</font></center>');
      writeln('</td>');
      writeln('<td><font color="#FF0000">16 Scaler channels&nbsp;</font></td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>CAMAC IO register</center>');
      writeln('</td>');
      writeln('<td><font color="#FFFFFF">empty</font></td>');
      writeln('<td>');
      writeln('<center><font color="#FF0000">TRIUMF VME IO board</font></center>');
      writeln('</td>');
      writeln('<td><font color="#FF0000">16 Output channels</font>');
      writeln('<br><font color="#FF0000">4 Input channels</font></td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>MVME2305 power pc');
      writeln('<br>(16Mbytes memory)</center>');
      writeln('</td>');
      writeln('<td>cpu running VxWorks acts as the&nbsp; Histogram Memory&nbsp;');
      writeln('<br>Booted from the VAX</td>');
      writeln('<td>');
      writeln('<center>MVME230<font color="#FF0000">6</font> power pc');
      writeln('<br>(<font color="#FF0000">32Mbytes</font> memory)</center>');
      writeln('</td>');
      writeln('<td>cpu running VxWorks acts as a <font color="#FF0000">Midas frontend</font>');
      writeln('and the Histogram Memory.');
      writeln('<br><font color="#FF0000">Booted from the linux pc</font>.</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>MVME162&nbsp;</center>');
      writeln('</td>');
      writeln('<td>cpu VxWorks handles the SlowControls via CAMP.');
      writeln('<br>Booted from ram, loads configuration from the VAX</td>');
      writeln('<td>');
      writeln('<center>MVME162</center>');
      writeln('</td>');
      writeln('<td>cpu running VxWorks handles the SlowControls via CAMP.');
      writeln('<center>Booted from ram, <font color="#FF0000">loads configuration from');
      writeln('the linux pc</font></center>');
      writeln('</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>VME V680 clock (TDC)</center>');
      writeln('</td>');
      writeln('<td>&nbsp;</td>');
      writeln('<td>');
      writeln('<center>VME V680 clock (TDC)</center>');
      writeln('</td>');
      writeln('<td>&nbsp;</td>');
      writeln('</tr>');
      writeln('</table>');
      writeln('<p>More Information:');
      writeln('<ul>');
      writeln('<li>');
      writeln('<a href="../hardware/vme_base_addresses.html" target="new">standard VME');
      writeln('addresses </a>for these modules</li>');
      writeln('</ul>');
   } else if (topic == 'Software') {
      writeln('<h3>Software</h3>');
      writeln('<p><br><i>Note: Since I-MUSR is not yet available under linux, the following');
      writeln('refers only to TD-MUSR.</i>');
      writeln('<p>The former DAQ system (MODAS) is completely replaced by <a href="http://midas.triumf.ca/doc/index.html" target="new">Midas&nbsp;</a>');
      writeln('(now the TRIUMF standard DAQ system), plus custom software written');
      writeln('<br>for the MUSR data acquisition system at TRIUMF.');
      writeln('<p>The most important part&nbsp; (as far as the users are concerned) is');
      writeln('the User Interface, known as the <b>MUSR Run Control</b>.&nbsp; This Tcl');
      writeln('interface has been designed so that users familiar with the old VAX interface');
      writeln('will find little difficulty in adapting to the new interface, since it');
      writeln('has a similar "look and feel"&nbsp; (but otherwise is far superior). The');
      writeln('MUSR Run Control handles all communications between the users and Midas.');
      writeln('Since the users normally interact only with the MUSR Run Control, they');
      writeln('do not require any familiarity with Midas in order to run their experiments.');
      writeln('<p>Other new software components include the <b>frontend program</b> running');
      writeln('in the ppc (the ppc now requires access to the linux pc to boot, instead');
      writeln('of the VAX).');
      writeln('<br>This program has the structure of a standard Midas frontend , which');
      writeln('handles communication with the Midas DAQ running on the host (linux pc).');
      writeln('This communication is over the Ethernet (mostly RPC). The frontend program');
      writeln('also controls the clock (TDC) ,&nbsp; scaler and IO board. It reads data');
      writeln('from the clock, stores it as histograms, and periodically reads the scaler');
      writeln('and sends out the histogram and scaler data to the host where it is reformatted');
      writeln('and stored by the&nbsp;<b> data archiver </b>(mdarc)&nbsp; which saves');
      writeln('the data in the same MUD format as before.');
      writeln('<p>The RCDB (run control data base) used on the VAX to store&nbsp; experimental');
      writeln('parameters including rig and mode data is replaced by the Midas ODB (<b>online');
      writeln('data base)</b>.');
      writeln('<p>The slow control system (<b>CAMP</b>)&nbsp; is unchanged, except that');
      writeln('it loads configuration files from the linux pc instead of the VAX.');
      writeln('<p>The software components most relevent to the users are shown below:');
      writeln('<br>&nbsp;');
      writeln('<table BORDER COLS=3 WIDTH="100%" NOSAVE >');
      writeln('<tr>');
      writeln('<td><b>Description</b></td>');
      writeln('<td><b>program name</b></td>');
      writeln('<td><b>host</b></td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>user interface (MUSR run control)</td>');
      writeln('<td>musrrc</td>');
      writeln('<td>linux pc</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>frontend</td>');
      writeln('<td>fev680</td>');
      writeln('<td>ppc</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>data archiver</td>');
      writeln('<td>mdarc</td>');
      writeln('<td>linux pc</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>configures &amp; checks input parameters</td>');
      writeln('<td>musr_config</td>');
      writeln('<td>linux pc</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>slow controls</td>');
      writeln('<td>camp</td>');
      writeln('<td>mvme162</td>');
      writeln('</tr>');
      writeln('</table>');
   } else if (topic == 'Improvements and Limitations') {
      writeln('<h3>Improvements and Limitations</h3>');
      writeln('The user will notice a huge improvement in response time when using the');
      writeln('new system. Much of this is due to replacing the old, slow VAX by a modern,');
      writeln('powerful linux pc.&nbsp; The histogram memory available is currently 5Mbytes,');
      writeln('currently limited by the Midas software. Users will notice a huge improvement');
      writeln('in the time needed to save a large data file.');
      writeln('<p>I-MUSR is not currently available, therefore users requiring I-MUSR');
      writeln('must continue to use the old VAX system.');
      writeln('<br>&nbsp;');
   } else if (topic == 'Determine your beamline') {
      writeln('<h3><font color="#000000">Determine your beamline</font></h3>');
      writeln('<font color="#000000">The beamline can be one of m15, m9b, m20, dev</font>');
      writeln('<br><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp; <font size=-1>(Note:');
      writeln('beamline "dev "&nbsp; -- is not a real beamline - used only by software');
      writeln('developers )</font></font>');
      writeln('<br>&nbsp;');
   } else if (topic == 'Log In') {
      writeln('<h3><font color="#000000">Log In</font></h3>');
      writeln('&nbsp; Log onto the appropriate linux pc for your beamline:');
      writeln('<br>&nbsp;');
      writeln('<center><table BORDER COLS=5 WIDTH="75%" NOSAVE >');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center><b>Beamline&nbsp; or Username</b></center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center><b>Linux pc</b></center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center><b>PowerPC&nbsp;</b>');
      writeln('<br><b>(VxWorks)</b></center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center><b>MVME162</b>');
      writeln('<br><b>(VxWorks)</b></center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center><b>Location</b></center>');
      writeln('</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>m15</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>midm15</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>m15vw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>m15hmvw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>M15 counting room</center>');
      writeln('</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>m9b</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>midm9b</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>m9bvw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>m9bhmvw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>M9B counting room</center>');
      writeln('</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>m20</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>midm20</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>m20vw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>m20hmvw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>M20 counting room</center>');
      writeln('</td>');
      writeln('</tr>');
      writeln('<tr>');
      writeln('<td>');
      writeln('<center>dev</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>dasdevpc</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>devvw&nbsp;</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>devhmvw</center>');
      writeln('</td>');
      writeln('<td>');
      writeln('<center>DAQ office</center>');
      writeln('</td>');
      writeln('</tr>');
      writeln('</table></center>');
      writeln('<p><b><font color="#000000">In the counting room:</font></b>');
      writeln('<ul>');
      writeln('<li>');
      writeln('<font color="#000000">Find the consol of the linux pc</font></li>');
      writeln('<br><font color="#000000">(Caution: there may be more than one linux pc');
      writeln('in each counting room !)</font>');
      writeln('<br>&nbsp;');
      writeln('<li>');
      writeln('<font color="#000000">If nobody is logged on the consol:</font></li>');
      writeln('<br><font color="#000000">consol&nbsp; shows a large login banner, with');
      writeln('spaces for Username and Password. Type your beamline and password.</font>');
      writeln('<br><font color="#000000">&nbsp;&nbsp;&nbsp; e.g.</font>');
      writeln('<ul><font color="#000000">&nbsp;&nbsp;&nbsp; Username:&nbsp; m15</font>');
      writeln('<br><font color="#000000">&nbsp;&nbsp;&nbsp; Password :&nbsp;&nbsp; xxxxxxxx&nbsp;&nbsp;&nbsp;');
      writeln('(enter the correct password)</font></ul>');
      writeln('<li>');
      writeln('<font color="#000000">If a user is already logged on the consol:</font></li>');
      writeln('<ul>');
      writeln('<li>');
      writeln('<font color="#000000"><a href="how_to.html#To open an x-term window">Open an x-term</a>');
      writeln('window, and type <i>whoami</i>&nbsp; to find out who is logged in.</font></li>');
      writeln('<li>');
      writeln('<font color="#000000">If some other user is already logged in, close any');
      writeln('graphics windows first (such asNetscape ) as these can prevent the logout');
      writeln('from proceeding, and&nbsp; <a href="how_to.html#To Log out">log the other user out</a>.</font></li>');
      writeln('<li>');
      writeln('<font color="#000000">Then log in as above.</font></li>');
      writeln('</ul>');
      writeln('</ul>');
      writeln('<p><br><font color="#000000">NOTES:</font>');
      writeln('<ol>');
      writeln('<li>');
      writeln('<font color="#000000">Experiments can of course be controlled and accessed');
      writeln('over the network. Although this is very convenient, caution must be exercised');
      writeln('to avoid problems. For this reason, it is usual to set up the DAQ system');
      writeln('in the counting rooms at the consol.</font></li>');
      writeln('<li>');
      writeln('<font color="#000000">Each beamline account only exists on the appropriate');
      writeln('linux pc - e.g. it is not possible to log onto midm9b as m20.</font></li>');
      writeln('</ol>');
   } else if (topic == 'Kill All DAQ tasks') {
      writeln('<h3>Kill All DAQ tasks</h3>');
      writeln('If restarting the DAQ, or starting from scratch, make sure no data acquisition');
      writeln('tasks are running by executing the script <i><font color="#009900">kill-all');
      writeln('</font></i>.');
      writeln('<br>&nbsp;');
      writeln('<p>Type (in an <a href="how_to.html#To open an x-term window">xterm window</a>)');
      writeln('<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#009900">kill-all</font>');
      writeln('<p><font color="#000000">Issuing this command kills all DAQ processes and');
      writeln('deletes all windows that were running DAQ processes.</font>');
      writeln('<p><font size=-1>Note: the Seyon Terminal Emulator window&nbsp; is not');
      writeln('included in kill-all.</font><!-- This section is duplicated');
      writeln('  1.  here to be accessed by how_to.help.html');
      writeln('  2.  at eof for internal link with a BACK button');
      writeln('  -->');
   } else if (topic == 'Check Blue Switch Box') {
      writeln('<h3>Check Blue Switch Box</h3>');
      writeln('Make sure that the blue switch box (located on top of or adjacent to the');
      writeln('linux cpu box) is <b>switched to the ppc </b>and NOT to the camp MVME module,');
      writeln('<br>e.g. for beamline <font color="#993399">M15,</font> the switch must');
      writeln('be in position for <font color="#CC33CC">m15hmvw</font> NOT m15vw.');
      writeln('<p>The MUSR Run Control will use telnet to access the frontend (ppc) if');
      writeln('the switch&nbsp; is incorrectly positioned.');
   } else if (topic == 'Start All DAQ tasks') {
      writeln('<h3><font color="#000000">Start All DAQ tasks</font></h3>');
      writeln('<p><br><font color="#000000">Start the data acquisition tasks by typing');
      writeln('(in an<a href="how_to.html#To open an x-term window"> xterm window</a>):</font>');
      writeln('<p><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#009900">start-all</font>');
      writeln('<p><font color="#000000">Issuing this command automatically starts all');
      writeln('DAQ processes EXCEPT the frontend (ppc).</font>');
      writeln('<br>&nbsp;');
   } else if (topic == 'Start the MUSR Run Control') {
      writeln('<h3><font color="#000000">Start the MUSR Run Control</font></h3>');
      writeln('<font color="#000000">The MUSR Run Control is started automatically by');
      writeln('</font><font color="#009900">start-all.</font>');
      writeln('<p><font color="#000000">If it is not started, type</font>');
      writeln('<blockquote><font color="#009900">td</font></blockquote>');
      writeln('<font color="#000000">in an <a href="how_to.html#To open an x-term window">xterm window</a>.</font>');
      writeln('<br>&nbsp;');
   } else if (topic == 'Start the Front End') {
      writeln('<h3><font color="#000000">Start the Front End</font></h3>');
      writeln('<b><font color="#000000">Check the <a href="how_to.html#Check Blue Switch Box">blue');
      writeln('switch box </a>is set in the correct position for the ppc!</font></b>');
      writeln('<p><font color="#000000">The frontend (ppc) program is started (or restarted)');
      writeln('via a reboot. This may be done as follows:</font>');
      writeln('<ul>');
      writeln('<li>');
      writeln('<font color="#993399">either from the Musr Run Control</font><font color="#000000">in');
      writeln('one of two ways:</font></li>');
      writeln('</ul>');
      writeln('<ul>');
      writeln('<ul>');
      writeln('<li>');
      writeln('<b><font color="#000000">Via "Restart Front-End"Alert Box</font></b></li>');
      writeln('<br>If the following Alert Box is displayed,&nbsp; user should click on');
      writeln('the "<b><font face="Arial,Helvetica">OK</font></b>" button:');
      writeln('<p><img SRC="restartFE.png" ALT="[Image of Alert Box: FrontEnd processor appears to be gone!   Reboot the devhmvw computers?]" ></ul>');
      writeln('<br>&nbsp;');
      writeln('<ul>');
      writeln('<li>');
      writeln('<b><font color="#000000">Via the HM Utilities Menu</font></b></li>');
      writeln('<br>On main page, click on "<b><font face="Arial,Helvetica">Extras ...VME');
      writeln('HM Utility</font></b>" to get the HM utility menu, then click on the button');
      writeln('"<b><font face="Arial,Helvetica">Reboot PPC</font></b>".');
      writeln('<p><img SRC="HMutility.png" ALT="[Image of HM utility Menu]" >');
      writeln('<ul>&nbsp;</ul>');
      writeln('In either case, you should see the following display:');
      writeln('<br>&nbsp;');
      writeln('<ul><img SRC="rebootFE.png" ALT="[Image of Reboot HMVW window]" ></ul>');
      writeln('</ul>');
      writeln('<li>');
      writeln('<font color="#993399">or reboot using the "seyon" serial window:</font></li>');
      writeln('<br>&nbsp;');
      writeln('<ul>');
      writeln('<li>');
      writeln('Check the <a href="how_to.html#Check Blue Switch Box">blue switch box</a> is set in');
      writeln('the correct position for the ppc</li>');
      writeln('<li>');
      writeln('In the seyon serial port window type</li>');
      writeln('<ul><font color="#009900">reboot</font></ul>');
      writeln('<li>');
      writeln('Wait until the ppc has gone through the boot-up procedure</li>');
      writeln('</ul>');
      writeln('<br>&nbsp;');
      writeln('<li>');
      writeln('<font color="#993399">or via a hardware reboot:</font></li>');
      writeln('<br>If the ppc does not successfully reboot via one of the above methods,');
      writeln('a hardware reboot can be performed,');
      writeln('<ul>');
      writeln('<li>');
      writeln('either by pressing the reset button "RST"&nbsp; on the front panel of the');
      writeln('ppc</li>');
      writeln('<li>');
      writeln('or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by cycling the power on the');
      writeln('VME crate.</li>');
      writeln('</ul>');
      writeln('<p><br>NOTE: This also causes the CAMP MVME162 to reboot.</ul>');
   } else if (topic == 'Select the Run Parameters') {
      writeln('<h3>Select the Run Parameters</h3>');
      writeln('<ul>');
      writeln('<li>');
      writeln('To review the run parameters, on the MUSR Run Control main page,</li>');
      writeln('<br>click on the&nbsp; "<b>Show</b>" button, then on&nbsp; "<b>Mode</b>"');
      writeln('or "<b>Rig (hardware)</b>"');
      writeln('<br>&nbsp;');
      writeln('<li>');
      writeln('To change the run parameters,</li>');
      writeln('<br>click on&nbsp; the&nbsp; "<b>Change</b>" button, then on&nbsp; "<b>Mode</b>"');
      writeln('or "<b>Rig (hardware)</b>"</ul>');
      writeln('The type of run (test/real) may also be changed using the "<b>Change</b>"');
      writeln('button.');
   } else if (topic == 'To Start a Run') {
      writeln('<h3>To Start a Run</h3>');
      writeln('<p><br>Click on the "<b>Run</b>" button, then on "<b>Begin Run</b>" on');
      writeln('the MUSR Run Control main page.');
      writeln('<p>Note: you should have previously reviewed the RIG and MODE parameters.');
   } else if (topic == 'To Stop a Run') {
      writeln('<h3>To Stop a Run</h3>');
      writeln('Click on the "<b>Run</b>" button, then on "<b>End Run</b>" on the MUSR');
      writeln('Run Control main page.');
      writeln('<br>&nbsp;');
   } else if (topic == 'Rebooting the linux computer') {
      writeln('<h3>Rebooting the linux computer</h3>');
      writeln('The linux computers are very reliable, and it is very rare to need to reboot.');
      writeln('It is not a VAX, nor&nbsp; is it running Windows!');
      writeln('<p>&nbsp;<b>Routine problems with the DAQ cannot be fixed by rebooting');
      writeln('the linux pc</b>.');
      writeln('<br>If <font color="#009900">start-all</font> followed by <font color="#009900">kill-all');
      writeln('</font>does');
      writeln('not fix the problem, please consult a DAQ expert rather than rebooting.&nbsp;<!-- TROUBLESHOOTING  --->');
   } else if (topic == 'MVME console window is not responding') {
      writeln('<h3>MVME console window is not responding</h3>');
      writeln('Recheck the <a href="how_to.html#To Access the ppc/mvme Console Window">procedure');
      writeln('to access the seyon mvme console window</a>.');
      writeln('<p><font color="#000000">Only ONE seyon session can be run successfully');
      writeln('for each linux pc. Starting a second session unfortunately does not result');
      writeln('in error messages, but in strange behaviour.</font>');
      writeln('<p><font color="#000000">Each seyon session results in the following lines');
      writeln('from ps:</font>');
      writeln('<blockquote><font color="#009900">ps -auwx | grep seyon</font>');
      writeln('<br><font color="#000000">root&nbsp;&nbsp;&nbsp;&nbsp; 23096&nbsp; 0.3&nbsp;');
      writeln('0.8&nbsp; 4412 2088 pts/4&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp; 13:03&nbsp;&nbsp;');
      writeln('0:00 seyon-emu -name Seyon -T Seyon Terminal Emulator -n Terminal -e seyon</font>');
      writeln('<br><font color="#000000">root&nbsp;&nbsp;&nbsp;&nbsp; 23098&nbsp; 0.0&nbsp;');
      writeln('0.6&nbsp; 3460 1776 pts/13&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp; 13:03&nbsp;&nbsp;');
      writeln('0:00 seyon -noemulator</font>');
      writeln('<br><font color="#000000">root&nbsp;&nbsp;&nbsp;&nbsp; 23100&nbsp; 0.0&nbsp;');
      writeln('0.6&nbsp; 3456 1768 pts/13&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp; 13:03&nbsp;&nbsp;');
      writeln('0:00 seyon -noemulator</font>');
      writeln('<br><font color="#000000">root&nbsp;&nbsp;&nbsp;&nbsp; 23101&nbsp; 0.0&nbsp;');
      writeln('0.6&nbsp; 3456 1768 pts/13&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp; 13:03&nbsp;&nbsp;');
      writeln('0:00 seyon -noemulator</font></blockquote>');
      writeln('<p><br><font color="#000000">Since <b>seyon is run as root</b>, only the');
      writeln('superuser can kill the session if started by another user. Therefore, during');
      writeln('the beam period a seyon session&nbsp; should only be started as the beamline');
      writeln('user at the consol.</font>');
      writeln('<p><font color="#000000">Even if another user does have control of the');
      writeln('seyon session,&nbsp; you can&nbsp; still access the frontend using telnet,');
      writeln('e.g. for M15</font>');
      writeln('<blockquote><font color="#009900">telnet m15hmvw</font></blockquote>');
      writeln('<font color="#000000">Telnet takes control from the seyon MVME console');
      writeln('window until either the telnet session is terminated (e.g. by logout) or');
      writeln('the frontend is rebooted.&nbsp; However, the MUSR Run Control may fail');
      writeln('trying to automatically reboot the ppc.</font>');
   } else if (topic == 'Frontend will not reboot') {
      writeln('<h3>Frontend will not reboot</h3>');
      writeln('You will likely see a display from the MUSR Run Control as follows:');
      writeln('<p><img SRC="rebootFEproblems.png" >');
      writeln('<br>&nbsp;');
      writeln('<br>&nbsp;');
      writeln('<h4>');
      writeln('Recovery Procedure:</h4>');
      writeln('<ul>');
      writeln('<li>');
      writeln('Check the <a href="how_to.html#Check Blue Switch Box">blue box switch position</a>.</li>');
      writeln('<li>');
      writeln('Find the <a href="how_to.html#To Access the ppc/mvme Console Window">MVME');
      writeln('console window</a> .</li>');
      writeln('<li>');
      writeln('Press carriage-return ...</li>');
      writeln('<ul>');
      writeln('<li>');
      writeln('No response</li>');
      writeln('<br>If no prompt appears, check VME crate is powered-up, and/or connections');
      writeln('to/from the blue switch box.');
      writeln('<br>&nbsp;');
      writeln('<li>');
      writeln('The MVME console window displays a prompt "->"</li>');
      writeln('<br>Type "reboot", i.e.');
      writeln('<br><b><font color="#000000">-></font></b><font color="#009900"> reboot</font>');
      writeln('<br>&nbsp;');
      writeln('<li>');
      writeln('MVME console window displays a prompt:&nbsp; [VxWorks Boot]</li>');
      writeln('<br>In the MVME console window, type&nbsp; "@" , i.e.');
      writeln('<br><b><font color="#000000">[VxWorks Boot]</font></b><font color="#009900">');
      writeln('@</font>');
      writeln('<br>&nbsp;');
      writeln('<ul>&nbsp;</ul>');
      writeln('</ul>');
      writeln('<li>');
      writeln('If the MVME&nbsp; still does not&nbsp; go through its boot procedure:</li>');
      writeln('<ul>Press the front-panet reset button on the MVME2306 module in the VME');
      writeln('crate.');
      writeln('<br>(Note - this does a hardware reset that also reboots the CAMP module).</ul>');
      writeln('<li>');
      writeln('If this does not work, cycle the power on the VME crate.</li>');
      writeln('</ul>');
      writeln('<p><br><!-- Local Targets ... add BACK button after each one ... -->');
      writeln('<br>&nbsp;');
      writeln('<p><a NAME="To Access the ppc/mvme Console Window"></a><font color="#FFFFFF">invisible');
      writeln('target 1</font>');
   } else if (topic == 'To Access the ppc/MVME162 Console Window') {
      writeln('<h3>To Access the ppc/MVME162 Console Window</h3>');
      writeln('The serial (debug) ports on the MVME2306 (powerpc)&nbsp; MVME162 (for CAMP)');
      writeln('may be displayed on the linux pc.&nbsp; Both ports are connected via a');
      writeln('<a hrefhow="#Check Blue Switch Box">blue');
      writeln('switch box </a>to one of the linux computer"s input ports.');
      writeln('<br>NOTE: Only one of the two VME cpu serial ports can be viewed at a time');
      writeln('in the Console Window depending on the switch position - make sure the');
      writeln('switch is in the correct position!');
      writeln('<p>A program called "seyon" is used to display the console window. The');
      writeln('MUSR Run Control automatically starts the seyon window.');
      writeln('<p>If "seyon" is already running, it appears as an icon at the bottom of');
      writeln('the screen:');
      writeln('<p><img SRC="seyon.png" ALT="[Image of seyon icon]" >');
      writeln('<p>Right-click on this, and select "Seyon Terminal Emulator".');
      writeln('<p>If "seyon" is not running, it can be started:');
      writeln('<ul>');
      writeln('<li>');
      writeln('<b><font color="#000000">via the HM Utilities Menu</font></b></li>');
      writeln('<br>On main page, click on Extras ...VME HM Utility to get the HM utility');
      writeln('menu, then click on the button "<b>HMVW Active Display: Start</b>".');
      writeln('<p><img SRC="HMutility.png" ALT="[Image of HM utility Menu]" >');
      writeln('<br>&nbsp;');
      writeln('<li>');
      writeln('<b>From an xterm window</b>, by typing</li>');
      writeln('<br>&nbsp;');
      writeln('<ul><font color="#009900">seyon &amp;</font></ul>');
      writeln('</ul>');
      writeln('<blockquote><font color="#000000">NOTE: The MUSR Run Control is able to');
      writeln('grab the seyon session if it has been started elsewhere than on the console,');
      writeln('provided the seyon session was started by someone <b>logged on as the beamline');
      writeln('(M15,M9B or M20)</b>. If the seyon session cannot be grabbed,&nbsp; or');
      writeln('the blue box switch is switch to the CAMP MVME162,&nbsp; the MUSR Run Control');
      writeln('will use telnet to send commands to the frontend.</font></blockquote>');
      writeln('<p><br><!--');
      writeln('  add BACK button to return to referring document');
      writeln('--><form><input type="button" value="Back"');
      writeln('onClick="document.location=document.referrer"></form>');
      writeln('<br>&nbsp;');
      writeln('<br>&nbsp;');
      writeln('<br>&nbsp;');
      writeln('<p><a NAME="Check Blue Switch Box"></a><font color="#FFFFFF">invisible');
      writeln('target 2</font>');
   } else if (topic == 'Check Blue Switch Box') {
      writeln('<h3>Check Blue Switch Box</h3>');
      writeln('Make sure that the blue switch box (located on top of or adjacent to the');
      writeln('linux cpu box) is <b>switched to the ppc </b>and NOT to the camp MVME module,');
      writeln('<br>e.g. for beamline <font color="#993399">M15,</font> the switch must');
      writeln('be in position for <font color="#CC33CC">m15hmvw</font> NOT m15vw.');
      writeln('<p>The MUSR Run Control will use telnet to access the frontend (ppc) if');
      writeln('the switch&nbsp; is incorrectly positioned.');
      writeln('<p><!--  add BACK button to return to referring document --><form><input type="button" value="Back"');
      writeln('onClick="document.location=document.referrer"></form>');
      writeln('<p><a NAME="To Log Out"></a><font color="#FFFFFF">invisible target 3</font>');
   } else if (topic == 'To Log out') {
      writeln('<h3>To Log out</h3>');
      writeln('<font color="#000000">If using the consol, to log out click the right hand');
      writeln('mouse button while cursor is not in any window (i.e. click while cursor');
      writeln('is on the (usuallyblue) background).&nbsp; A menu should appear. Select');
      writeln('"logout" by moving the mouse.</font>');
      writeln('<br><!--  add BACK button to return to referring document --><form><input type="button" value="Back"');
      writeln('onClick="document.location=document.referrer"></form>');
      writeln('<p><a NAME="To open an x-term window"></a><font color="#FFFFFF">invisible');
      writeln('target 4</font>');
   } else if (topic == 'To open an x-term window') {
      writeln('<h3><font color="#000000">To open an x-term window</font></h3>');
      writeln('<font color="#000000">Click (left mouse button)&nbsp; the shell symbol</font>');
      writeln('<p><img SRC="shell.png" ><font color="#000000"> at the bottom of the screen.</font><!--');
      writeln('  add BACK button to return to referring document');
      writeln('   --><form><input type="button" value="Back"');
      writeln('onClick="document.location=document.referrer"></form>');
      writeln('</body>');
      writeln('</html>');
            } else {
      writeln('<p>Error - unknown topic ',topic,'<p>');
    }
    writeln('<form><input type="button" onClick="self.close()" value="Dismiss"></form>') ;
    writeln('</body></html>');
// -->
  close() ;
  }
}

