function insertFlash(xmlFile)
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="650" height="550">');
		document.write('<param name="movie" value="showroom/diapo.swf">');
		document.write('<param name="quality" value="high">');
		document.write('<param name="flashvars" value="fileXml='+xmlFile+'"\N />');
		document.write('<embed src="showroom/diapo.swf" FlashVars="fileXml='+xmlFile+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="550"></embed>');
		document.write('</object>');
	}
	
function showImg(cat, image, max)
	{
		image = parseInt(image);
		max = parseInt(max);
		if(image < 1)
			{
				image = max;
				document.getElementById('galerie').innerHTML = '<img src="cuisines/'+cat+'/images/'+image+'.jpg" alt="" id="gdImg" class="galImg" height="350"/>';
			}
		if(image > max)
			{
				image = 1;
				document.getElementById('galerie').innerHTML = '<img src="cuisines/'+cat+'/images/'+image+'.jpg" alt="" id="gdImg" class="galImg" height="350"/>';
			}
		else
			{
				document.getElementById('galerie').innerHTML = '<img src="cuisines/'+cat+'/images/'+image+'.jpg" alt="" id="gdImg" class="galImg" height="350"/>';
			}
			
		var imageSuiv = parseInt(image) + 1;
		var imagePrec = parseInt(image) - 1;
		
		var controles = '<img src="data/jpg/precedente.jpg" alt="Precedente" id="imgPrec" class="bout cursor" onclick="showImg(\''+cat+'\', \''+imagePrec+'\', \''+max+'\');"/>';
		var controles = controles+'<a href="accueil.html?page=galerie&cat='+cat+'"><img src="data/jpg/galerie.jpg" alt="Galerie" id="gal" class="bout cursor" border="none"/></a>';
		var controles = controles+'<img src="data/jpg/suivante.jpg" alt="Suivante" id="imgSuiv" class="bout cursor" onclick="showImg(\''+cat+'\', \''+imageSuiv+'\', \''+max+'\');"/>';
		var controles = controles+'<div id="galInfos">'+image+' / '+max+'</div>';
		document.getElementById('galControle').innerHTML = controles;
	}
	
function preloadImg(cat, image, max)
	{
		image = parseInt(image);
		max = parseInt(max);
		for(var i=0; i!=max; i++)
			{
				img = new Image;
				img.src = "cuisines/"+cat+"/images/"+image+"";
				image = image + 1;
			}
	}
function runFlash()
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="900" height="300">\n');
		document.write('<param name="movie" value="data/swf/header.swf">\n');
		document.write('<param name="quality" value="high">\n');
		document.write('<embed src="data/swf/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="900" height="300"></embed>\n');
		document.write('</object>');
	} 
function showIntro()
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="850" height="460">');
        document.write('<param name="movie" value="data/swf/intro.swf" />');
        document.write('<param name="quality" value="high" />');
        document.write('<embed src="data/swf/intro.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="850" height="460"></embed>');
        document.write('</object>');
	}
