// navi.js music4ever.de
//
// var
  var jx = 0,
  linxn = ['zum Artikel ...', 'Music4ever', 'Jukebox', 'Anekdote', 'Was macht ...', 'Interview',
           'Extra', '&Uuml;bersicht / Journal', 'Kurznachrichten Musik', 'Kurznachrichten Div.',
           'Konzerttermine', 'G&auml;stebuch', 'Jukebox-Links', 'Musik-Links', 'Panorama, Presse',
           'Banner', 'M4e Records', 'Impressum', 'Mail / webmail', 'Archiv / Journal'],
  linxa = ['x', 'index.htm', 'cjukebox.htm', 'cjourane.htm', 'cjourwme.htm', 'cjourint.htm',
           'cjourxtr.htm', 'alljour.htm', 'cinfokna.htm', 'cinfodiv.htm',
           'cinfokon.htm', 'gbook.htm', 'cjjlinks.htm', 'cmuslink.htm', 'cpano.htm',
           'cbanner.htm', 'mrecords.htm', 'cimpres.htm', 'cimpres.htm', 'alljour.htm'],
  linxh = ['...', '- home', '- jukebox', '- journal', 'x', 'x', 'x', 'x', '- news', 'x', 'x',
           '- service', 'x', 'x', 'x', 'x', 'x', '- kontakt', 'x', '- archiv']
  linxtop = 19;
//
// sub
function hop(jh)
{ if (jh != 'x')  { top.location.href = jh; }
}  // end hop
function hopx(jhx)
{ var han = 'y';
  if (jhx != 'x')
  { han = window.open(jhx, '_blank',
    'scrollbars=yes, status=yes, toolbar=yes, menubar=yes, location=yes'); };
}  // end hopx
//
// main
function xnavi(xxednr, xxtnr)
{ var xnt = ' ';
  if  ((xxednr != undefined)  &&  (parseInt(xxednr,10) != NaN))
  { xnt = ' / nr. '.concat(xxednr);  linxh[1] = linxh[1].concat(xnt);};
  if  ((xxtnr != undefined)  &&  (parseInt(xxtnr,10) != NaN))
  { xnt = ' ('.concat(xxtnr);   xnt = xnt.concat(')');  linxh[2] = linxh[2].concat(xnt);};
  this.document.open();  document.write('<form name="xfnavi" method="get">');
  document.write('<select name="linx" title="Navigation zu den Artikeln" size="1" ');
  document.write('onchange="hop(linx.value);">');
  for (jx = 0; jx <= linxtop; jx++)
  { xnt = linxh[jx];
    if  (xnt != 'x')  { xnt = '<optgroup label="' + xnt + '"></optgroup>'; document.write(xnt); };
    xnt = '<option value="' + linxa[jx] + '" label="' + linxn[jx] + '">' + linxn[jx] + '</option>';
    document.write(xnt);
    if  (jx == linxtop)  { xnt = '<optgroup label = " "> </optgroup>'; document.write(xnt); };  
  };  // end for
  document.write('</select></form>');  document.close();
}  // end xnavi
//
// secondary - print preview
function xprn(ni, nn, na) // call: number of entries, ['name1', ...], ['adr1', ...]
{ this.document.open();  document.write('<form name="qprn" method="get"><select name="prnx" size="1"');
  document.write(' title="Neues Fenster mit Komplettansicht des Artikels (Druckvorschau)"');
  document.write(' onchange="hopx(prnx.value);">');
  document.write('<option value="x">Druckversion ...</option>');
  for (jx = 0; jx < ni; jx++) // count from zero to number--
    { document.write('<option value="'+na[jx]+'">'+nn[jx]+'</option></form>'); }
  document.write('</select>');
  document.close();
} // end xprn
//
// end navi.js
