function get_all_elements ()
 {div01 = get_element ('div01_id');
  div02 = get_element ('div02_id');
  img01 = get_element ('img01_id');
  img02 = get_element ('img02_id');
  txt01 = get_element ('txt01_id');
  txt02 = get_element ('txt02_id');
  txt03 = get_element ('txt03_id');
  td01 = get_element ('td01_id');
  td02 = get_element ('td02_id');
  td03 = get_element ('td03_id');}

browser = get_browser ();  // Web-Browser
fhoehe = 0;      // Fensterhöhe
fbreite = 0;     // Fensterbreite
bhoehe = 0;      // Bild-Höhe
bbreite = 0;     // Bild-Breite
thoehe = 0;      // Text-Höhe
tbreite = 0;     // Text-Breite
shoehe = 0;      // Status-Höhe
sbreite = 0;     // Status-Breite
bloaded = false; // Zeiger: Bild geladen
mpos = 0;        // Bild-Position zur Mouse
mposx = 0;       // Mouse-Position für X-Achse
mposy = 0;       // Mouse-Position für Y-Achse
toppos = 0;      // Korrektur für Y-Position
okorr = 0;       // Korrektur für Opera
nkorr = 0;       // Korrektur für Netscape
ekorr = 0;       // Korrektur für Explorer

function init_picture (typ)
 {fhoehe = get_page_height ();
  fbreite = get_page_width ();
  shoehe = 0;
  sbreite = 0;
  bloaded = false;
  div01.style.width = "0px";
  div01.style.height = "0px";
  div02.style.width = "0px";
  div02.style.height = "0px";
  img01.src = "Pixel.gif";
  img01.style.width = "0px";
  img01.style.height = "0px";
  img01.style.borderWidth = "1px";
  img01.style.margin = "0px";
  img02.src = "Pixel.gif";
  img02.style.width = "0px";
  img02.style.height = "0px";
  txt01.firstChild.nodeValue = "";
  txt01.style.margin = "3px";
  txt02.firstChild.nodeValue = "";
  txt02.style.margin = "3px";
  txt03.firstChild.nodeValue = "";
  td01.style.borderWidth = "0px";
  td01.style.backgroundColor = "transparent";
  td02.style.borderWidth = "0px";
  td02.style.backgroundColor = "transparent";
  td02.style.width = "200px";
  td03.style.borderWidth = "0px";
  td03.style.backgroundColor = "transparent";
  if (browser == "Opera")
   {okorr = 1;}
  else if (browser == "Netscape")
   {nkorr = 1;
    if (typeof (document.addEventListener) == "function")
     {document.addEventListener ("mousemove", check_mouse_position, true);}}
  else if (browser == "Explorer")
   {ekorr = 1;}}

function init_top_pos ()
 {toppos = window.event.offsetY;}

function save_top_pos (max)
 {if (window.event.offsetY >= max)
   {toppos = window.event.offsetY;}
  else
   {if ((window.event.offsetY >= 125) && (window.event.offsetY < 200))
     {toppos = toppos - Math.ceil (window.event.offsetY / 2);}
    else if ((window.event.offsetY >= 200) && (window.event.offsetY < max))
     {toppos = toppos - Math.ceil (window.event.offsetY / 1.5);}}}

function inc_top_pos (space)
 {toppos = toppos + space;}

function check_mouse_position (event)
 {mposx = event.pageX;
  mposy = event.pageY;}

