// TRINPsite, 56.06.2-64.46.3, JS/PostPage.js for TRINP = www.trinp.org
//-------------------------------------------------------------------------->

//======================================================================
// pages with old formats may not get IE4UpT from SnifF() in HeadObjs.js
 if (!document.IE4UpT)
  { IE4UpT = (navigator.userAgent.toLowerCase().indexOf("msie")!=-1);
    if (IE4UpT) Nav4UpT=false }  // simplified SnifF()
//======================================================================

//==FLOATING MENUS==

function adjFontSize(Incr)
{
 var boxS;
 var messagS='Sorry, even if this facility works with your browser, '
  messagS += 'the font cannot be reduced any more. To read this page with '
  messagS += 'a bigger font, click on the right icon or TEXT LARGER. '
  messagS += '(The font will then be enlarged by 4pt each time, '
  messagS += 'provided that your browser allows the use of this facility.)'

 if (IE4UpT)
 {
  if ((FontSizI<3) && (Incr==-1)) alert(messagS);
   else
   {
    FontSizI += Incr*4;         // increments of 4 points
    if (FontSizI<2) FontSizI=2; // for 2 only structure of text visible 

    for (i=0; i<HTMLTags.length; i++)
    {
     boxS=document.all.tags(HTMLTags[i]);
     if (boxS!=null)
      {
       for (j=0; j<boxS.length; j++)
       boxS[j].style.fontSize=FontSizI;
      }
    }
   }
 }
}

function flagLinksO()  // used for VariViewing 
{
 var N=0; var I=-1;
 var hrefS="link"; var HrefS="Link";

 for (N=0; N<document.links.length; N++)
 {
  HrefS=document.links[N].href;
  I=HrefS.indexOf('#');
  if (I>0) hrefS=HrefS.substring(0,I).toLowerCase();
   else hrefS=HrefS.toLowerCase();
  if (hrefS.substring(hrefS.length-4)==".htm")
   {
    HrefS+="?VV_T=true";
    document.links[N].href=HrefS
   }
 }
}

function alertO()
{
 var infoS="As a rule the top part of this menu will be visible at the "+
   "top of the window or frame in which this document is shown. "+
   "If you move your cursor over ON, "+
   "the bottom part with the list of special links will appear as well. "+
   "The menu, with or without the bottom part, will float down when you "+
   "scroll down, and up when you scroll up."+
   "\n\n"+
   "By moving your cursor over OFF, either at the top or at the "+
   "bottom of this menu, the whole bottom part with the list of links will "+
   "disappear again."+
   "\n\n"+
   "By clicking MOV at the bottom of this menu it will start "+
   "floating (again), if it is staying still at the top of this "+
   "document at the moment. "+
   "If is floating now, clicking MOV will make it stop floating.";

 alert(infoS);
}

