_banners = new Array;
var count;
var div2;

function aleatoire(N) {
      return (Math.round((N-1)*Math.random()));
   }

function addBanner(bannerHTML) {
_banners[_banners.length?_banners.length:0]=bannerHTML;
}

function doIt() {
count++;
count=count % _banners.length;
div2.setBody(_banners[count]);
}

function SourceFlash(src,width,height) {
	ch="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='"+width+"' height='"+height+"'>          <param name=movie value='"+src+"'><param name=quality value=high>          <embed src='"+src+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'>          </embed>         </object>";
	return ch;
}

function SourceImage(src,lien,width,height) {
	ch="<table border=0 cellpadding=0 cellspacing=0><tr><td><a href='"+lien+"' target=_blank><img border=0 alt='lien vers "+lien+"' src='"+src+"' width='"+width+"' height='"+height+"'></a></td></tr></table>";
	return ch;
}

function DefinitionPubSite() {
	addBanner(SourceFlash('mousquetaires.swf','400','60'));
	//addBanner(SourceImage('banniere3.gif','http://www.htdfdirect.com','468','60'));
	addBanner(SourceFlash('alfa-adsl.swf','468','60'));

	count=aleatoire(_banners.length);
	div2 = new NewDiv2(window, "banner", _banners[count],0,0,0,0,500,false);
	setInterval('doIt()',12000);
	div2.output();
}

function AffichePub() {
div2.output();
}