function show_picture (typ, pict, txt)
 {div01.style.visibility = 'visible';
  div02.style.visibility = 'visible';
  div02.style.height = "100px";
  div02.style.width = "100px";
  img02.src = "YinYang.gif";
  img02.style.height = "0px";
  img02.style.width = "0px";
  bloaded = false;
  show_status ();

  if (!bloaded)
   {td03.style.borderWidth = "1px";
    td03.style.backgroundColor = "#FFFFE0";
    switch_status ();}

  switch (typ)
   {case '400x550L': bhoehe = 400;
                     bbreite = 550 + okorr * 3;
                     thoehe = 25;
                     tbreite = 0;
                     mpos = 15 + ekorr * 10;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "550px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "0px";
                     img01.style.marginBottom = "3px";
                     txt01.firstChild.nodeValue = "";
                     txt02.firstChild.nodeValue = txt;
                     td01.style.width = "0px";
                     td01.style.borderWidth = "0px";
                     td01.style.backgroundColor = "transparent";
                     td02.style.borderWidth = "1px";
                     td02.style.backgroundColor = "#FFFFE0";
                     break;
    case '400x550R': bhoehe = 400;
                     bbreite = 550 + okorr * 3;
                     thoehe = 25;
                     tbreite = 0;
                     mpos = -566 + ekorr * 5;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "550px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "0px";
                     img01.style.marginBottom = "3px";
                     txt01.firstChild.nodeValue = "";
                     txt02.firstChild.nodeValue = txt;
                     td01.style.width = "0px";
                     td01.style.borderWidth = "0px";
                     td01.style.backgroundColor = "transparent";
                     td02.style.borderWidth = "1px";
                     td02.style.backgroundColor = "#FFFFE0";
                     break;
    case '400x600L': bhoehe = 400;
                     bbreite = 600 + okorr * 3;
                     thoehe = 25;
                     tbreite = 0;
                     mpos = 15 + ekorr * 10;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "600px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "0px";
                     img01.style.marginBottom = "3px";
                     txt01.firstChild.nodeValue = "";
                     txt02.firstChild.nodeValue = txt;
                     td01.style.width = "0px";
                     td01.style.borderWidth = "0px";
                     td01.style.backgroundColor = "transparent";
                     td02.style.borderWidth = "1px";
                     td02.style.backgroundColor = "#FFFFE0";
                     break;
    case '400x600R': bhoehe = 400;
                     bbreite = 600 + okorr * 3;
                     thoehe = 25;
                     tbreite = 0;
                     mpos = -616 + ekorr * 5;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "600px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "0px";
                     img01.style.marginBottom = "3px";
                     txt01.firstChild.nodeValue = "";
                     txt02.firstChild.nodeValue = txt;
                     td01.style.width = "0px";
                     td01.style.borderWidth = "0px";
                     td01.style.backgroundColor = "transparent";
                     td02.style.borderWidth = "1px";
                     td02.style.backgroundColor = "#FFFFE0";
                     break;
    case '450x600L': bhoehe = 450;
                     bbreite = 600 + okorr * 3;
                     thoehe = 25;
                     tbreite = 0;
                     mpos = 15 + ekorr * 10;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "600px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "0px";
                     img01.style.marginBottom = "3px";
                     txt01.firstChild.nodeValue = "";
                     txt02.firstChild.nodeValue = txt;
                     td01.style.width = "0px";
                     td01.style.borderWidth = "0px";
                     td01.style.backgroundColor = "transparent";
                     td02.style.borderWidth = "1px";
                     td02.style.backgroundColor = "#FFFFE0";
                     break;
    case '450x600R': bhoehe = 450;
                     bbreite = 600 + okorr * 3;
                     thoehe = 25;
                     tbreite = 0;
                     mpos = -616 + ekorr * 5;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "600px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "0px";
                     img01.style.marginBottom = "3px";
                     txt01.firstChild.nodeValue = "";
                     txt02.firstChild.nodeValue = txt;
                     td01.style.width = "0px";
                     td01.style.borderWidth = "0px";
                     td01.style.backgroundColor = "transparent";
                     td02.style.borderWidth = "1px";
                     td02.style.backgroundColor = "#FFFFE0";
                     break;
    case '550x400L': bhoehe = 550;
                     bbreite = 400 + okorr * 3;
                     thoehe = 0;
                     tbreite = 100;
                     mpos = 15 + ekorr * 10;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "400px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "3px";
                     img01.style.marginBottom = "0px";
                     txt01.firstChild.nodeValue = txt;
                     txt02.firstChild.nodeValue = "";
                     td01.style.width = "100px";
                     td01.style.borderWidth = "1px";
                     td01.style.backgroundColor = "#FFFFE0";
                     td02.style.borderWidth = "0px";
                     td02.style.backgroundColor = "transparent";
                     break;
    case '550x400R': bhoehe = 550;
                     bbreite = 400 + okorr * 3;
                     thoehe = 0;
                     tbreite = 100;
                     mpos = ((bbreite + tbreite + 20) * -1) + ekorr * 5;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "400px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "3px";
                     img01.style.marginBottom = "0px";
                     txt01.firstChild.nodeValue = txt;
                     txt02.firstChild.nodeValue = "";
                     td01.style.width = tbreite + "px";
                     td01.style.borderWidth = "1px";
                     td01.style.backgroundColor = "#FFFFE0";
                     td02.style.borderWidth = "0px";
                     td02.style.backgroundColor = "transparent";
                     break;
    case '600x400L': bhoehe = 600;
                     bbreite = 400 + okorr * 3;
                     thoehe = 0;
                     tbreite = 100;
                     mpos = 15 + ekorr * 10;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "400px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "3px";
                     img01.style.marginBottom = "0px";
                     txt01.firstChild.nodeValue = txt;
                     txt02.firstChild.nodeValue = "";
                     td01.style.width = "100px";
                     td01.style.borderWidth = "1px";
                     td01.style.backgroundColor = "#FFFFE0";
                     td02.style.borderWidth = "0px";
                     td02.style.backgroundColor = "transparent";
                     break;
    case '600x400R': bhoehe = 600;
                     bbreite = 400 + okorr * 3;
                     thoehe = 0;
                     tbreite = 100;
                     mpos = ((bbreite + tbreite + 20) * -1) + ekorr * 5;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "400px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "3px";
                     img01.style.marginBottom = "0px";
                     txt01.firstChild.nodeValue = txt;
                     txt02.firstChild.nodeValue = "";
                     td01.style.width = tbreite + "px";
                     td01.style.borderWidth = "1px";
                     td01.style.backgroundColor = "#FFFFE0";
                     td02.style.borderWidth = "0px";
                     td02.style.backgroundColor = "transparent";
                     break;
    case '600x450L': bhoehe = 600;
                     bbreite = 450 + okorr * 3;
                     thoehe = 0;
                     tbreite = 100;
                     mpos = 15 + ekorr * 10;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "450px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "3px";
                     img01.style.marginBottom = "0px";
                     txt01.firstChild.nodeValue = txt;
                     txt02.firstChild.nodeValue = "";
                     td01.style.width = "100px";
                     td01.style.borderWidth = "1px";
                     td01.style.backgroundColor = "#FFFFE0";
                     td02.style.borderWidth = "0px";
                     td02.style.backgroundColor = "transparent";
                     break;
    case '600x450R': bhoehe = 600;
                     bbreite = 450 + okorr * 3;
                     thoehe = 0;
                     tbreite = 100;
                     mpos = ((bbreite + tbreite + 20) * -1) + ekorr * 5;
                     div01.style.height = bhoehe + thoehe + "px";
                     div01.style.width = bbreite + tbreite + "px";
                     img01.src = pict;
                     img01.style.width = "450px";
                     img01.style.height = bhoehe + okorr + "px";
                     img01.style.marginRight = "3px";
                     img01.style.marginBottom = "0px";
                     txt01.firstChild.nodeValue = txt;
                     txt02.firstChild.nodeValue = "";
                     td01.style.width = tbreite + "px";
                     td01.style.borderWidth = "1px";
                     td01.style.backgroundColor = "#FFFFE0";
                     td02.style.borderWidth = "0px";
                     td02.style.backgroundColor = "transparent";
                     break;

    default: alert ('Es wurde keine gültige Typ übergeben !');
             break;}}

