images = new Array(3);

images[0] = "annonce-jeu.swf";

/*images[1] = "orc250.swf";

images[2] = "Velo250.swf";*/

index = Math.floor(Math.random() * images.length);



if (document.getElementById) {
	fromPub = 0;
	offsetyPub = 0;
	HauteurPub = 0;
	place = fromPub;
	xpub = 1;
	ypub = 1;
}

function RandomDep() {
	numimagePub= Math.round(Math.random()*4);
	numimagePub ++;
	return(numimagePub);
}

function VolimPub() {
	if (document.getElementById) {
		var div = document.getElementById("pubBulle");
		EcranlargPub = document.body.clientWidth - 250; //div.offsetWidth;
		EcranhautPub = document.body.clientHeight - div.offsetHeight;	
		if (place > EcranlargPub)
			xpub = (-(RandomDep()));
		if (place < fromPub)
			xpub = RandomDep();
		div.style.left = (place += xpub) + 'px';
		div.style.top = (HauteurPub += ypub) + offsetyPub + 'px';
		if (HauteurPub>EcranhautPub)
			ypub = (-(RandomDep()));
		if (HauteurPub<0)
			ypub = RandomDep();
		tempo36 = setTimeout('VolimPub()', 50);
		}
	}

function OffSet()
	{
	if (navigator.appName=="Microsoft Internet Explorer")
   		offsetyPub = document.body.scrollTop;
	}

function closePub()
    {
    clearTimeout(tempo36);
    var div = document.getElementById("pubBulle");
    div.parentNode.removeChild(div);
    }
window.onload = VolimPub;
onscroll = OffSet;