function createMenusO(S)
{
 FontSizI=12;  // global var
 var frameS=name; // for a page in the LEFT frame the target of some links
                  // should not be the RIGHT frame but the LEFT one itself
 var JS_LeftS="javascript:Switch_Move('Left')";
 var JS_RightS="javascript:Switch_Move('Right')";
 var URL_S=document.URL;
 if (URL_S.indexOf('TRNPForm.htm')>-1) URL_S='';  // file at IN
 var url_S=URL_S.toLowerCase();
 var frameT=false;
 var I=-1;

 HTMLTags=new Array(15);
 // do not make 'strong' resizable; use 'b' instead!
 // 'strong' does not make bold with CSS!
 // 'strong' is given 'span' function for fixed font size:
 // <strong id="..."> ... OR <strong class="..."> ... </strong>
 HTMLTags[0]="span";  // resizable unlike 'strong'
 HTMLTags[1]="font";
 HTMLTags[2]="small";
 HTMLTags[3]="big";
 HTMLTags[4]="th";
 HTMLTags[5]="td";
 HTMLTags[6]="h1";
 HTMLTags[7]="h2";
 HTMLTags[8]="h3";
 HTMLTags[9]="h4";
 HTMLTags[10]="h5";
 HTMLTags[11]="p";
 HTMLTags[12]="li";
 HTMLTags[13]="blockquote";
 HTMLTags[14]="div";

 if (window.parent.frames.length>0) frameT=true;
 if ((IE4UpT) || (Nav4UpT))
 {
  if (!VV_T)
   {
    I=url_S.indexOf('www.trinp.org');
    if (I>-1) I+=14;
     else { I=url_S.indexOf('\\trinp\\');
            if (I>-1) I+=7;
             else { I=url_S.indexOf('/trinp/'); if (I>-1) I+=7 } }
    URL_S=URL_S.substring(I)
   }

// table for TRINPsite Main Menu
LLinkTxt = new Array(14); LLinkURL = new Array(14);
                          // 14 x PathS
LLinkTxt[0]= "<i>Truth</i>"; LLinkURL[0]="Valu/Tru.htm";
LLinkTxt[1]= "<i>Relevance</i>"; LLinkURL[1]="Valu/Rel.htm";
LLinkTxt[2]= "<i>Inclusiveness</i>"; LLinkURL[2]="Valu/Incl.htm";
LLinkTxt[3]= "<i>Neutrality</i>"; LLinkURL[3]="Valu/Neu.htm";
LLinkTxt[4]= "<i>Personhood</i>"; LLinkURL[4]="Valu/Pers.htm";
LLinkTxt[5]= "Index page"; LLinkURL[5]="index.htm";
LLinkTxt[6]= "Main docum."; LLinkURL[6]="MainDoc.htm";
LLinkTxt[7]= "Model of N-I."; LLinkURL[7]="MNI/MainDoc.htm";
LLinkTxt[8]= "Notes, papers"; LLinkURL[8]="Note.htm";
LLinkTxt[9]= "Poems, songs"; LLinkURL[9]="Poet.htm";
LLinkTxt[10]="Quest.&answ."; LLinkURL[10]="Info/Quest.htm";
LLinkTxt[11]="Short stories"; LLinkURL[11]="ShSt.htm";
LLinkTxt[12]="Sound files"; LLinkURL[12]="Sound.htm";
LLinkTxt[13]="Your opinion"; LLinkURL[13]="Info/Form/PP.htm";

// table for TRINPsite Selection
RLinkTxt = new Array(14); RLinkURL = new Array(14);
RLinkTxt[0]= "Correspond."; RLinkURL[0]="Info/Corresp.HTM";
RLinkTxt[1]= "Crosswords"; RLinkURL[1]="Game/Pzzl.htm";
RLinkTxt[2]= "Denomin.prim."; RLinkURL[2]="MNI/BoF/6/F6431N2.HTM";
RLinkTxt[3]= "Lists of files"; RLinkURL[3]="FileList.htm";
RLinkTxt[4]= "MNI index"; RLinkURL[4]="MNI.htm";
RLinkTxt[5]="<i>Neutral Persp.</i>"; RLinkURL[5]="Note/NeuPersp.HTM";
RLinkTxt[6]= "Time branch"; RLinkURL[6]="Time.htm";
RLinkTxt[7]= "<strong class='NewLinks'>&nbsp;&nbsp;(RE)NEW(ED):</strong>";
 RLinkURL[7]="AddNRev.htm";
RLinkTxt[8]="Add&rev. in 64"; RLinkURL[8]="AddNRev/64ASWW.HTM";
RLinkTxt[9]= "&#38463;&#25089;&#36798; (<i>Anan</i>)"; RLinkURL[9]="Tong/ZzY/Shige/Ananda.HTM";
RLinkTxt[10]="<i>An organism?</i>"; RLinkURL[10]="ShSt/ODay/Organism.HTM";
RLinkTxt[11]= "&#20845;&#20056;&#20845;/<i>6 By 6</i>"; RLinkURL[11]="Tong/ZzY/Shige/LiuCheng.HTM";
RLinkTxt[12]="S & S Diction."; RLinkURL[12]="Tong/ThL/Dict.htm";
RLinkTxt[13]="Alliteration: |K|"; RLinkURL[13]="Poet/VocAll/K.HTM";

document.write('<div lang="EN-US">');  // needed for Chinese font with Ff

document.write('<div onClick="turnMenuL(true)" class="HeadBox" id="HeadLeft">');
 // 'onmouseover' does not work with Netscape here (only within link)
document.write(' <table border="0" cellspacing="0" cellpadding="0" width="100">');
document.write('  <tr>');
document.write('   <td>');
document.write('    <table width="100%" cellpadding="2" cellspacing="0"');
document.write('     border="1"><tr><td background="',PathS,'Graf/Bkgr/HalfTrsp.gif" align="center"><strong');
document.write('     class="MenuHead"><b>TRINPSITE</b><br /></strong><strong');
document.write('     class="MenuSubH"><b>MENU</b></strong><strong class="MenuOnOff">&nbsp; <a href="javascript:turnMenuL(true)"');
document.write('     onmouseover="turnMenuL(true)" class="MenuOnOff">ON|</a>OFF</strong></td>');
document.write('    </tr></table>');
document.write('   </td>');
document.write('  </tr>');
document.write(' </table>');
document.write('</div>');

document.write('<div class="MenuBox" id="MenuLeft">');
document.write(' <table border="0" cellspacing="0" cellpadding="0" width="100">');
document.write('  <tr onClick="turnMenuL(false)">');
document.write('   <td>');
document.write('    <table width="100%" cellpadding="2" cellspacing="0"');
document.write('     border="1"><tr><td background="',PathS,'Graf/Bkgr/HalfTrsp.gif" align="center"><strong');
document.write('     class="MenuHead"><b>TRINPSITE</b><br /></strong><strong');
document.write('     class="MenuSubH"><b>MENU</b></strong><strong class="MenuOnOff">&nbsp; ON<a href="javascript:turnMenuL(false)"');
document.write('     onmouseover="turnMenuL(false)" class="MenuOnOff">|OFF</a></strong></td>');
document.write('    </tr></table>');
document.write('   </td></tr>');
document.write('  <tr>');
document.write('   <td>');
document.write('    <table width="100%" cellpadding="0" cellspacing="0"');
document.write('     border="1"><tr><td bgcolor="#008080" align="center">');
 //    <!--maximum 14 items, because of smallest screen with Netscape-->
document.write('     <table cellspacing="0" cellpadding="2" border="0"><tr><td ');
document.write('      align="center" class="FixedLink"><a');
document.write('      href="JavaScript:adjFontSize(-1);" target="',frameS,'"');
document.write('       class="FixedLink"><img src="',PathS,'Graf/Icon/ResizeL.gif" height="27" width="30"');
document.write('      alt="BODY TEXT SMALLER" border="0"></a><a');
document.write('      href="JavaScript:adjFontSize(1);" target="',frameS,'"');
document.write('       class="FixedLink"><img src="',PathS,'Graf/Icon/ResizeR.gif" height="27" width="30"');
document.write('      alt="BODY TEXT LARGER" border="0"></a></td>');
document.write('     </tr></table>');
document.write('     <table width="89" cellpadding="2" cellspacing="0" border="0">');
document.write('      <tr><td bgcolor="#000000" class="MenuLink">');

for (var n=0; n<14; n++)
 {
document.write('<a href="',PathS,LLinkURL[n],'"');
document.write('class="MenuLink">',LLinkTxt[n],'</a><br />')
 }

document.write('     </td></tr></table>');
document.write('     <table cellspacing="0" cellpadding="3" border="0"><tr><td align="center"><strong class="FixedLink"><a ');
document.write('       href="javascript:void(0)" onmouseover="turnMenuL(false)" class="FixedLink">OFF</a>|<a ');
document.write('       href="javascript:alertO()" target="',frameS,'" class="FixedLink">INFO</a>|<a ');
document.write('       href=',JS_LeftS,' target="',frameS,'" class="FixedLink">MOV</a></strong></td>');
document.write('     </tr></table>');
document.write('    </td></tr></table>');
document.write('   </td>');
document.write('  </tr>');
document.write(' </table>');
document.write('</div>');

document.write('<div onClick="turnMenuR(true)" class="HeadBox" id="HeadRight">');
document.write(' <table border="0" cellspacing="0" cellpadding="0" width="100">');
document.write('  <tr>');
document.write('   <td>');
document.write('    <table width="100%" cellpadding="2" cellspacing="0"');
document.write('     border="1"><tr><td background="',PathS,'Graf/Bkgr/HalfTrsp.gif" align="center"><strong');
document.write('     class="MenuHead"><b>TRINPSITE</b><br /></strong><strong');
document.write('     class="MenuOnOff">OFF<a href="javascript:turnMenuR(true)" onmouseover="turnMenuR(true)" ');
document.write('     class="MenuOnOff">|ON</a> &nbsp;</strong><strong class="MenuSubH"><b>MORE</b></strong></td>');
document.write('    </tr></table>');
document.write('   </td>');
document.write('  </tr>');
document.write(' </table>');
document.write('</div>');

document.write('<div class="MenuBox" id="MenuRight">');
document.write(' <table border="0" cellspacing="0" cellpadding="0" width="100">');
document.write('  <tr onClick="turnMenuR(false)">');
document.write('   <td>');
document.write('    <table width="100%" cellpadding="2" cellspacing="0"');
document.write('     border="1"><tr><td background="',PathS,'Graf/Bkgr/HalfTrsp.gif" align="center"><strong');
document.write('     class="MenuHead"><b>TRINPSITE</b><br /></strong><strong');
document.write('     class="MenuOnOff"><a href="javascript:turnMenuR(true)" onmouseover="turnMenuR(false)" ');
document.write('     class="MenuOnOff">OFF|</a>ON &nbsp;</strong><strong class="MenuSubH"><b>MORE</b></strong></td>');
document.write('    </tr></table>');
document.write('   </td></tr>');
document.write('  <tr>');
document.write('   <td>');
document.write('    <table width="100%" cellpadding="0" cellspacing="0"');
document.write('     border="1"><tr><td bgcolor="#008080" align="center">');
document.write('     <table cellspacing="0" cellpadding="2" border="0"><tr><td ');
document.write('      align="center" class="FixedLink">');
document.write('      <a href="',PathS,'indVVuIn.htm" class="FixedLink">VARIVU INFO</a><br />');

if (VV_T)                 
 {
  var cNV_S4="pen"; var cNV_S1="w"+"in";
  var cNV_S3=".o"; var cNV_S2="do"+"w";
  if (frameT) URL_S=cNV_S1+cNV_S2+".top"+cNV_S3+cNV_S4+"er.winConsl.focus()";
   else URL_S=cNV_S1+cNV_S2+cNV_S3+cNV_S4+"er.winConsl.focus()";
document.write('      <a href="JavaScript:',URL_S,'" class="FixedLink">VV CONSOLE</a></td>');
 }
 else
 {
document.write('      <a href="',PathS,'index.htm?refS=',URL_S,'"');
document.write('       class="FixedLink">START VARIVU</a></td>')
 }

document.write('     </tr></table>');

document.write('     <table width="89" cellpadding="2" cellspacing="0" border="0">');
document.write('      <tr><td bgcolor="#000000" class="MenuLink">');

for (var n=0; n<14; n++)
 {
document.write('<a href="',PathS,RLinkURL[n],'"');
document.write('class="MenuLink">',RLinkTxt[n],'</a><br />')
 }

document.write('     </td></tr></table>');
document.write('     <table cellspacing="0" cellpadding="3" border="0"><tr><td align="center"><strong class="FixedLink"><a ');
document.write('       href=',JS_RightS,' target="',frameS,'" class="FixedLink">MOV</a>|<a ');
document.write('       href="javascript:alertO()" target="',frameS,'" class="FixedLink">INFO</a>|<a ');
document.write('       href="javascript:void(0)" onmouseover="turnMenuR(false)" class="FixedLink">OFF</a></strong></td>');
document.write('     </tr></table>');

document.write('    </td></tr></table>');
document.write('   </td>');
document.write('  </tr>');
document.write(' </table>');
document.write('</div>');

document.write('</div');

 }

 if (VV_T) flagLinksO()
}

