var x = 0;
var y = 0;
var speed = 0.7;
var zahl = 0;
var art = (0);
var wo = 0;
var p_object = '';

var NS = (document.layers) ? true:false;
var IE = (document.all) ? true:false;
var DOM = ((document.getElementById)&&(!IE)) ? true:false;


function fliegen()
{
   x = x + speed;

 if (DOM)
 {
   if (art < (1)) {p_object = document.getElementById("ballon");}
   else if (art > (0)) {p_object = document.getElementById("zepp");}
   p_object.style.left = x;
   p_object.style.top = y;
}
 else if (NS)
 {
   if (art < (1)) {p_object = document.ballon;}
   else if (art > (0)) {p_object = document.zepp;}
   p_object.left = x;
   p_object.top = y;
}
 else if (IE)
 {
   if (art < (1)) {p_object = document.all["ballon"];}
   else if (art > (0)) {p_object = document.all["zepp"];}
   p_object.style.pixelLeft = x;
   p_object.style.pixelTop = y;
 }
 if (zahl > (0)) { y = y - 0.5; };

 if (zahl < (1)) { y = x;
    if (x > (628)) { speed = 1; };
    if (x > (150)) { speed = 0.75; };
    if (x > (200)) { speed = 0.5; };
    if (x > (248)) { y = 248; };
    if (x > (500)) { art = 2; }};


if (wo < (1)) { wo = 0;
    if ( x > (315)) { x = ( x + 395 );}};
    if ( x > (315)) { wo = 1; };

 if (x > (690)) { zahl = zahl + 1; };
 if (x > (500)) { art = 2; }

 if (x > (999)) {
         x = 0;
         zahl = 0;
         y = 0;
         speed = 1;
         art = 0;
         wo = 0;
 };

 setTimeout("fliegen()",30);

}