// JavaScript Document

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

function getHtmlFlash(url,titre,width,height,flashvars)
{
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" />';
html+='<param name="scale" value="noscale" />';
html+='<param name="flashvars" value="'+flashvars+'" />';
html+='<embed src="'+url+'" quality="high" scale="noscale" wmode="transparent" width="'+width+'" height="'+height+'" flashvars='+flashvars+' align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
html+='</object>';

return html;
}

function realReplace (sStr,sFind,sReplace)
{
//Replace an element for each occurence (js replace doesn't seem to do correctly)
var lPos=0;
var lCount=0;
var i;

//Count occurences
lPos=sStr.indexOf (sFind,lPos)
while (lPos!=-1)
	{
	lCount++;
	lPos=sStr.indexOf (sFind,lPos+1);
	}
//replace
for (i=0;i<lCount;i++)	sStr=sStr.replace (sFind, sReplace);
return(sStr);
}