//==========================================================================

//==INLINE FRAMES==

function popUpInfO()
{
 var alertS="As the width of the window in which the document referred to "+
  "is loaded exceeds 900 pixels (at the moment of loading), one or more "+
  "internal frames (dependent on the length of the document) are created "+
  "on the right in which a selection of other TRINPsite pages is shown "+
  "simultaneously."+
  "\n\n"+
  "By clicking the top bar ADDRESS of an internal frame the page with "+
  "that address will be shown in the frame (again). "+
  "You can also view the framed page in a separate, wider and resizable "+
  "(pop-up) window by clicking OPEN WINDOW at the bottom of the frame. "+
  "If you have followed a link in this frame to a new page, you will get "+
  "to see the original (not the new) page in the frame or pop-up "+
  "window.";

 alert(alertS)
}

function createNewVu(S0,S1,S2,S3)
{
 var cNV_S4="pen"; var cNV_S1="w"+"in"
 var cNV_S3=".o"; var cNV_S2="do"+"w";

 eval(S0+"="+cNV_S1+cNV_S2+cNV_S3+cNV_S4+"(S1,S2,S3)")
}

function popUpO(T,N)
{
 var popUpT=T; var iFrameN=N;
 var windoS="width="+printWidN+",height="+printWidN+",resizable=yes,scrollbars=yes,toolbar=yes";
 var NewFileS=PathS+withoutVarO(filesA[iFrameN-1]);

 if (popUpT)
   {
    NewFileS+="?byIFrameT=true";
    if (iFramePopUpT && iFramePopUp.closed) iFramePopUpT=false;
    if (iFramePopUpT)
      { iFramePopUp.location.replace(NewFileS); iFramePopUp.focus() }
     else 
      { createNewVu("iFramePopUp",NewFileS,"iFrameWindow",windoS);
        iFramePopUpT=true }
   }
  else
   eval('window.'+"TRNP_IRight"+iFrameN+'.location.href="'+NewFileS+'"');
}