function move_picture ()
 {if (browser != "Netscape")
   {mposx = window.event.x;
    mposy = toppos + window.event.offsetY;}

  div01.style.left = mposx + mpos + "px";
  div01.style.top = mposy + "px";
  div02.style.left = mposx + mpos + (bbreite / 2) - 150 + "px";
  div02.style.top = mposy + (bhoehe / 2) - 50 + "px";}

function hide_picture ()
 {div01.style.visibility = 'hidden';
  div02.style.visibility = 'hidden';
  init_picture ();}

function show_status ()
 {if ((shoehe < 100) && (!bloaded))
   {shoehe = shoehe + 5;
    sbreite = sbreite + 5;
    img02.style.height = shoehe + "px";
    img02.style.width = sbreite + "px";

    setTimeout ("show_status ()", 20);}}

function hide_status ()
 {bloaded = true;
  txt03.firstChild.nodeValue = "";
  td03.style.borderWidth = "0px";
  td03.style.backgroundColor = "transparent";
  if (shoehe > 0)
   {shoehe = shoehe - 5;
    sbreite = sbreite - 5;
    img02.style.height = shoehe + "px";
    img02.style.width = sbreite + "px";

    setTimeout ("hide_status ()", 20);}}

function switch_status ()
 {if (!bloaded)
   {if (txt03.firstChild.nodeValue == "Das Bild wird geladen ...")
     {txt03.firstChild.nodeValue = "Einen Moment Geduld bitte ...";}
    else
     {txt03.firstChild.nodeValue = "Das Bild wird geladen ...";}

    setTimeout ("switch_status ()", 2500);}}
