// MVVM, 56.06.2-65.19.2, JS/TopPart.js at mvvm.net

function cond_showPicTC(T) { if (BodyObjsT) showPicTC(T) }

function initializeSoundO(S)
{
 var expireS=S; var expireN=parseInt(S);  // date of expiration
 var inI=0; var itemI=-1;
 var cookieS=document.cookie;
 var domainS=document.domain;
 var textS=""
 alertS="";  // must be global: no var 

 if ((HeadObjsT) && (BodyObjsT)) getMetrDateO("");
  else  // for old HTML files still using BodyFnct.js
   { StatWind(true);
     dateS=dateS.substring(0,2)+dateS.substring(3,5)+dateS.substring(6,7);
     metrDateI=parseInt(dateS);
     if (PathS.substring(0,7)=="file://") INPathS=PathS;
     else INPathS="http://www.xs4all.nl/~in/" }

 if ((window.parent.frames.length==0) && (metrDateI<expireN))
  {
   alertS="Dit speciale blok wordt slechts op het scherm getoond tot "+
          expireS.substring(0,2)+"."+expireS.substring(2,4)+"."+expireS.charAt(4)+
          " (volgens de huidige gegevens). Het verschijnt niet op papier "+
          "bij het afdrukken van dit dokument.";

   if (IE4UpT)
    {
     inI=cookieS.indexOf("ItemS=");
     if (inI==-1) itemI=1;
      else { itemI=cookieS.charAt(inI+6);
             if (itemI<10) itemI++; else itemI=1;
             if (itemI==10) itemI=0;
           } 
     document.cookie="ItemS="+itemI+" domain="+domainS;
     if (itemI==9) itemI=3; // 9de strofe zelfde als 3de (enige D)
     if (itemI==0) itemI=2; // 10de strofe zelfde als 2de (eerste E)
     if ((itemI<"1") || (itemI>"8"))
      {
       if (docDateS.indexOf('Tong/DzT')>0) itemI=1;
        else { if (fileC=="3") itemI=2; else itemI=3 }
      }

document.writeln ('<bgsound src="',INPathS,'Sound/Acrostic/LdN',itemI,'.mp3">');

     cookieS=document.cookie;
     alertS+=" Er wordt na die datum ook geen geluidsfragment meer "+
            "automatisch afgespeeld.\n\n"+
            "Tegelijkertijd met de presentatie van dit blok wordt er op "+
            "dit webterrein gebruik gemaakt van 'n simpel en 'onschuldig' "+
            "koekie. De inhoud daarvan is op dit moment:\n"+
            '"'+cookieS+'".\n\n'+
            "De eerste waarde van ItemS geeft de nu beluisterde strofe "+
            "van Het Lied der Nederlanden aan. Als je bijvoorbeeld "+
            "begint bij mijn stamboom en via mijzelf steeds de vader "+
            "kiest, hoor je alle (unieke) strofen van dit lied in de "+
            "juiste volgorde." 
    }

document.write('<div class="ScrOnly">');
document.write('<table width="600" cellpadding="0" background="',PathS,'Pics/NedLucht.jpg">');
document.write('<tr><td align="center">');
document.write('<hr color="#000080" /><font color="#000080">');
   textS='&nbsp;<font face="Matura MT Script Capitals, Impact, Times New Roman">'+
         'Het Lied der Nederlanden</font>&nbsp;&nbsp;|'+
         '&nbsp;&nbsp;<small><a href="'+PathS+'Tong/DzT/Poezie/Nederlan.HTM">'+
         '<font color="#ff8000">LEES</font></a></small>&nbsp;&nbsp;|'+
         '&nbsp;&nbsp;<small><a href="'+INPathS+'Sound/Acrostic/LdNn_PSO.mp3">'+
         '<font color="#ff8000">LUISTER</font></a>&nbsp;'+
         '&nbsp;<small>(2.6 MB, 2:47)</small></small>&nbsp;&nbsp;|'+
         '&nbsp;&nbsp;<small><small>'+
         '<a href="JavaScript:alert(alertS)"><font color="#0080ff">INFO'+
         '</font></a></small></small>&nbsp;';

document.write(textS);
document.write('</font><hr color="#000080" />');
document.write('</td></tr></table>');
document.write('</div>');
  }
}

