// JavaScript Document

function displayFlash(url,titre,width,height)
{
document.write(getHtmlFlash(url,titre,width,height));
}

function getHtmlFlash(url,titre,width,height)
{
html='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" align="middle">';
html+='<param name="movie" value="'+url+'" />';
html+='<param name="quality" value="high" />';
html+='<param name="wmode" value="transparent"></param>';
html+='<param name="scale" value="noscale" />';
html+='<embed src="'+url+'" quality="high" scale="noscale" wmode="transparent" width="'+width+'" height="'+height+'" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
html+='</object>';

return html;
}

function menuOver(id)
{
var i,obj;
for(i=0;i<4;i++)
	{
	obj=document.getElementById('M'+i);
	obj.style.visibility='hidden';
	}
obj=document.getElementById('M'+id);
if (obj)	obj.style.visibility='visible';
}

function imgOver(obj)
{
if (obj)
	{
	obj.src=obj.src.replace('.png','-Over.png')
	}
}

function imgOut(obj)
{
if (obj)
	{
	obj.src=obj.src.replace('-Over.png','.png')
	}
}


function makeFocus(obj)
{
if (obj) obj.className='Focus';
}

function makeBlur(obj)
{
if (obj) obj.className='';
}


// =============== EFFETS SUR LES IMAGES =============== //

var duree=2;
var tmo=null,e=null;

function makeEffectIn(n)
{
var objId='Image'+n;
n=(n+1)%3;

var obj=document.getElementById(objId);
obj.src=tabImages.pop();
tabImages.unshift(obj.src);

e=new Effect.Appear(objId,{duration:duree});
tmo=setTimeout('makeEffectOut('+n+')',duree*1000+200);
}

function makeEffectOut(n)
{
n=n%3;
var objId='Image'+n;
e=new Effect.Fade(objId,{duration:duree});
tmo=setTimeout('makeEffectIn('+n+')',duree*1000+200);
}


