function AnzahlHtmlSeiten()
{
 // Gibt Anzahl der Html-Dateien = maximaler SeitenIndex zurueck
 s=3;
 return s;
}


function aktuellerSeitenIndex()
{
 // Gibt den SeitenIndex der gerade angezeigten Html-Dateien zurueck

 u=parent.ZetMagazinFrmAnzeige.document.URL;
 d=u.substr(u.lastIndexOf("index"),(u.length-1));

 if (d == "index.htm")
 {
  i=1;
 }
 else
 {
  i=parseInt(d.substr(7,3));
 }

 return i;
}


function SIzuHtmlDaNa(i)
{
 // Gibt den Html-Dateien-Name zum SeitenIndex zurueck

 if (i > maxSI) i=1;
 if (i < 1) i=maxSI;

 if (i == 1)
 {
  d="index.htm";
 }
 else
 {
  i=unescape(i);
  if (i.length == 1) i="00" + i;
  if (i.length == 2) i="0" + i;
  d="index_s"+i+".htm";
 
 }

 return d;
}


function Seitenwechsel(p)
{

 if (p == 1)
 {
  for(i=0;i<document.Form1.D1.length;++i)
  {
   if(document.Form1.D1.options[i].selected == true) w=document.Form1.D1.options[i].value;
  }
 }
 else
 {
  for(i=0;i<document.Form1.D2.length;++i)
  {
   if(document.Form1.D2.options[i].selected == true) w=document.Form1.D2.options[i].value;
  }
 }

 if (d.length > 1)
 {
  parent.ZetMagazinFrmAnzeige.location.href=SIzuHtmlDaNa(w);
 }
 else
 {
  if (p == 1)
  {
   document.Form1.D1.focus();
  }
  else
  {
   document.Form1.D2.focus();
  }
 }
}


function HtmlCodeKopfSeitenzahl()
{
 document.writeln('<table height="50" width="100%" border="0">');
 document.writeln('  <tr>');
 document.writeln('    <td vAlign="center"><strong><font size="5">Der&nbsp; <em>');
 document.writeln('    <font color="#ff00ff">B</font><font color="#400040"> u</font><font color="#008080">');
 document.writeln('    c</font><font color="#ff8000"> h</font><font color="#0000ff"> - Tipp</font></em></font></strong></td>');
 document.writeln('    <td vAlign="center" align="middle" width="135"><font color="#808080"><b>');
 document.writeln('    Seite ' + aktSI + ' von ' + maxSI + '</b></font></td>');
 document.writeln('  </tr>');
 document.writeln('</table>');
}


function HtmlCodeSeitewahl(p)
{
 // p = Position in der Html-Datei

 z=SIzuHtmlDaNa(aktSI-1); // Linkdatei - zurueck
 w=SIzuHtmlDaNa(aktSI+1); // Linkdatei - weiter

 P=unescape(p);

 document.writeln('  <table border="0" cellspacing="0" width="100%" cellpadding="0">');
 document.writeln('    <tr>');
 document.writeln('      <td width="100%" align="center">');
 document.writeln('    <table border="0" cellspacing="1" width="500">');
 document.writeln('      <tr>');
 document.writeln('        <td width="49" bgcolor="#808080">');
 document.writeln('        <a href="' + z + '">');
 document.writeln('        <img border="0" src="../../grafik/s-strg-sz.gif" alt="&gt;&gt; Eine Seite zurück" width="49" height="30"></a></td>');
 document.writeln('        <td bgcolor="#00FFFF" align="center">');
 document.writeln('          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2">');
 document.writeln('            <tr>');
 document.writeln('              <td><select size="1" name="D' + p + '">');
 document.writeln('              <option selected value="0">Wähle eine andere Seite ...</option>');

 for(var i = 1; i <= maxSI; i++)
 {
  if (i != aktSI)
  {
   document.writeln('              <option value="' + i + '">Seite ' + i + '</option>');
  }
 }


 document.writeln('              </select></td>');
 document.writeln('              <td width="10">&nbsp;</td>');
 document.writeln('              <td>');
 document.writeln('              <input type="button" value=" &gt;&gt; " name="B' + p + '" onclick="Seitenwechsel(' + p + ')"></td>');
 document.writeln('            </tr>');
 document.writeln('          </table>');
 document.writeln('        </td>');
 document.writeln('        <td width="49" align="right" bgcolor="#808080">');
 document.writeln('        <a href="' + w + '">');
 document.writeln('        <img border="0" src="../../grafik/s-strg-sw.gif" alt="&gt;&gt; Eine Seite weiter" width="49" height="30"></a></td>');
 document.writeln('      </tr>');
 document.writeln('    </table>');
 document.writeln('      </td>');
 document.writeln('    </tr>');
 document.writeln('  </table>');
}
