//TRINPsite, 56.06.2-66.19.5, JS/BotPart.js for TRINP = www.trinp.org     -->

warnT=false;  // true if warning has been shown before (global var)

function WriteFramSubO()  // until F7="65346" in separate FramSub.js
 {                        // as Write_FramSub()
  var url_S=document.URL.toLowerCase();
//  var LocaTrS="http://www.trinp.org/";
//  var dirI=URL_S.indexOf("trinp")
  var BgColS="";
  var URLColS=' color="#800080" face="Times New Roman"';
  var domainS="www.trinp.org";

//  if (URL_S.indexOf("http://www.")==-1) LocaTrS=URL_S.substring(0,dirI-1)+"/TRINP/"
  if (document.URL.indexOf(".HTM")==-1)
   { BgColS=' bgcolor="#800080" background=""';
     URLColS=' color="#00ff00"' };
  if ((url_S.indexOf("http://")>-1) && (!contacT)) domainS="www.xs4all.nl/~ftptr025";

document.write('<table width="600" cellpadding="0" cellspacing="0" border="0" id="FramSub"><tr>');
document.write('  <td width="34%" align="left" valign="top"><table');
document.write('   cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('    <td><small><strong class="FrameFont">&nbsp;</strong></small></td>');
document.write('    <td',BgColS,' class="FrameCell"><small><strong class="FrameFont">&nbsp;<a');

document.write('     href="',PathS,'DNIFound.htm" class="FrameLink">Stichting');
//document.write('     href="',LocaTrS,'DNIFound.htm" class="FrameLink">Stichting');

document.write('     DNI Foundation</a>&nbsp;</strong></small></td>');
document.write('   </tr></table></td>');

document.write('  <td width="32%" align="center" valign="top"><table');
document.write('   cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('    <td><small><strong class="FrameFont">&nbsp;</strong></small></td>');
document.write('    <td',BgColS,' class="FrameCell"><small><strong class="FrameFont">&nbsp;<a');
document.write('     href="',PathS,'Info/Corresp.HTM" class="FrameLink">Correspondence');
document.write('</a>&nbsp;</strong></small></td>');
document.write('   </tr></table></td>');

document.write('  <td width="34%" align="right" valign="top"><table');
document.write('   cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('    <td',BgColS,' class="FrameCell"><font');
document.write(URLColS,'><small><strong class="FrameFont">&nbsp;',domainS,'/&nbsp;</strong></small></font></td>');
document.write('    <td><small><strong class="FrameFont">&nbsp;</strong></small></td>');
document.write('   </tr></table></td>');
document.write('</tr></table>');
document.write('<br />');
 }

function cond_showPicBL(T) { if (BodyObjsT) showPicBL(T) }
function cond_showPicBR(T) { if (BodyObjsT) showPicBR(T) }

function writeLinksTblO(S)
// table with phrase link(s) in the center and L and R picture links
{
  var otherLinkS=S;
  var MapS=
   '<map name="MDocPic" id="MDocPic"><area title="To Main Document"'+
   '  shape="rect" coords="2,2,29,29" href="'+PathS+'MainDoc.htm'+'" />'+
   '</map>';
  var BotPartS=
   '<table width="600" cellpadding="0" cellspacing="0" border="0" id="BotPart"><tr>'+
   ' <td align="right">'+
   '  <a href="'+PathS+'Info/VLP/BotL'+fileC+'.htm'+'" '+
   '   onmouseover="cond_showPicBL(true)" onmouseout="cond_showPicBL(false)" '+
   '   class="PicLink"><img src="'+PathS+'Graf/VLP/IniBotL'+fileC+'.gif'+'"'+
   '   vspace="0" hspace="0" align="top" width="200" height="100" '+
   '   alt=">=<" border="0" /></a></td>'+
   ' <td align="center"><br />'+
   '  <table background="'+PathS+'Graf/Bkgr/HalfTrsp.gif'+'" border="0">'+
   '   <tr><td>'+
   '    <table cellspacing="0" cellpadding="2" border="1"><tr>'+
   '     <td align="center"><font size="-2" color="#404040">'+
   '      <b>TRINPSITE</b><br />'+
   '      <img src="'+PathS+'Graf/Icon/CatButtn.gif" width="31"'+
   '       height="31" usemap="#MDocPic" border="0" /><br />'+
          MapS+
   '      <b>TOP OF TREE</b></font><br />'+
          otherLinkS+
   '     </td>'+
   '    </tr></table>'+
   '  </td></tr></table>'+
   ' </td>'+
   ' <td>'+
   '  <a href="'+PathS+'Info/VLP/BotR'+fileC+'.htm'+'" onmouseover="cond_showPicBR(true)"'+
   '   onmouseout="cond_showPicBR(false)" class="PicLink">'+
   '   <img src="'+PathS+'Graf/VLP/IniBotR'+fileC+'.gif'+'" vspace="0" hspace="0"'+
   '    align="top" width="200" height="100" alt=">=<" border="0" /></a></td>'+
   '</tr></table>';

  document.write(BotPartS);
}


function adjScreenWidO(S)
{
 var widS=S;
 var widN=parseInt(widS);
 var puzzleWidN=1002;  // width of letter tray
   // postulated minimum body width for puzzles (with one inline frame)
 var URL_S=document.URL;
 var I=-1;

 if (widN==hypoResolutioN)
  alert('The body width is already '+hypoResolutioN+' pixels.');
 if (widN>9999)
  { alert('The maximum body width is 9999 pixels: the width will not be changed.');
    widN=hypoResolutioN; widS=widN }
 if (widN<1000) widS="0"+widS;
 if (widN<600)
   { alert('The minimum body width is 600 pixels: the width will not be changed.');
     widN=hypoResolutioN; widS=widN }
  else
   { if (puzzlT && (widN<puzzleWidN))
      { alert('The minimum body width for puzzles is '+puzzleWidN+
              ' (the width of the letter tray)');
        widN=puzzleWidN; widS=puzzleWidN }

     if (widN<displayWidN) displayWidN=widN  // but at least 600px
     I=printWidN+261;  // 640+16+(209+20)+16=901 at least
     if (widN<I) alert('Note that the minimum body width for inline '+
                       'frames at the right is '+I+' pixels') }
 if (widN!=hypoResolutioN)
  {
    URL_S=withoutVarO(URL_S)+"?hypoReS="+widS;
    location.replace(URL_S)
  }
}

function adjPrintWidO(S)
{
 var widS=S;
 var widN=parseInt(widS);
 var URL_S=document.URL;
 var printS="";
 var I=-1;

    if (widN>750)
     { alert('The maximum printing width is 750 pixels: the width will not be changed.');
       widN=hypoResolutioN; widS=widN }
    if (widN<1000) widS="0"+widS;
    if (widN<600)
     { alert('The minimum printing width is 600 pixels: the width will not be changed.');
       widN=hypoResolutioN; widS=widN }
    printWidN=widN;

    if (puzzlT) { widN=widN+402; widS=""+widN }
      // puzzles must have one iframe of at least 350 wide (16+350+20+16=402)
    if (widN!=hypoResolutioN)
     {
      URL_S=withoutVarO(URL_S)+"?prinT=true&hypoReS="+widS;
      location.replace(URL_S)
     }
}

function createDisplOptiO(verS)
{
 var URL_S=document.URL;
 var hypoReS="1024";
 var proposedWidN=1852;  // ideal width: 900+16+(900+20)+16=1852 pixels
 var I=printWidN+252;
 var S="";
 var JS_printS="javascript:window.print()";
 var JS_movS="javascript:Switch_Move('Left');Switch_Move('Right')";
 var JS_alert_screenWidS="javascript:alert('"+
  "You may adjust the hypothetical resolution and window width. "+
  "The hypothetical width of your window may be made smaller or larger "+
  "than that of a complete window for the real resolution of your screen. "+
  "The real width of your window will not be changed. "+
  "Enter the figure and press the button. ";
//  "(If you use a RETURN key instead of the button, the resolution "+
//  "will be based on no more than the first four digits!)\\n\\n";
  S="640-650"; 
  if (Nav4UpT) S="670-720";
  JS_alert_screenWidS+=
  "If you want the (left, main) document to be shown in the middle when "+
  "printing it, you should use a body width of "+S+" pixels "+
  "(without inline frames)";
  if (IE4UpT) JS_alert_screenWidS+=" or one between "+I+" and 1050 pixels "+
                               "(with inline frames)";
  JS_alert_screenWidS+=".\\n\\n"+
  "WARNING: if your system has not been designed to handle a width of "+ 
  "much more than 1000 pixels, loading a page with many inline frames "+
  "(and inline frames of inline frames) may take a very long time! "+
  "Thus, a fast browser may need about 10 minutes to load a 17-frame "+
  "page in a hypothetical screen of 3000 pixels wide, a slow browser "+
  "may take about half an hour to finish such a display.')"
 var JS_alert_printWidS="javascript:alert('"+
  "If you want the (left, main) document to be shown in the middle when "+
  "printing it, you should use a body width of "+S+" pixels "+
  "(without inline frames)";
  if (IE4UpT) JS_alert_printWidS+=" or one between "+I+" and 1050 pixels "+
                               "(with inline frames)";
  JS_alert_printWidS+=". "+
  "On a print, a smaller body width will show the page "+
  "more to the left, and a larger one more to the right. "+
  "In the latter case only the left side of the full-scale page may be "+
  "printed out. "+
  "Enter the figure and press the button for a new printing width.";

  if ((!puzzlT && (hypoResolutioN<751)) ||
      (puzzlT && (hypoResolutioN<1153))) JS_alert_printWidS+= 
  "\\n\\nThe Print Preview of your browser or a trial copy should show "+
  "what your print will look like. If and when you find the width "+
  "selected suitable for printing, you may go directly to the printing "+
  "menu of your browser by clicking: printing. "+
  "(Note that especially the puzzles may be printed by different "+
  "browsers in very different ways, and you are strongly advised to look "+
  "at their Print Preview first before printing these documents!)"; 
  JS_alert_printWidS+="')";
 var JS_alert_iFrS="javascript:alert('"+
  "By default one or more internal frames with a selection of other "+
  "TRINPsite pages will be shown on the right if the real or hypothetical "+
  "window or screen width is large enough. Should you not wish these extra "+
  "pages to be shown then click: left document. "+
  "(If you want them back click: i-frames.)')";
 var JS_alert_movS="javascript:alert('"+
  "Click the word movement to stop or restart the vertical movement "+
  "of the TRINPsite menus on the far left and right of the window. "+
  "(You can also use the MOV button in these menus to stop or restart "+
  "their up and down movements separately.)')";
 var JS_alert_colorS="javascript:alert('"+
  "You may change the background color of the whole body, and sometimes "+
  "one or two other background and/or text colors, by using the color bar "+
  "or one of the color bars to the right of this INFO link. "+
  "More information will follow when you click START/STOP COLORING.')";
 var JS_alert_sizeS="javascript:alert('"+
  "At the top of the left menu there are two symbols "+
  "with which you can change the size of (parts of) the text. "+
  "By clicking on the one to the left you will start reducing most of the "+
  "text step by step, by clicking on the one to the right you will start "+
  "enlarging most of it.')";
 var JS_alert_VV_S="javascript:alert('"+
  "If your page has a (floating) menu on the right, the top of that "+
  "menu contains a VARIVU INFO link, with further information about the "+
  "VariViewing feature, and a START VARIVU link, from where you can "+
  "start VariViewing with the current document (on the left) as the "+
  "first one to be shown in a pop-up window. "+
  "The main index page has a special VARIVIEWING button from where you "+
  "can start as well.')";
 var JS_alert_readWidS="javascript:alert('"+
  "For quiet reading without inline frames, floating menus and suchlike "+
  "click: reading. "+
  "(The standard hypothetical resolution width is 900 pixels for "+
  "reading, and the menus will stay at the top.)')";
 var JS_alert_unavailS=
  "javascript:alert('This option is not available for this page.')"

document.write('<font size="-1" color="#000000">');
 if (IE4UpT && (!IE8UpT)) document.write('<br />');
   // in Ff and IE8 'form' does not skip a line at the end 
document.write('<form name="Form_BotPart">');

 if ((verS>"12345") && (verS!="58111"))
  {
   idealWidthS=2*displayWidN+52; // ...MiN+16+...MiN+20+16
document.write('<a href="',JS_alert_screenWidS,'" class="DisplOpt">Info</a>: ');
document.write('viewing width ');
  if ((hypoResolutioN<windoWidthN) || (hypoResolutioN==proposedWidN))
   proposedWidN=windoWidthN;
document.write('<input type="text" name="hypoReS" value="',proposedWidN,'" size="3">');
document.write('<input type="button" value="&nbsp;" onClick="adjScreenWidO(hypoReS.value)"><br />');
   if (hypoResolutioN<1000) hypoReS="0"+hypoResolutioN;
    else hypoReS=hypoResolutioN;
   I=URL_S.indexOf('hypoReS=');
   if (I>0) URL_S=URL_S.substring(0,I)+URL_S.substring(I+12); 

   if (!puzzlT)  // not for puzzles (which don't have this option)
    {
    if (iFrameT)
      {
document.write('<a href="',JS_alert_iFrS,'" class="DisplOpt">Info</a>: ');
       I=URL_S.indexOf('iFrameT=true');
       if (I>0) URL_S=URL_S.substring(0,I)+URL_S.substring(I+12);
       URL_S=URL_S+"?hypoReS="+hypoReS+"&iFrameT=false";
document.write('reload with <a href="',URL_S,'" class="DisplOpt">left document</a> only<br />')
      }
     else
      {
       if (hypoResolutioN>900)  // min width for inline frames
         {
document.write('<a href="',JS_alert_iFrS,'" class="DisplOpt">Info</a>: ');
          I=URL_S.indexOf('iFrameT=false');
          if (I>0) URL_S=URL_S.substring(0,I)+URL_S.substring(I+13);
          URL_S=URL_S+"?hypoReS="+hypoReS+"&iFrameT=true";
document.write('reload with <a href="',URL_S,'" class="DisplOpt">i-frames</a> on the right<br />')
         }
      } // end (if iFrameT) else 
   }  // end if (!puzzlT)
  }  // end if (verS)
 else
  {
document.write('<font color="#808080">Info: ');
document.write('viewing width ');
document.write('<input type="text" name="hypoReS" value="',proposedWidN,'" size="3">');
document.write('<input type="button" value="&nbsp;" onClick="',JS_alert_unavailS,'"></font><br />');
  }

 if (!prinT && (verS>"12345") && (verS!="58111"))
  {  
document.write('<a href="',JS_alert_movS,'" class="DisplOpt">Info</a>: ');
document.write('stop/start <a href="',JS_movS,'" class="DisplOpt">movement</a> of menus<br />');
  }

 if ((verS=="12345") || (verS>"58110"))  // see Write_BotPart(verS) below
                                 // rainbow colors not in older versions!
  {
document.write('<a href="',JS_alert_colorS,'" class="DisplOpt">Info</a>: ');
document.write('recolor with bar(s) on the right<br />');
  }

 if (!prinT && (verS>"12345") && (verS!="58111"))
  {  // no floating menus in printing mode
document.write('<a href="',JS_alert_sizeS,'" class="DisplOpt">Info</a>: ');
document.write('alter letter size using left menu<br />');
  }

 if (!prinT && (verS>"12345") && (verS!="58111"))
   {  // no floating menus in printing mode
document.write('<a href="',JS_alert_VV_S,'" class="DisplOpt">Info</a>: ');
document.write('start VariVu from right menu<br />');
   }
  else
   {
    if (document.URL.indexOf('index.htm')>0)
     {
document.write('<a href="',JS_alert_VV_S,'" class="DisplOpt">Info</a>: ');
document.write('start VariViewing from <a href="#StVV" class="DisplOpt">button</a><br />');
     }
   }

 if (!readT)
  {
   if ((verS>"12345") && (verS!="58111"))
     {
document.write('<a href="',JS_alert_readWidS,'" class="DisplOpt">Info</a>: ');
      URL_S=withoutVarO(URL_S)+"?readT=true";
document.write('show display for <a href="',URL_S,'" class="DisplOpt">reading</a><br />')
     }
    else
     {
document.write('<font color="#808080">Info: ');
document.write('simplify display for reading</font><br />');
     }
  } 

 if ((verS>"12345") && (verS!="58111"))
   {
document.write('<a href="',JS_alert_printWidS,'" class="DisplOpt">Info</a>: ');

    if (  (printWidN<751) &&  // acceptable width between 600 and 750
        ( ((printWidN==displayWidN) && iFrameT) ||
          ((printWidN==hypoResolutioN) && !iFrameT) )  )
document.write('<a href="',JS_printS,'" class="DisplOpt">printing</a> width ');
     else
document.write('printing width ');

document.write('<input type="text" name="printWidth" value="',printWidN,'" size="2">');
document.write('<input type="button" value="&nbsp;" onClick="adjPrintWidO(printWidth.value)">');
   }
  else
   {
document.write('<font color="#808080">Info: ');
document.write('printing width ');
document.write('<input type="text" name="hypoReS" value="',printWidN,'" size="2">');
document.write('<input type="button" value="&nbsp;" onClick="',JS_alert_unavailS,'"></font>');
   }

document.write('</form>');
document.write('</font>');
}

function windoInfO()
{
 var S4="pen"; var S1="w"+"in"
 var S3=".o"; var S2="do"+"w";

 eval('winfo='+S1+S2+S3+S4+'("","","toolbar=no,width=400,height=418")');
 winfo.document.write("<head><title>INTERACTIVE RAINBOW COLORING</title></head>");
 winfo.document.write("<p align='left'>");
 winfo.document.write("<font color='#fffff0'>");
 winfo.document.write("<b>You can choose a background color for the "+
   "body of this page by clicking on it in the ");
 if (rainbTxtN+rainbBkgN>0) winfo.document.write("lower ");
 winfo.document.write("color bar. ");
 if (rainbBkgN>0)
 { winfo.document.write("And a background color for ");
   if (rainbBkgN==1)
    winfo.document.write("one other 'rainbow background' ");
   if (rainbBkgN>1)
    winfo.document.write(rainbBkgN+" other 'rainbow backgrounds' ");
   winfo.document.write("by clicking on it in the ");
   if (rainbTxtN==0) winfo.document.write(" upper color bar. ");
    else winfo.document.write(" color bar in the middle. ")
 }
 if (rainbTxtN>0)
 { winfo.document.write("And a text color for the ");
   if (rainbTxtN>1) winfo.document.write(rainbTxtN," ");
   winfo.document.write("'rainbow text");
   if (rainbTxtN>1) winfo.document.write("s");
   winfo.document.write("' by clicking on it in the upper color bar. ");
 }
 winfo.document.write("Each color will remain the same then. If you want "+
   "to see a gradual change of ");
 if (rainbTxtN==0)
   { if (rainbBkgN==0) winfo.document.write("the body background color, ");
      else winfo.document.write("background <nobr>color(s),</nobr> ") }
  else winfo.document.write("background and text colors, ");
 winfo.document.write("start the rainbow presentation. However, if you "+
   "are on-line, this way of viewing may cause a problem.</b>");
 if (IE4UpT)
  {
 winfo.document.write("<br />If the backgrounds keep on blinking, you "+
   "should alter your browser settings in the following way: click the "+
   "'Tools' menu, and then 'Internet Options'; click 'General', and then "+
   "'Settings'. ");
 winfo.document.write("Under 'Check for newer versions of stored pages' "+
   "you should select 'Automatically', the default setting.<br />"); 
 winfo.document.write("<small>(By selecting 'Every visit to a page' "+
   "your browser will check for a newer version of ANY file, also "+
   "pictures, every 'second' a change is made. As a result the "+
   "background pictures will be refreshed almost continuously, which is "+
   "an uncomfortable, unintended effect. Off-line this problem does not "+
   "occur.)</small>");
  }
 winfo.document.write("<br />"); // for last line in Netscape
 winfo.document.write("</font>");
 winfo.document.write("</p>");
 winfo.document.bgColor="#000000";  // at the end for Netscape
}

function switchRainbO()
{
 var queS='Press OK to stop the color change(s).'

 if (rainbowStarT)
   { if (!rainbowT) queS='Press OK to continue the color change(s).' }
  else
   { queS='Press OK to (re)start the rainbow presentation.\n';
     queS+='(To stop the color change(s) use the same double link.)' };
 queS+='\nPress CANCEL if you want no rainbow presentation.';
 if (rainbowStarT || warnT)
  { if (window.confirm(queS)) { rainbowStarT=true; rainbowT=!rainbowT }
     else  { rainbowStarT=false; rainbowT=true }
  }
  else
  { windoInfO(); warnT=true;
    if (winfo.confirm(queS)) { rainbowStarT=true; rainbowT=!rainbowT }
     else  { rainbowStarT=false; rainbowT=true }
    winfo.close()
  }
}

function OneLink(T)  // 'START/STOP' and 'COLORING' will appear as one link
{
 var docS="document.all."; var stlS=".style.";  // for IE

 if (Nav5UpT)  // for Netscape 6 and 7
  { docS = "document.getElementById('"; stlS = "').style." }

 if (T)
  { eval(docS+'RainbowL'+stlS+'background="black"');
    eval(docS+'RainbowL'+stlS+'color="white"');
    eval(docS+'RainbowR'+stlS+'background="black"');
    eval(docS+'RainbowR'+stlS+'color="white"') }
  else
  { eval(docS+'RainbowL'+stlS+'background="transparent"');
    eval(docS+'RainbowL'+stlS+'color="#404040"');
    eval(docS+'RainbowR'+stlS+'background="transparent"');
    eval(docS+'RainbowR'+stlS+'color="#404040"') }
}

function changetoColO(S)
{
 var Ch=S.charAt(0);
 var colorN=bodcolorN; var prevN=bodcolorN;

 S=S.substring(4); colorN=parseInt(S);
 if (Ch=='T') { prevN=txtcolorN; txtcolorN=colorN }
 if (Ch=='G') { prevN=bkgcolorN; bkgcolorN=colorN }
 if (Ch=='B') { bodcolorN=colorN }
 changeColO(Ch,prevN); rainbowT=false
}

function switchLightO() { bkgLighT=!bkgLighT }

function Write_BotPart(S)
{
 var verS=S.substring(0,5);
   // from F7="65346" string contains more than date only
 var colorN=0;
 var colorS="#ffffff";
 var URL_S=document.URL;
 var yearN1=59; yearN2=59; var weekN1=1; var weekN2=1;
 var now_excepT = (URL_S.indexOf('MNI.htm')+
            URL_S.indexOf('MNI/C.htm')+URL_S.indexOf('MNI/MainDoc.htm')+
            URL_S.indexOf('VocAll.htm')+4>0 );
        // documents excepted from immediate rainbow presentation, altho new 
 var alw_excepT = ( URL_S.indexOf('indLeft.htm')+
                    URL_S.indexOf('VocALeft.htm')+2>0 );
        // special files always excepted from rainbow presentation
 var valuDocT = (URL_S.indexOf('Valu')>0);  // a value document
 var JS_alert_MVVM_S="javascript:alert('"+
  "Copyright: Machiel Vincent van Mechelen, 65 years after the end of "+
  "the Second World War')";
 var modeS="<a href='"+PathS+"AddNRev/64ASWW.HTM#SEL1' class='DisplOptRev'>";
 var altS1="reading"; var altS2="printing";
 var URL_S1=URL_S;  // def with withoutVarO not possible with all versions!
 var URL_S2=URL_S;  // def with withoutVarO and printWidN not possible here!

 if (verS>"65345") { WriteFramSubO(); writeLinksTblO(S.substring(6)) }
 if (((verS=="12345") || (verS>"58110")) &&
      BodyObjsT && (IE4UpT || Nav5UpT) && (!alw_excepT))
  {
     //  basic and nodal files a different starting color
   if (fileC<'6') colorN=Math.round(3*(colorA.length-1)/4);
    else colorN=Math.round((colorA.length-1)/4);
   if (verS=="12345") colorN=colorA.length-1;  // grey    
   if (valuDocT) colorN=Math.round((colorA.length-1)/2);  // green    
   bodcolorN=colorN; bkgcolorN=colorN; txtcolorN=colorN;
   colorS=colorA[colorN];
   colorS=lighterO(colorS); colorS=lighterO(colorS);
  }

 if (verS<"59011") TopParT=true;
 if ((verS>"12345") && (verS<"59011")) BodyObjsT=true;
 if ((verS=="12345") || (verS>"58110"))  // from F4="58111" format 
// if ((verS=="12345") || (verS>"57451"))
   {
document.write('<br /><br />');
document.write('<table width="100%" bgcolor="',colorS,'" cellspacing="0" '+
 'cellpadding="0" border="1" id="DisplOptTbl"><tr><td align="left">');
  // table A (beg), row A (beg), col A (beg)
document.write('<table width="',displayWidN,'" bgcolor="',colorS+
 '" cellspacing="0" cellpadding="0" border="0"><tr>');
  // table B (beg), row A (beg)
document.write('<td align="left">');  // table B, row A, col A (beg)

    colorS=darkerO(colorA[colorN]);
document.write('<table width="100%" cellspacing="0" cellpadding="2" border="0"><tr>');
  // table C (beg), row A (beg)
document.write("<td align='left' valign='middle'>");  // table C, row A, cell A (beg)
document.write('<font size="+2" color="',colorS,'"><b>DO</b></font><br />');
document.write("<font size='-1' color='#000000'>DISPLAY<br />OPTIONS</font><br />");
document.write('<font size="-2" color="#000000">');
document.write('<a href="',JS_alert_MVVM_S,'" class="DisplOpt">&copy;MVVM<br />65ASWW</a>');
document.write('</font>');
document.write("</td>");  // table C, row A, cell A (end)
document.write('<td width="4"> </td>');  // table C, row A, cell B (beg&end)
document.write('<td align="left" valign="middle">');  // table C, row A, cell C (beg)

    createDisplOptiO(verS)

document.write('</td>');  // table C, row A, cell C (end)
document.write('<td width="4"> </td>');  // table C, row A, cell D (beg&end)
document.write('<td align="left" valign="middle">');  // table C, row A, cell E (beg)

    if (BodyObjsT)
     { if (parent.frames.length==0)
// '|| (parent.frames[0].name!="TRNP_IRight1"))' gives 'denial of access' error
        doStatWindO(verS)  // for special and new formats
     }  // condition reserved for iframes later
   }  // end if ((verS=="12345") || (verS>"57451"))
  else { if (BodyObjsT) StatWind(true) }  // to be phased out

 if ((verS=="12345") || (verS>"58110"))
   {
    if (BodyObjsT && (IE4UpT || Nav5UpT) && !alw_excepT)
     {
document.write('<table cellpadding="0" cellspacing="0"><tr><td align="center">');  // cell table added (beg)

document.write('<table cellpadding="0" cellspacing="0" id="RainbTbl"><tr>');  // table D (beg)

document.write('<td align="center" valign="middle">');

document.write('<a href="javascript:switchRainbO()" onmouseover="OneLink(true)" onmouseout="OneLink(false)" id="RainbowL">');
document.write('&nbsp;START/STOP&nbsp;</a>');

document.write('<table cellpadding="1" cellspacing="0" bgcolor="#202020"><tr><td align="center">');  // table E1 (beg)
document.write('<table cellpadding="1" cellspacing="0" bgcolor="#808080"><tr><td align="center">');  // table F (beg)
document.write('<table cellpadding="0" cellspacing="0" border="0">');  // table G (beg)
  // table rendered correctly with border=1 and colspan=colorA.length+2,
  // incorrectly for border=0 (even tho colspan=colorA.length+2!)

      if (rainbTxtN>0)
       {
document.write('<tr height="8">');
        for (var i=0; i<colorA.length; i++)
         { colorS=colorA[i]; if (bkgLighT) colorS=darkerO(colorS);
           if (i==txtcolorN) colorS="#000000";
document.write('<td width="2" bgcolor=',colorS,' onClick="javascript:changetoColO(id)" id="TCol',i,'"></td>')
         }
document.write('<td width="26" align="right" id="TBarR">TEXT</td>');
document.write('</tr><tr height="1"><td colspan="',colorA.length+1,'"></td></tr>');
       }
      if (rainbBkgN>0)
       {
document.write('<tr height="8">');
        for (i=0; i<colorA.length; i++)
         { colorS=colorA[i]; if (!bkgLighT) colorS=darkerO(colorS);
           if (i==bkgcolorN) colorS="#000000";
document.write('<td width="2" bgcolor=',colorS,' onClick="javascript:changetoColO(id)" id="GCol',i,'"></td>')
         }
document.write('<td width="26" align="right" id="GBarR">BKGR</font></td>');
document.write('</tr><tr height="1"><td colspan="',colorA.length+1,'"></td></tr>');
       }
document.write('<tr height="8">'); 
        for (i=0; i<colorA.length; i++)
         { colorS=colorA[i]; colorS=lighterO(colorS);
           if (i==bodcolorN) colorS="#000000";
document.write('<td width="2" bgcolor=',colorS,' onClick="javascript:changetoColO(id)" id="BCol',i,'"></td>')
         }
document.write('<td width="26" align="right" id="BBarR">BODY</td></tr>');
document.write('</table>');  // table G (end)
document.write('</td></tr></table>');  // table F (end)
document.write('</td></tr></table>');  // table E1 (end)

document.write('<a href="javascript:switchRainbO()" onmouseover="OneLink(true)" onmouseout="OneLink(false)" id="RainbowR">');
document.write('&nbsp;&nbsp;COLORING&nbsp;&nbsp;</a>');

document.write('</td>');

      if (rainbBkgN+rainbTxtN>0)
       {
document.write('</tr><tr><td align="center" colspan="3"><table>');  // table E2 (beg) 
document.write('<tr bgcolor="#c000c0"><td align="center"><font color="#ffffff" '+
 'size="-2"><a href="JavaScript:switchLightO()" id="SwitchLight">'+
 'LIGHT&lt;&gt;DARK</a></font></td></tr>');
document.write('</table></td>');  // table E2 (end)
       }
document.write('</tr></table>');  // table D (end)

      if ((verS>"58111") && !puzzlT)
      {
       colorS=darkerO(colorA[colorN]);
       URL_S1=withoutVarO(URL_S)+"?readT=true";         
       URL_S2=withoutVarO(URL_S)+"?prinT=true&hypoReS=0"+printWidN;
       if (readT) { modeS+="reading</a>"; altS1="surfing"; altS2="printing";
                    URL_S1=withoutVarO(URL_S) }
        else
         { if (prinT) { modeS+="printing</a>"; altS1="surfing"; altS2="reading";
                        URL_S2=URL_S1; URL_S1=withoutVarO(URL_S) }
            else modeS+="surfing</a>"
         }
document.write('<br />');
document.write('<table bgcolor=',colorS,'><tr><td>');
document.write('<font size="-1" face="Courier" color="#fffff0">');
document.write('The display shown is meant for ',modeS,'<br />');
document.write('Other options are <a href="',URL_S1,'" class="DisplOptRev">',altS1,'</a> and ');
document.write('<a href="',URL_S2,'" class="DisplOptRev">',altS2,'</a>');
document.write('</font></td></tr></table>');
      }  // end if (!puzzlT)

document.write('</td></tr></table>');  // cell table added (end)

document.write('</td>');  // table C, row A, cell E (end)
document.write('</tr></table>');  // row A (end), table B (end)
document.write('</td>');  // table B, row A, col A (end)
document.write('</tr></table>');  // row A (end), table A (end)
document.write('</td></tr></table>');  // table A, row A, col A (end)

//      getMetrDateO();

      if (!readT && !prinT)  // not for reading or printing
//      if (TopParT)  // for docDateS after successful loading

       {
//        yearN1=parseInt(docDateS.substring(0,2));
//        yearN2=parseInt(yNow);
//        weekN1=parseInt(docDateS.substring(2,4));
//        weekN2=parseInt(week_noS);
//        if ((((yearN2-yearN1)*52+weekN2-weekN1)<14) && !now_excepT)
         { rainbowStarT=false; rainbowT=false;
// for a document changed less than a quarter of a year ago: wheels on
// _fixed_ background color (because of improper effects if browser
// checks for newer version 'every visit to the page')
           changeColO('B',colorN-1)
         }
       }  // end if (!readT && !prinT)
     }  // end if (BodyObjsT && (IE4UpT || Nav5UpT) && !alw_excepT)
  }  // end if ((verS=="12345") || (verS>"58110"))
}

BotParT=true  // checks whether contents have been transferred
              // (on-line) and scripts (can be) executed


//Copyright 56-66 aSWW, M.Vincent van Mechelen, DNI Foundation, Netherlands
