﻿if (document.getElementById)
	{
        var tempo36;
        var iHtmlScript;
        var fromPub = 0;
        var anim02_OffSetyPub=0;
        var HauteurPub = 0;
        var place = fromPub;
        var xpub = 4;
        var ypub = 4;
        var EcranlargPub = 0;
        var EcranhautPub = 0;
	}

function anim02_RandomDep()
	{
	numimagePub = Math.round(Math.random()*8);
	numimagePub ++;
	return(numimagePub);
	}
function anim02_VolimPub() {
	
	var objBulle = document.getElementById("pubBulle");
		
	if (document.getElementById) {
		if (place > EcranlargPub) xpub = (-(anim02_RandomDep()));
		if (place < fromPub) xpub = anim02_RandomDep();
			
		objBulle.style.left = (place += xpub)+"px";
		objBulle.style.top = (HauteurPub += ypub)+"px";
		
		if (HauteurPub>EcranhautPub) ypub = (-(anim02_RandomDep()));
		if (HauteurPub<0) ypub = anim02_RandomDep();
		
		tempo36 = setTimeout('anim02_VolimPub()', 50);
	}
}

function anim02_OffSet()
	{
	if (navigator.appName=="Microsoft Internet Explorer")
   		anim02_OffSetyPub = document.body.scrollTop;
	}

function anim02_StopVol()
	{
	clearTimeout(tempo36);
	}
function anim02_StartVol()
	{

	var r = new RegExp("(.*)[0-9]");
	var objBulle = document.getElementById("pubBulle");
	var objDiv = document.getElementById("divBulle");
	
	EcranlargPub = r.exec(objDiv.style.width)[0] - r.exec(objBulle.style.width)[0];
	EcranhautPub = r.exec(objDiv.style.height)[0] - r.exec(objBulle.style.height)[0];

	tempo36 = setTimeout('anim02_VolimPub()', 50);
	}