function getIFramO(N1,N2,S)
{
 var iFrameN=N1; var heightN=N2; var fileS=S; var short_FileS=S;
 var widthN=displayWidN+20  // 20px extra for scrolling
 var pixPerLetN=7;  // 350/50: 50 letters for 350 pixels in Ff
 var styleDefS='#IFrameBox'+iFrameN+
  ' { position:absolute; left:'+widthN+'px; top:0px; z-index:1 }';
 var iFrameTableS="";
 var C="?";
 var N=0;

 if (Nav4UpT) widthN=document.getElementById("IFramesCol").clientWidth-4;
  else widthN=document.all.IFramesCol.offsetWidth;

 if (fileS.substring(4,8)==":///") fileS=fileS.substring(8);
 if (fileS.substring(4,7)=="://") fileS=fileS.substring(7);
 if (fileS.indexOf('?')>0) C="&";
 short_FileS=withoutVarO(fileS);
 if (IE4UpT) pixPerLetN=8;  // with 7 some iframes will stick out 
 N=Math.floor(widthN/pixPerLetN);
 if (short_FileS.length>N)
  short_FileS='...'+short_FileS.substring(short_FileS.length-N+3);

iFrameTableS=
  '<table width="'+widthN+'" cellpadding="0" cellspacing="0" border="0">'+
  '<tr><td height="15"> </td></tr>'+
  '<tr><td height="15" bgcolor="#606060" align="center" class="PopUpBar">'+
  '<font size="-1" color="#000000" face="Courier">'+
  '<a href="JavaScript:popUpO(false,'+iFrameN+')" class="FrameBarTxt" '+
  'style="background:none">'+
  short_FileS+'</a></font></td></tr>'+
  '<tr><td valign="top" align="center"><iframe name="TRNP_IRight'+iFrameN+
  '" width="'+widthN+'" frameborder="1" '+
  'src="'+PathS+fileS+C+'inIFrameT=true'+'" '+
    // do not use fileS with PathS (and http://) as part of it!
  'height="'+heightN+'" allowtransparency="true">'+
  'This place reserved for general information, a second display of '+
  'the clues and any page linked to from there.'+
  '</iframe></td></tr>'+
  '<tr><td height="15" bgcolor="#606060" align="center" class="PopUpBar">'+
  '<font size="-1" color="#000000" face="Courier">'+
  '<strong class="FrameBarTxt">'+iFrameN+' | </strong>'+
  '<a href="JavaScript:popUpInfO()" class="FrameBarTxt" '+
  'style="background:none">INFO</a><strong class="FrameBarTxt"> | </strong><a '+
  'href="JavaScript:popUpO(true,'+iFrameN+')" class="FrameBarTxt" '+
  'style="background:none">OPEN WINDOW</a></font></td></tr>'+
  '<tr><td height="15"> </td></tr>'+  // 30
  '</table>';

document.write('<style>'+styleDefS+'</style>');
document.write('<div id="IFrameBox'+iFrameN+'">')
document.write(iFrameTableS);
document.write('</div>');
}

