var flashlayers=0;
// start flash layer
function start_layer(layername,top,left,width,height){
	layername="Flash"+layername;
	if(!left) left = 0; 
	document.write('<DIV title="Cliquer sur l\'une des images ou l\'une des entités" onmouseover="Effacetout();" ID="'+layername+'" STYLE="z-index:0; position:relative; top:'+top+'; left:'+left+'; width:'+width+'; heigt:'+height+';">');
}

// end flash layer
function end_layer(){
	document.write('</DIV>');
}

// start writing flash dHTML layer with fixed sized flash
//function startFlash(top,left,flashfile,flashwidth,flashheight)
function startFlash(flashfile,flashwidth,flashheight)
{
	if(which.ieWin){
		start_layer(flashlayers,0,0,flashwidth,flashheight);
		ID=flashfile;
		for(i=0; i<ID.length; i++)
		{
			if(ID.substring(i,i+1) == "/") ID=ID.substring(0,i) + ID.substring(i+1);
			if(ID.substring(i,i+1) == ".") ID=ID.substring(0,i) + ID.substring(i+1);
		}
		if(which.ie || which.isFlashNS || which.dom) {
			document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0" WIDTH="'+flashwidth+'" HEIGHT="'+flashheight+'">');
			document.write('<PARAM NAME="MOVIE" VALUE="'+flashfile+'">');
			document.write('<PARAM NAME="PLAY" VALUE="true">');
			document.write('<PARAM NAME="LOOP" VALUE="true">');
			document.write('<PARAM NAME="QUALITY" VALUE="best">');
			document.write('<PARAM NAME="WMODE" VALUE="transparent">');
			document.write('<EMBED NAME="'+ID+'" ID="'+ID+'" SRC="'+flashfile+'" WIDTH="'+flashwidth+'" HEIGHT="'+flashheight+'" MENU="false" loop="true" QUALITY="BEST" BORDER="0" ALIGN="TOP" swliveConnect=true wmode="transparent" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
			document.write('</OBJECT>');
		}
		end_layer();
	}
}

