
/*
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
if (document.getElementById)
	{
	fromPub = 0;
	iVolePub = new Image;
	iVolePub.src = "images/terani43b.gif";
	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.all)
		{
		EcranlargPub = document.body.clientWidth-iVolePub.width;
		EcranhautPub = document.body.clientHeight-iVolePub.height;	
		}
	else
		{
		EcranlargPub = screen.width-100;
		EcranhautPub = screen.height-100;
		}
	if (document.getElementById)
		{
		if (place > EcranlargPub)
			xpub = (-(RandomDep()));
		if (place < fromPub)
			xpub = RandomDep();
		document.getElementById("pubBulle").style.left = (place = place + xpub);
		document.getElementById("pubBulle").style.top = (HauteurPub += ypub)+offsetyPub;
		if (HauteurPub>EcranhautPub)
			ypub = (-(RandomDep()));
		if (HauteurPub<0)
			ypub = RandomDep();
		tempo36 = setTimeout('VolimPub()', 10);
		}
	}

function OffSet()
	{
	if (navigator.appName=="Microsoft Internet Explorer")
   		offsetyPub = document.body.scrollTop;
	}
window.onload = VolimPub;
onscroll = OffSet;




function VerifPlugIn(ExtensionFile)
	{
	var IsEnabled = true;
  if (navigator.appName == "Netscape")
  	{
    IsEnabled = false;
		for(var x=0;(x<navigator.mimeTypes.length && !IsEnabled);x++)
			{
			if(navigator.mimeTypes[x].suffixes.indexOf(ExtensionFile)>=0)
				IsEnabled = navigator.mimeTypes[x].enabledPlugin;
 			}
    }
	return IsEnabled;
	}

		
function PlaySound(MyName,MyExtension,MyLoop)
	{
	var AudioEnable = VerifPlugIn(MyExtension),TheLoop = '';
  if (navigator.appName == "Netscape" && MyLoop==1) TheLoop='true';
	if (AudioEnable) eval('document.'+MyName+'.play('+TheLoop+')');
  }

    
function StopSound(MyName,MyExtension)
	{
	var AudioEnable = VerifPlugIn(MyExtension);
	if (AudioEnable) eval('document.'+MyName+'.stop()');
  }




function stopError() {
return true;
}
window.onerror = stopError;