function createUserPrefO(S)  
{
 var verS=S;  // this function only called for S>"57451"
 var URL_S=document.URL;
 var searchS=document.location.search;
 var widthN=displayWidN+20;
   // width together 16(film edge)+...MiN+20(for scrolling)+16(film edge)
 var hypoReS=""+hypoResolutioN;
 var colorN=0;
 var colorS="#ffffff";
 var alw_excepT = ( URL_S.indexOf('indLeft.htm')+
                    URL_S.indexOf('VocALeft.htm')+2>0 );
 var valuDocT = (URL_S.indexOf('Valu')>0);  // a value document
 var I=-1;
 var JS_to_DO_S="javascript:window.scroll(-hypoResolutioN,99999)";
   // body height cannot yet be read here; at least 17x600=10200px
 var JS_movS="javascript:Switch_Move('Left');Switch_Move('Right')";
 var JS_alert_readS="javascript:alert('"+
  "If and when you want the document on the left to look as simple "+
  "as possible on the screen, then click: reading or printing. "+
  "(The display width will then be 900 pixels for reading and "+
  printWidN+" pixels for full-scale printing of this document.)')"; 
 var JS_alert_othS="javascript:alert('"+
  "At the bottom left you will find a console with all display options. "+
  "These include an option (1) to adjust the viewing width, "+
  "(2) to delete/add the column of inline frames on the right, "+
  "(3) to stop or (re)start the movement of the menus while you are "+
  "scrolling, "+
  "(4) to change the background and, possibly, other colors, "+
  "(5) to change the size of (parts of) the text using the left menu, "+
  "(6) to start VariViewing from the top of the right menu, "+
  "(7) to simplify the display for quiet reading, "+
  "(8) to adjust the width most suitable for printing. "+
  "To see all these options together click: display.')";
 var JS_alert_movS="javascript:alert('"+
  "While you are scrolling up and down, the TRINPsite menus on the far "+
  "left and right of the window will stay with you by moving up and down "+
  "as well. "+
  "To stop or (re)start the vertical movement of these menus click: "+
  "movement. "+
  "(You can also use the MOV button in these menus to stop or restart "+
  "their up and down movements separately.)')";

 if (searchS.indexOf("inIFrameT=true")>0) inIFrameT=true;

 if (hypoResolutioN<(2*displayWidN)+52)
   widthN=hypoResolutioN-displayWidN-52;

 if ((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    
   colorS=colorA[colorN];
   colorS=lighterO(colorS); colorS=lighterO(colorS);
  }

document.write('<table width="100%" bgcolor="',colorS,'" cellspacing="0" cellpadding="0" '+
 'border="1" id="UserPrefTbl"><tr><td align="left">');
 colorS=darkerO(colorA[colorN]);
document.write('<table cellspacing="0" cellpadding="2" border="0"><tr>');
document.write('<td align="left" valign="middle"><font size="-1">'+
 '<font color="',colorS,'"><b>D</b></font>'+
 '<font color="#000000">ISPLAY</font><br />'+
 '<font color="',colorS,'"><b>O</b></font>'+
 '<font color="#000000">PTIONS</font></font></td>');
document.write('<td width="4"> </td>');
document.write('<td align="left">');
document.write('<font size="-1" color="#000000">');

  if (!puzzlT)
    {
document.write('<a href="',JS_alert_readS,'" class="DisplOpt">Info</a>: ');
     I=URL_S.indexOf('iFrameT=true');
     if (I>0) URL_S=URL_S.substring(0,I-1)+URL_S.substring(I+12);
     I=URL_S.indexOf('hypoReS=');
     if (I>0) URL_S=URL_S.substring(0,I-1)+URL_S.substring(I+12);
     URL_S=withoutVarO(URL_S)+"?readT=true";
       // width for reading is always 900 pixels (for printing varies)
document.write('<a href="',URL_S,'" class="DisplOpt"><font color="#000000">reading</font></a>/');
     URL_S=withoutVarO(URL_S)+"?prinT=true&hypoReS=0"+printWidN;
document.write('<a href="',URL_S,'" class="DisplOpt"><font color="#000000">printing</font></a> the&nbsp;left&nbsp;document<br />');
    }
   else  // for puzzles no option without iframes
    {
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 />');
    }

document.write('<a href="',JS_alert_othS,'" class="DisplOpt">Info</a>: ');
document.write('other <a href="',JS_to_DO_S,'" class="DisplOpt">display</a> options');

document.write('</font>');
document.write('</td>');
document.write('</tr></table>');
document.write('</td></tr></table>');
}

function moveToIFramesColLeftO(S)
{
 var objectS=S;
 var MainCol_widN=616;
   // 600(minimum MainCol width)+16(to leave edge of film image free)

 if (Nav5UpT)
   { MainCol_widN=document.getElementById("MainCol").clientWidth+16;
eval("document.getElementById('"+objectS+"').style.left="+'"'+parseInt(MainCol_widN)+'px"')
   }
  else
   { MainCol_widN=document.all.MainCol.offsetWidth+16;
eval("document.all."+objectS+".style.pixelLeft="+parseInt(MainCol_widN))
   }
}

function createIFramesO(S)
{
 iFramePopUpT=false;  // global var  
 var verS=S;  // version date
 var rightBkgrS=PathS+"Graf/Bkgr/Film";
 var frameContentS="index.htm";
 var VV_S="";
 var bodyHeightN=0; var frameHeightN=600;
 
 var frameN=1;
 var maxFrameN=17;  // IE may accept no more than 28 frames on the right
                    // Ff may not execute contents in second-last frame
                    // use MaxFrameN=19+2=21 in practice
 var initStatusS=window.defaultStatus; var statusS="Loading ...";
 var topValueS="0";
 var nameS="TRNP_IRight1";
 var URL_S=document.URL;
 var N=0;
 var heartS="";
 var iFramesColWidN=hypoResolutioN-displayWidN-52;
   // display+52=16(film edge)+display+20(for scrolling)+16(film edge)
 var restColWidN=0;

 if (iFramesColWidN<600) heartS="?hearT=true";
   // in a narrow iframe only the heart elements shown (see 3GuestBk.HTM)

 if (PrePageT)
 {
  document.write('</td>');  // script started in PrePage

  if (iFrameT)
  {

document.write('<td width="16" background="'+rightBkgrS+'L.gif">');
document.write('<table width="16" cellspacing="0" cellpadding="0"><tr><td> </td></tr></table>');
  // fake table (or other object) needed to secure the width of this cell
document.write('</td>');
document.write('<td width="',iFramesColWidN,'" background="'+rightBkgrS+'M.gif" align="center" valign="top" id="IFramesCol">');

   if (verS>"57451") createUserPrefO(verS);

document.write('<table width="',iFramesColWidN,'"><tr><td> </td></tr></table>');
   // table only used to get the appropriate (variable!) width of this column, because
   // both IE and Ff need an object of width iFramesColWidN in a cell before taking on that width
document.write('</td>');
document.write('<td width="16" background="'+rightBkgrS+'R.gif">');
document.write('<table width="16" cellspacing="0" cellpadding="0"><tr><td> </td></tr></table>');
document.write('</td>');

  }  // end 'if (iFrameT)'

  if (hypoResolutioN<windoWidthN)
  { restColWidN=windoWidthN-hypoResolutioN;
    if (prinT) rightBkgrS="#ffffff"; else rightBkgrS="#000000";
      // both IE and Ff need a width for this cell
document.write('<td width="',restColWidN,'" bgcolor="',rightBkgrS,'"> </td>');
    // if (allFrameT) // crossword puzzles do not need this space within the iframe
  }

document.write('</tr></table>');
    // ResoluTbl must first be finished before I.E. will give dimensions!
    // The real widths of MainCol and IFramesCol can now be established
    // and the height of MainCol, which determines the number of i-frames.
    // The variable number of i-frames can only occur in blocks ON the page.
    // The number of i-frames IN the page would always be the same, as no
    // height could be established before the i-frames in IFramesCol
    // would all be created (and therefore MainCol and ResoluTbl finished). 

  if (iFrameT)  // continued
  {
   filesA=new Array(maxFrameN+1);  // 1 more for URL_S = frameContentS 

   for (N=0; N<URL_S.length; N++)
    { if (URL_S.charAt(N)=="\\")
       URL_S=URL_S.substring(0,N)+"/"+URL_S.substring(N+1) }

   if (iFramesColWidN<901)  // a special page without iframes
     filesA[0]='index.htm';  // first i-frame page
    else
     {
      if (URL_S.indexOf("Tru.htm")==-1)
        filesA[0]='Valu/Tru.htm'; 
       else
        filesA[0]='Valu/Rel.htm'
     }
   if (iFramesColWidN<901)  // a special page without iframes
     {   if ((fileC=='3') || (fileC=='8')) filesA[1]='MainDoc.htm';
       else filesA[1]='MNI/MainDoc.htm';  // for frame #2, etc.
     }
    else
     {
      if (URL_S.indexOf("Incl.htm")==-1)
        filesA[1]='Valu/Incl.htm';
       else
        filesA[1]='Valu/Rel.htm'
     }
   filesA[2]='3GuestBk.HTM'+heartS;
     // F6 with hearT values (future F7)
   filesA[3]='Time/Date.HTM';  // F5
   if (iFramesColWidN<901)  // a special page without iframes
     filesA[4]='Game/Cube/TRNPCVar.HTM';
    else
     {
      if (URL_S.indexOf("Neu.htm")==-1)
        filesA[4]='Valu/Neu.htm';
       else
        filesA[4]='Valu/Rel.htm'
     }
   filesA[5]='Poet/ComP/4/Au/51327.HTM';  // F5
   if ((fileC=='3') || (fileC=='8'))
     filesA[6]='Tong/ZzY/Shige/Qingqiu.HTM';  // F6
    else filesA[6]='MNI/BoF.htm';  // F5
   filesA[7]='Game/Pzzl/CrssW003.HTM';  // F6
   filesA[8]='Sound.htm';  // F6
   filesA[9]='Poet/NCGP/MNIP/NarrowIs.HTM';  // F5
   filesA[10]='Note/Sparrow.HTM';  // F6
   if ((fileC=='3') || (fileC=='8'))
     filesA[11]='Tong/ThL/Poems/Request.HTM';  // F6
    else filesA[11]='MNI/BoI.htm';  // F5
   filesA[12]='ShSt/Evry.htm';  // F5
   filesA[13]='Tong/ZzY/Fanyi.htm';  // F6
   if (iFramesColWidN<901)  // a special page without iframes
     filesA[14]='Info/Ann53225.HTM';
    else
     {
      if (URL_S.indexOf("Pers.htm")==-1)
        filesA[14]='Valu/Pers.htm';
       else
        filesA[14]='Valu/Rel.htm'
     }
   filesA[15]='MNI/BoS/4/S4231.HTM';  // F6
     // 16 iframes for Sumati-I with Ff, standard font size
   if ((fileC=='1') || (fileC=='6'))
     filesA[16]='Tong/ThL/Poems/ThisLang.HTM';
    else 
     { if ((fileC=='2') || (fileC=='7'))
         filesA[16]='Tong/ZzY/Shige/ZzYuyan.HTM';
        else filesA[16]='Tong/DzT/Poezie/DezeTaal.HTM'
     }
 
   if (Nav4UpT)
     { topS = ".top="; lftS=".left="; docS = "document."; stlS = "";
       if (Nav5UpT)  // for Netscape 6 and 7
        { docS = "document.getElementById('"; stlS = "').style" }
     }
    else
     { topS=".pixelTop="; lftS=".pixelLeft="; 
       docS="document.all."; stlS=".style" }

   bodyHeightN=document.body.offsetHeight-63;
     // display options table assumed to be 78-15=63 px high

   if ((bodyHeightN/frameHeightN)<maxFrameN+1)
    maxFrameN=Math.floor(bodyHeightN/frameHeightN);
   if (puzzlT) maxFrameN=1;  // for whole height only index.htm
   if (maxFrameN*frameHeightN<bodyHeightN)
    frameHeightN=Math.floor(bodyHeightN/maxFrameN);

   while (frameN<maxFrameN+1)
   {
    frameContentS=filesA[frameN-1];
    if ((frameContentS.indexOf('indLeft.htm')>-1)
        && (frameN==maxFrameN-1))
     { if ((fileC=='3') || (fileC=='8')) frameContentS='MNI/MainDoc.htm';
        else frameContentS="MainDoc.htm" }
    if (URL_S==frameContentS) frameContentS=filesA[16];
      // so that page in window is always different from page in iframe  
    statusS="Please wait. Creating inline frame "+frameN+".";
    window.defaultStatus=statusS;

    getIFramO(frameN,frameHeightN-64,frameContentS);  // -60-4 for Ff
    topValueS=63+(frameN-1)*frameHeightN;  // 78-15 px for Display Options
    if (Nav4UpT) topValueS='"'+topValueS+'px"';
    eval(docS+"IFrameBox"+frameN+stlS+topS+topValueS);
    moveToIFramesColLeftO("IFrameBox"+frameN)
    frameN++
   }  // end 'while'

   window.defaultStatus=initStatusS;
   if (VV_T) VV_S="&VV_T=true";
  }  // end 'if (iFrameT)'
 }  // end 'if (iPrePageT)'
}

//==========================================================================

function Write_PostPage(S)  // versions such as "56073" have no S
{
 VV_T=false;
 var verS=S;

 if (document.location.search.indexOf('VV_T=true')>0) VV_T=true
 if (verS==undefined) verS="00000";  // for function without S
 if (verS<"56454") { hearT=false; readT=false; prinT=false }
 if (verS>"56156" && !prinT) createMenusO(S);  // at least M1 format
 if (verS>"56453") createIFramesO(S);  // at least F3 format ("56452")
   // if (verS>"57451") gives error for VersDateS="56454" (e.g., F643)

 if (self.name.indexOf("TRNP_IRight")>-1) {}  //window.scroll(134,0);
    // display will be widened by 134px after right menu has been created!
  else
   { if ((verS>"59480") && puzzlT) window.scroll(0,223) }
    // direct showing of puzzle (with format F6)
}

PostPageT=true  // checks whether contents have been transferred
                // (on-line) and scripts (can be) executed

//Copyright 56-64 aSWW, M.Vincent van Mechelen, DNI Foundation