/********************************/
/* JavaScript Code Datei sf1.js */
/* created 27-Dec-1998          */
/* last modified 22-Feb-1999    */
/********************************/


/*********************/
/* Globale Variablen */
/*********************/

var site_version = "0.30";
var email_adr ="Ruediger.Gemmrig@gemmrig.de";
var copyright = "HTML-Code and Design &copy; 1996-99 R&uuml;diger Gemmrig";
var first_install = "Version 0.01 established 02-Feb-1996";
var site_location = "http://www.gemmrig.de/sf1/sf1.html";


/*******************************************************/
/* Zeigt Versions-Informationen fuer die HTML-Seite an */
/*******************************************************/

function Version_Information()
{
  document.write("Version " , site_version);
}


/*****************************************************/
/* Zeigt Update-Informationen fuer die HTML-Seite an */
/*****************************************************/

function Last_Modified()
{
  document.write(" last updated " , document.lastModified , "<BR>");
}


/**************************************************/
/* Zeigt Copyright im HTML-Code einer Webseite an */
/**************************************************/

function Copyright()
{
  document.write(copyright);
}


/******************************************************/
/* Zeigt EMail-Adresse im HTML-Code einer Webseite an */
/******************************************************/

function Email_Adress()
{
  document.write("E-Mail: <A HREF=\'mailto:" + email_adr + "\'>" + email_adr +"</A>");
}


/**************************************/
/* Zeigt Fusszeile fuer Hauptseite an */
/**************************************/

function Foot_Line_Mainpage()
{
  document.write(site_location , "<BR>");
  document.write("Version " , site_version);
  document.write(" / " , first_install , " / ");
  document.write("last updated " , document.lastModified , "<BR>");
  document.write(copyright , "<BR>" );
  document.write("E-Mail <A HREF=\'mailto:" + email_adr + "\'>" + email_adr +"</A>");
}


/************************************************/
/* Zeigt einheitliche Fusszeile fuer Website an */
/************************************************/

function Foot_Line()
{
  document.write("Version " , site_version );
  document.write("&nbsp;&nbsp; last updated " , document.lastModified , "&nbsp;&nbsp; " , "<BR>");
  document.write(copyright , "<BR>");
  document.write("E-Mail <A HREF=\'mailto:" + email_adr + "\'>" + email_adr +"</A>");
}


/********************************************************/
/* Zeigt einheitliches Navigationsmenue fuer Website an */
/********************************************************/

function Navigation_Menue()
{
  document.write("<CENTER>");
  document.write("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5>");
  document.write("<TR BGCOLOR=\'#000000\'>");
  document.write("<TD COLSPAN=2 ALIGN=center VALIGN=middle BGCOLOR=\'#3b9c9c\'>");
  document.write("<FONT FACE=\'Arial\' SIZE=-1 COLOR=\'#ffff00\'><B><I>Go to:</I></B></FONT>");
  document.write("</TD>");
  document.write("</TR>");
  document.write("<TR BGCOLOR=\'#000000\'>");
  document.write("<TD ALIGN=center VALIGN=middle BGCOLOR=\'#1569c7\'>");
  document.write("<FONT FACE=\'Arial\' SIZE=-1 COLOR=\'#ffff00\'>");
  document.write("<B><A HREF=\'../sf1/sf1.html\' TARGET=\'_parent\'>Sauber F1 Team</A><BR>Startpage</B>");
  document.write("</FONT>");
  document.write("</TD>");
  document.write("<TD ALIGN=center VALIGN=middle BGCOLOR=\'#1569c7\'>");
  document.write("<FONT FACE=\'Arial\' SIZE=-1 COLOR=\'#ffff00\'>");
  document.write("<B><A HREF=\'../index.html\' TARGET=\'_parent\'>www.gemmrig.de</A><BR>Startpage</B>");
  document.write("</FONT>");
  document.write("</TD>");
  document.write("</TR>");
  document.write("</TABLE>");
  document.write("</CENTER>");
  document.write("<BR>");
}


/*************************************************************************/
/* Erstellt Nachrichten-Ticker in der Statuszeile eines Browser-Fensters */
/*************************************************************************/

