/******************************************************************************
*
* MODUL:          index.js 
*
*------------------------------------------------------------------------------
*
* VERWENDUNG:     HOMEPAGE WILLY BELL 
*
*------------------------------------------------------------------------------
*
* AUTOR:          Konrad Manhart
* ERSTELLT:       22.05.2005
* LETZTES UPDATE: 21.06.2005
*
******************************************************************************/
///////////////////////////////////////////////////////////////////////////////
// Globale Variablen
var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0; // Browsertyp und
                                                // Sprachvariante
var giWndParentX = 0, giWndParentY = 0;         // Fensterbreite, Fensterhöhe
var giWndChildX  = 0, giWndChildY  = 0;         // Fensterbreite, Fensterhöhe

/******************************************************************************
* FUNKTION:     OnLoad()
*
* BESCHREIBUNG: Aufrufsingularisierung aller Funktionen, die in diesem
*               HTML-Ereignis benötigt werden.
******************************************************************************/
function fnOnLoad()
{
 fnSetVersion();
 fnIntroduction();
 fnSetWndParentXY();
 fnSetWndChildXY(0);
 fnSetPos();
 } // end function

/******************************************************************************
* FUNKTION:     OnResize()
*
* BESCHREIBUNG: Aufrufsingularisierung aller Funktionen, die in diesem
*               HTML-Ereignis benötigt werden.
******************************************************************************/
function fnOnResize()
{
 fnSetWndParentXY();
 fnSetWndChildXY(0);
 fnSetPos();
 } // end function

/******************************************************************************
* FUNKTION:     Introduction()
*
* BESCHREIBUNG: Gibt dem Anwender bekannt, dass ein dynamischer Navigator
*               vorhanden ist.
******************************************************************************/
function fnIntroduction()
{
 var sText0 = "Willkommen auf der Homepage von WILLY BELL!\n\n";
 var sText1 = "Zum Navigieren fahren Sie bitte mit dem Mauszeiger\n";
 var sText2 = "in den linken Fensterbereich.";
 alert(sText0 + sText1 + sText2);  
 } // end function

/******************************************************************************
* FUNKTION:     SetVersion()
*
* BESCHREIBUNG: Initialisiert die globalen Variablen für die Feststellung des
*               Browsertyps und der Sprachvariante.
******************************************************************************/
function fnSetVersion()
{
 if(window.opera)
    OP = 1;

 if(document.getElementById)
 {
  DHTML = 1;
  DOM   = 1;
  } // end if   

 if(document.all && !OP)
 {
  DHTML = 1;
  MS    = 1;
  } // end if   
 
 if(window.netscape && window.screen && !DOM && !OP)
 {
  DHTML = 1;
  NS    = 1;
  } // end if   
 } // end function

/******************************************************************************
* FUNKTION:     SetWndParentXY()
*
* BESCHREIBUNG: Speichert die veränderten Fensterdimensionen.
******************************************************************************/
function fnSetWndParentXY()
{
 if(NS) 
 {
  giWndParentX = parent.innerWidth;
  giWndParentY = parent.innerHeight;
  } // end if
 else if(MS)
 {
  giWndParentX = parent.document.body.offsetWidth;
  giWndParentY = parent.document.body.offsetHeight;
  } // end if else
 else
 {
  giWndParentX = parent.innerWidth;
  giWndParentY = parent.innerHeight;
  } // end if else
 } // end function

/******************************************************************************
* FUNKTION:     SetWndChildXY(iFrameNo)
*
* BESCHREIBUNG: Speichert die veränderten Fensterdimensionen.
******************************************************************************/
function fnSetWndChildXY(iFrameNo)
{
 if(NS) 
 {
  giWndChildX = parent.frames[iFrameNo].innerWidth;
  giWndChildY = parent.frames[iFrameNo].innerHeight;
  } // end if
 else if(MS)
 {
  giWndChildX = parent.frames[iFrameNo].document.body.offsetWidth;
  giWndChildY = parent.frames[iFrameNo].document.body.offsetHeight;
  } // end if else
 else
 {
  giWndChildX = parent.frames[iFrameNo].innerWidth;
  giWndChildY = parent.frames[iFrameNo].innerHeight;
  } // end if else
 } // end function

/******************************************************************************
* FUNKTION:     SetPos()
*
* BESCHREIBUNG: Setzt die Positionen in Proportion der Fensterdimension.
*               (Für Navigator)
******************************************************************************/
function fnSetPos()
{
 var iHeight = giWndParentY - giWndChildY; // Fensterclient

 if(iHeight < 410)
    iHeight = 410;

 if(DOM || MS)
    parent.frames[1].document.getElementById("navi_table00").style.height = iHeight;
 else if(NS)
    parent.frames[1].document.getElementById("navi_table00").height = iHeight;
 else if(OP)
    parent.frames[1].document.getElementById("navi_table00").style.pixelHeight = iHeight;
 } // end function

///////////////////////////////////////////////////////////////////////////////
// EOF

