function init_ebenen()
{
   if (dom) {
      e_bild1 = document.getElementById("bild1").style;
      e_bild2 = document.getElementById("bild2").style;
      return;
   }
   if (ns) {
      e_bild1 = document.bild1;
      e_bild2 = document.bild2;
      return;
   }
   if (ie) {
      e_bild1 = bild1.style;
      e_bild2 = bild2.style;
      return;
   }
}

function ohase(bildbreite,bildhoehe,warten,rand,resize)
{
   pw = bildbreite;
   ph = bildhoehe;
   delay = warten;

   if (! ((document.layers) || (document.all) || (document.getElementById)) ) {
      top.location = "http://radio.just4you.at/";
      return;
   }

   if (! rand) {
      browserrand = 5;
   } else {
      browserrand = - (pw + 10);
   }

   browser();
   init_ebenen();

   movex = 6;
   movey = 1;

   posx = - (pw + 5);
   posy = (fh-5) - ph;

   if (! resize) setTimeout("bildwechsel_linksrechts()",10);
}

function bildwechsel_linksrechts()
{
   e_bild2.visibility = ho;

   e_bild1.left = getPos(posx);
   e_bild1.top = getPos(posy);
   e_bild1.visibility = so;

   setTimeout("bewegung_linksrechts()",10);
}

function bildwechsel_rechtslinks()
{
   e_bild1.visibility = ho;

   e_bild2.left = getPos(posx);
   e_bild2.top = getPos(posy);
   e_bild2.visibility = so;

   setTimeout("bewegung_rechtslinks()",10);
}

function bewegung_linksrechts()
{
   if (posy < - (fh + 5)) return;
   if (posx < fb + browserrand) {
      posx = posx + movex;
      posy = posy - movey;

      e_bild1.left = getPos(posx);
      e_bild1.top = getPos(posy);

      setTimeout("bewegung_linksrechts()",delay);
   }
   else {
      setTimeout("bildwechsel_rechtslinks()",10);
   }
}

function bewegung_rechtslinks()
{
   if (posy < - (fh + 5)) return;
   if (posx > - (pw + 5)) {
      posx = posx - movex;
      posy = posy - movey;

      e_bild2.left = getPos(posx);
      e_bild2.top = getPos(posy);

      setTimeout("bewegung_rechtslinks()",delay);
   }
   else {
      setTimeout("bildwechsel_linksrechts()",10);
   }
}