/* Copyright (C)1996 Web Integration Systems, Inc. DBA Websys, Inc.
All Rights Reserved.
This applet can be re-used or modified, if credit is given in the source code.
We will not be held responsible for any unwanted effects due to the 
usage of this applet or any derivative. No warrantees for usability 
for any specific application are given or implied.
*/
function scrollit_r2l(seed)
{
  var m1 = "Welcome to my unofficial Sauber F1 Team fan page";
  var m2 = "  +++ History, statistics, info about racecars and drivers, pictures, news +++  ";
  var m3 = "  +++ English and German +++  ";
  var m4 = "  +++ On the Web since 02-February-1996 +++  ";
  var m5 = "  +++ Have fun +++  ";
  var msg=m1+m2+m3+m4+m5;
  var out = " ";
  var c   = 1;
  if (seed > 100)
  {
    seed--;
    var cmd="scrollit_r2l(" + seed + ")";
    timerTwo=window.setTimeout(cmd,100);
  }
  else
  {
    if (seed <= 100 && seed > 0)
    {
      for (c=0 ; c < seed ; c++)
      {
        out+=" ";
      }
      out+=msg;
      seed--;
      var cmd="scrollit_r2l(" + seed + ")";
      window.status=out;
      timerTwo=window.setTimeout(cmd,100);
    }
    else
    {
      if (seed <= 0)
      {
        if (-seed < msg.length)
        {
          out+=msg.substring(-seed,msg.length);
          seed--;
          var cmd="scrollit_r2l(" + seed + ")";
          window.status=out;
          timerTwo=window.setTimeout(cmd,100);
        }
        else
        {
          window.status=" ";
          timerTwo=window.setTimeout("scrollit_r2l(100)",75);
        }
      }
    }
  }
}


/***********************************************************/
/* Erstellt Nachrichten-Ticker im HTML-Code einer Webseite */
/***********************************************************/

// Anzuzeigender Text
var Text ="+++   Major update on 26-Jan-1998:   "
    Text += "+++   Added more pictures   "
    Text += "+++   New interview page   "
    Text += "              "
// Anfang des Textausschnittes
var Position = 0;
// Verzoegerungszeit in ms
var TickerTime = 200;
// Breite des Textelementes in Zeichen
var TickerBreite = 20;

function ticker()
{
  // Laenge des Textausschnittes
  var Laenge = TickerBreite * 2;
  // Laenge des anzuzeigenden Textes
  var TextLaenge = Text.length;
  // Endposition des Textausschnittes
  var Ende = Position + Laenge;
  // Textausschnitt
  var TickerText = Text.substring( Position, Ende );

  // Ueber das Ende des Textes hinausgegangen?
  if ( Ende > TextLaenge )
  {
    // Teil vom Textanfang anhaengen
    TickerText += Text.substring( 0, Ende - TextLaenge );
  }

    // Wert im Textelement aendern
    document.forms[0].elements[0].value = TickerText;
    // Position um ein Zeichen verschieben
    Position = ( Position + 1 ) % TextLaenge;
    // Nach der Verzoegerungszeit neuer Aufruf
    setTimeout( "ticker()", TickerTime );
  }


/*********************************************************/
/* Schreibt HTML-Quelltext fuer Ticker in die HTML-Seite */
/*********************************************************/

function writeticker_html()
{
  document.writeln( "<FORM>" );
  document.writeln( "Latest News:<BR>");
  document.write( "<INPUT TYPE=\'text\' " );
  document.write( "NAME=\'Nachrichtenelement\' " );
  document.writeln( "SIZE=" + TickerBreite + ">" );
  document.writeln( "</FORM>" );
}


/*********************************************************************/
/* Schreibt Weihnachts- und Neujahr-Gruesse automatisch in die Seite */
/*********************************************************************/

function christmas_greetings()
{
  datum = new Date();
  if ((datum.getDate() >= 24) && (datum.getDate() <= 31) && (datum.getMonth() +1 == 12))
  {
  document.writeln("<CENTER>");
  document.writeln("<FONT FACE=\'Avalon\' COLOR=\'#00ff00\' SIZE=+2>");
  document.writeln("<B>");
  document.writeln("I wish a Merry Christmas<BR> to all");
  document.writeln("Sauber Team fans out there.<BR> I hope for a");
  document.writeln("thrilling Formula One season " + (datum.getYear()+1+1900) + ".");
  document.writeln("</B>");
  document.writeln("</FONT>");
  document.writeln("</CENTER>");
  document.writeln("<BR><BR>");
  }
  if ((datum.getDate() >= 01) && (datum.getDate() <= 03) && (datum.getMonth() +1 == 01))
  {
  document.writeln("<CENTER>");
  document.writeln("<FONT FACE=\'Avalon\' COLOR=\'#00ff00\' SIZE=+2>");
  document.writeln("<B>");
  document.writeln("I wish a happy New Year<BR> to all");
  document.writeln("Sauber Team fans out there.<BR> I hope for a");
  document.writeln("thrilling Formula One season " + (datum.getYear()+1+1900) + ".");
  document.writeln("</B>");
  document.writeln("</FONT>");
  document.writeln("</CENTER>");
  document.writeln("<BR><BR>");
  }
}



