///////////////////////////////////////////////////////////
// scripts for site index aztoc.htm - aztoc.js           //
///////////////////////////////////////////////////////////

// ynav var
  var
  topix = ['---',  'Der Begriff SMILE',  'Pers&ouml;nlichkeiten',
           'Organisationen - geheime und andere',  'Verschw&ouml;rung in Theorie und Praxis',
           'k&uuml;nstlerisch - kreativ - meditativ',  'Futurologisches',
           'Raumfahrt - Kosmos - Theorie',  'Grenzwissenschaft',  'Umstrittene Phaenomene',
           'Projekte'];
  var  iyy = topix.length;
// end ynav var

// xem - xyz - xfp - ynav


// xem - change em bg-col values
///////////////////////////////////////////////////////////
//
  var  xh = '',  xi = 0,  xj = 1,  xn = '',  xv = 0,  xz='',  cc = 'x';
  var  xeb = ['ffffe8', 'ffffb0', 'ffb0b0', 'b0b0ff', 'e0e0e0', 'f0f0f4'];
//
function xem()
{  xv = document.getElementsByTagName('em').length;
  cc = '#'+xeb[xj]
  for (xi = 0;  xi < xv;  xi++)
  { if  (document.getElementsByTagName('em')[xi].style.display != 'none')
    { document.getElementsByTagName('em')[xi].style.backgroundColor = cc; }; };
  xj++;
  if (xj > 5)  { xj = 0; };
}  // end xem

// xyz - set all paragraphs to cbxyz value
function xyz()
{ var  cbf = 0,  xyza = '',  xyck = '',  xyi = 0,  xyia = '';
  var  xyzh = '',  xyzl = '',  xylist='',  xysumy = '';
  cbf = 0;
  if  (document.getElementsByName('cbxyz')[0].checked)  { cbf++; };
  xyzh = document.getElementsByTagName('input');  xyzl = xyzh.length;
  if  (cbf > 0)  { xylist = 'block';  xysumy = 'none';  xyck = true; }
           else  { xylist = 'none';  xysumy = 'block';  xyck = false; };
  for  (xyi = 1;  xyi < 1000;  xyi++)
  { xyia = String(xyi);
    if  (xyia.length < 3)  { xyia = '0'.concat(xyia); };
    if  (xyia.length < 3)  { xyia = '0'.concat(xyia); };
    xyza = 'cb'.concat(xyia);
    if  (document.getElementsByName(xyza)[0])
    { document.getElementsByName(xyza)[0].checked = xyck; };
    xyza = 'sumy'.concat(xyia);
    if  (document.getElementById(xyza))
    { document.getElementById(xyza).style.display = xysumy; };
    xyza = 'list'.concat(xyia);
    if  (document.getElementById(xyza))
    { document.getElementById(xyza).style.display = xylist; };
    xyza = 'navr'.concat(xyia);
    if  (document.getElementById(xyza))
    { document.getElementById(xyza).style.display = xylist; };
  };  // end for
}  // end xyz

// xfp - flip paragraph
function xfp(xq1, xq2)  // accepts one or two strings or numbers, length <= 3
{ var  xfpa = '',  xfpf = 0,  xfph = '',  xfpl = '',  xfps = '',  xfpz1 = '',  xfz2 = '';
  xfpz1 = String(xq1);
  if  (xfpz1.length < 3)  { xfpz1 = '0'.concat(xfpa); };
  if  (xfpz1.length < 3)  { xfpz1 = '0'.concat(xfpa); };
  xfpz2 = String(xq2);
  if  (xfpz2.length < 3)  { xfpz2 = '0'.concat(xfpa); };
  if  (xfpz2.length < 3)  { xfpz2 = '0'.concat(xfpa); };
  xfpa = 'cb'.concat(xfpz1);  xfpf = 0;
  if  (document.getElementsByName(xfpa)[0])
  { if  (document.getElementsByName(xfpa)[0].checked)  { xfpf++; }; };
  if  (xfpf == 0)  { xfpl = 'none';  xfps = 'block'; }  else  { xfpl = 'block';  xfps = 'none'; };
  xfpa = 'list'.concat(xfpz1);
  if  (document.getElementById(xfpa))  { document.getElementById(xfpa).style.display = xfpl; };
  xfpa = 'navr'.concat(xfpz1);
  if  (document.getElementById(xfpa))  { document.getElementById(xfpa).style.display = xfpl; };
  xfpa = 'sumy'.concat(xfpz1);
  if  (document.getElementById(xfpa))  { document.getElementById(xfpa).style.display = xfps; };
  xfpa = 'list'.concat(xfpz2);
  if  (document.getElementById(xfpa))  { document.getElementById(xfpa).style.display = xfpl; };
  xfpa = 'navr'.concat(xfpz2);
  if  (document.getElementById(xfpa))  { document.getElementById(xfpa).style.display = xfpl; };
  xfpa = 'sumy'.concat(xfpz2);
  if  (document.getElementById(xfpa))  { document.getElementById(xfpa).style.display = xfps; };
}  //  end xfp

// ynav: sub topics navigation
///////////////////////////////////////////////////////////
function ynav()
{ var  ixy = 0,  itxy = ' ';
  if  (iyy <= 0)  { return; };
  itxy = '<form name="ynav" method="get">';
  itxy = itxy.concat('<select name="tp" size="1" onchange="window.location.href = tp.value;">');
  itxy = itxy.concat('<option value="#y0">... &raquo;scroll-to&laquo; ...</option>');
  for  (ixy = 1;  ixy < iyy;  ixy++)
  { if (ixy ==  1)
    { itxy = itxy.concat('<optgroup label="*** die Themen im einzelnen ... ***">'); };
    itxy = itxy.concat('<option value="#y');
    itxy = itxy.concat(ixy);  itxy = itxy.concat('">');
    itxy = itxy.concat(topix[ixy]);  itxy = itxy.concat('</option>'); }  // end for
  itxy = itxy.concat('</optgroup></select></form>');
  document.open();  document.write(itxy);  document.close();  itxy = '';
}  // end xnav


///////////////////////////////////////////////////////////
// scripts for site index aztoc.htm - aztoc.js - end     //
///////////////////////////////////////////////////////////