function Write_TopPart(S)
{
 var VersDateS=""; var LabelS="" // LabelS optional 
 var URL_S=""; var separI=0;
 var BgColS=""; var URLColS=" color=\"#800080\"";
 var LangueS="ZzY"; var TimeS="Shijian"; var cardS="Henianp";
 var reasonT=false;
 docDateS="" // global var

 if ((fileC=="1")||(fileC=="6")) { LangueS="ThL"; TimeS="Time"; cardS="NewYearC" }
 if ((fileC=="3")||(fileC=="8")) { LangueS="DzT"; TimeS="Tijd"; cardS="Nieuwjrk" }
 VersDateS=S.substring(0,5);
 if (VersDateS<"59011") BodyObjsT=true;  // for use in cond_showPicTC(T)
  else { if (BodyObjsT) { TodayF(); if (wNow<4) reasonT=true } }

 if (VersDateS>"56240")
 { docDateS=S.substring(6,21); URL_S=S.substring(22);
   if (VersDateS>'56416')
    { separI=URL_S.indexOf("|");
      LabelS=URL_S.substring(0,separI);
      URL_S=URL_S.substring(separI+1)
    }

document.write('<table cellpadding="0" cellspacing="4" border="0" id="TopPart">');
document.write(' <tr><td align="center">');

 if (reasonT) document.write('<a href="',PathS+'Tong/'+LangueS+'/'+TimeS,'/'+cardS+'.HTM"');
  else
document.write('<a href="',PathS,'Info/VLP/TopC',fileC,'.htm"');

document.write(' onmouseover="cond_showPicTC(true)"');
document.write(' onmouseout="cond_showPicTC(false)" class="PicLink">');

 if (reasonT) document.write('<img src="',PathS,'Graf/VLP/Nian61.gif"');
  else
document.write(' <img src="',PathS,'Graf/VLP/IniTopC',fileC,'.gif"');

document.write('  width="570" height="45" border="0" alt=">=<" /></a>');
document.write('</td></tr></table>');

 if ((fileC=="3") || (fileC=="8")) initializeSoundO("65211")
  // previous dates of expiration: 63214, 64203
 if (LangueS=="DzT") LangueS="Nl"; else LangueS="En";

document.write('<table width="600" cellpadding="0" cellspacing="0" border="0" id="FramSup">');
document.write(' <tr height="25">');
  // min 24px for largest font; 4+45+4+25=78, same as TRINPsite
document.write('  <td width="222" align="left" valign="bottom">');
document.write('   <table cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('    <td><small><strong class="FrameFont">&nbsp;</strong></small></td>');
document.write('    <td align="left" class="FrameCell"><font',URLColS,'><small><strong class="FrameFont">');
document.write('     &nbsp;<a href="',PathS+LangueS,'.htm" class="FrameLink">MVVM</a>, ');

 if (LangueS=="Nl") LangueS="DzT"; else { LangueS="ThL"; TimeS="Time" }

document.write('     <a href="',PathS+'Tong/'+LangueS,'/',TimeS,'.htm" class="FrameLink">',docDateS,'</a>&nbsp;')
document.write('    </strong></small></font></td>');
document.write('   </tr></table></td>');

document.write('  <td width="156" align="center" valign="bottom">');
   if (LabelS!="")
    {
document.write('   <table cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('    <td',BgColS,' class="FrameCell"><font',URLColS,'><small><strong');
document.write('     class="FrameFont">&nbsp;',LabelS,'&nbsp;</strong></small></font></td>');
document.write('    <td><small><strong class="FrameFont">&nbsp;</strong></small></td>');
document.write('   </tr></table>');
    }
document.write('  </td>');

document.write('  <td width="222" align="right" valign="bottom">');
document.write('   <table cellpadding="0" cellspacing="0" border="0"><tr>');
document.write('    <td',BgColS,' align="right" class="FrameCell"><font',URLColS,'><small><strong');
document.write('     class="FrameFont">&nbsp;',URL_S,'&nbsp;</strong></small></font></td>');
document.write('    <td><small><strong class="FrameFont">&nbsp;</strong></small></td>');
document.write('   </tr></table></td>');
document.write(' </tr>');
document.write('</table>');

   docDateS=docDateS.substring(8,10)+docDateS.substring(11,13)+docDateS.substring(14);
    // date of last change(s) made (without dots) in document
 }
}

TopParT=true  // checks whether contents have been transferred
              // (on-line) and scripts (can be) executed

//Copyright 56-65 aSWW, M.Vincent van Mechelen, Amsterdam, NL