// navi.js music4ever.de
//
// var
//
  var jx = 0,
  linxn = ['zum Artikel ...', 'Music4ever', 'Jukebox', 'Anekdote', 'Was macht ...', 'Interview',
           'Extra', '&Uuml;bersicht / Journal', 'Kurznachr. 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 = '',  xs = '';  // first add nr and round to array values
  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); };  // done
  xs = '<span><form name="qnav"><select name="linx" size="1" ';
  xs = xs.concat('title="Navigation zu den Artikeln" onchange="hop(linx.value);">');
  for  (jx = 0;  jx <= linxtop;  jx++)
  { xnt = linxh[jx];
    if  (xnt != 'x')  { xnt = '<optgroup label="'.concat(xnt);
                        xnt = xnt.concat('"></optgroup>');  xs = xs.concat(xnt); };
    xnt = '<option value="'.concat(linxa[jx]);  xnt = xnt.concat('" label="');
    xnt = xnt.concat(linxn[jx]);  xnt = xnt.concat('">');
    xnt = xnt.concat(linxn[jx]);  xnt = xnt.concat('</option>');  xs = xs.concat(xnt);
    if  (jx == linxtop)  { xs = xs.concat('<optgroup label = "___"> </optgroup>'); };  
    };  // end for
  xs = xs.concat('</select></form></span>');
  this.document.open();  document.write(xs);  document.close();  xnt = '';  xs = '';
}  // end xnavi
//
// print preview
//
function xprn(ni, nn, na) // call: number of entries, ['name1', ...], ['adr1', ...]
{ var  xs = '';
  xs = '<span><form name="qprn"><select name="prnx" size="1"';
  xs = xs.concat(' title="Neues Fenster mit Komplettansicht des Artikels (Druckvorschau)"');
  xs = xs.concat(' onchange="hopx(prnx.value);">');
  xs = xs.concat('<option value="x">Druckversion ...</option>');
  for (jx = 0;  jx < ni;  jx++)
  { xs = xs.concat('<option value="');  xs = xs.concat(na[jx]);
    xs = xs.concat('">');  xs = xs.concat(nn[jx]);  xs = xs.concat('</option>'); };
  xs = xs.concat('</select></form></span>');
  this.document.open();  document.write(xs);  document.close();  xs = '';
} // end xprn
// { var  xs = '';
//   xs = '<span><form name="qprn" style="display:inline"><select name="prnx" size="1"';
//   xs = xs.concat(' title="Neues Fenster mit Komplettansicht des Artikels (Druckvorschau)"');
//   xs = xs.concat(' onchange="hopx(prnx.value);"> <option value="x">Druckversion ...</option>');
//   for (jx = 0;  jx < ni;  jx++)
//     { xs = xs.concat('<option value="'+na[jx]+'">'+nn[jx]+'</option>'); };
//   xs = xs.concat('</select></form></span>');
//   this.document.open();  document.write(xs);  document.close();  xs = '';
// } // end xprn
//
// end navi.js

