function showFlash(flashFile, width, height, bTransparent)
{
	if(typeof lirecookie == 'function') { 
		if (lirecookie("flashpubcdc")!="oui"){
				curRand = parseInt(Math.random()*100000);
				if(bShowFlash && flashFile != "")
				{
					sFlash = '<object width="'+width+'" height="'+height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
					sFlash += '<param name="movie" value="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />\n';
					sFlash += '<param name="quality" value="high" />\n';
					
					if(bTransparent)
					{
						sFlash += '<param name="wmode" value="transparent" />\n';
						sWmodeTransparent = 'wmode="transparent"';
					}
					else
						sWmodeTransparent = '';
						
					sFlash += '<embed '+sWmodeTransparent+'src="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed>\n';
					sFlash += '</object>\n';
					
					document.getElementById('flashpubcdc').innerHTML = sFlash;
					if(typeof ecrirecookie == 'function') {
						ecrirecookie("flashpubcdc", "oui");
					}
				}
		}	
	}else{
			curRand = parseInt(Math.random()*100000);
			if(bShowFlash && flashFile != "")
			{
				sFlash ='<a style="font-weight:bold;border:solid 2px;background-color:#FFFFFF" href="javascript:hideflashpubcdc();">Fermer la pub</a><br>';
				sFlash += '<object width="'+width+'" height="'+height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
				sFlash += '<param name="movie" value="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />\n';
				sFlash += '<param name="quality" value="high" />\n';
				
				if(bTransparent)
				{
					sFlash += '<param name="wmode" value="transparent" />\n';
					sWmodeTransparent = 'wmode="transparent"';
				}
				else
					sWmodeTransparent = '';
					
				sFlash += '<embed '+sWmodeTransparent+'src="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed>\n';
				sFlash += '</object>\n';
				
				document.getElementById('flashpubcdc').innerHTML = sFlash;
				if(typeof ecrirecookie == 'function') {
					ecrirecookie("flashpubcdc", "oui");
				}
			}
	}
}


function showFlashExpand(flashFile, width, height, flashFileExpand, widthExpand, heightExpand)
{
	curRand = parseInt(Math.random()*100000);

	if(bShowFlash && flashFile != "")
	{
		sFlash = '<object width="'+width+'" height="'+height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
		sFlash += '<param name="movie" value="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />\n';
		sFlash += '<param name="quality" value="high" />\n';
		sFlash += '<embed src="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed>\n';
		sFlash += '</object>\n';

		sFlashExpand = '<object width="'+widthExpand+'" height="'+heightExpand+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
		sFlashExpand += '<param name="movie" value="'+flashFileExpand+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />\n';
		sFlashExpand += '<param name="quality" value="high" />\n';
		sFlashExpand += '<embed src="'+flashFileExpand+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+widthExpand+'" height="'+heightExpand+'"></embed>\n';
		sFlashExpand += '</object>\n';

		sDivFlashs = "<div id='expander' style='display:block;z-index:100;' onmouseover='showExpanded();hideFold();setExpandedInfo();' onmouseout='hideExpanded();showFold();setFoldInfo();'>";	
		sDivFlashs += "<div id='expand_fold' style='display:block;padding:20px;z-index:100;'>"+sFlash+"</div>";
		sDivFlashs += "<div id='expand_expanded' style='display:none;position:relative;padding:20px;z-index:100;'>"+sFlashExpand+"</div>";
		sDivFlashs += "</div>";
			
		document.getElementById('flashpubcdc').innerHTML = sDivFlashs;
	}
}

function showFlashHomeYahoo(flashFile, width, height, flashFileExpand, widthExpand, heightExpand, timeForSwitch)
{
	curRand = parseInt(Math.random()*100000);

	if(bShowFlash && flashFile != "")
	{
		sFlash = '<div id="expand_fold" style="position:relative;width:'+width+'px;height:'+height+'px;top:221px;left:600px;z-index:100;">';
		sFlash += '<object width="'+width+'" height="'+height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';
		sFlash += '<param name="movie" value="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />';
		sFlash += '<param name="quality" value="high" />';
		sFlash += '<embed src="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed>';
		sFlash += '</object>';
		sFlash += "</div>";

		sFlashExpand = '<div id="expand_expanded" style="position:relative;top:60px;left:159px;padding:20px;z-index:100;">';
		sFlashExpand += '<object width="'+widthExpand+'" height="'+heightExpand+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
		sFlashExpand += '<param name="movie" value="'+flashFileExpand+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />\n';
		sFlashExpand += '<param name="quality" value="high" />\n';
		sFlashExpand += '<param name="wmode" value="transparent" />\n';
		sFlashExpand += '<embed wmode="transparent" src="'+flashFileExpand+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+widthExpand+'" height="'+heightExpand+'"></embed>\n';
		sFlashExpand += '</object>\n';
		sFlashExpand += "</div>";

		setExpandedInfo();
		document.getElementById('flash').innerHTML = sFlashExpand;
		setTimeout("document.getElementById('flashpubcdc').innerHTML = '"+sFlash+"'", timeForSwitch);
		setTimeout("setFoldInfo()", timeForSwitch+100);
	}
}

/*function showFlashHomeMSN(flashFile, width, height, flashFileExpand, widthExpand, heightExpand, timeForSwitch)
{
	curRand = parseInt(Math.random()*100000);

	if(flashFile != "")
	{
		sFlash = '<div id="expand_fold" style="position:relative;width:'+width+'px;height:'+height+'px;top:125px;left:462px;z-index:100;">';
		sFlash += '<object width="'+width+'" height="'+height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';
		sFlash += '<param name="movie" value="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />';
		sFlash += '<param name="quality" value="high" />';
		sFlash += '<embed src="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed>';
		sFlash += '</object>';
		sFlash += "</div>";

		sFlashExpand = '<div id="expand_expanded" style="width:'+widthExpand+'px;height:'+heightExpand+'px;position:relative;top:125px;left:63px;z-index:100;">';
		sFlashExpand += '<object width="'+widthExpand+'" height="'+heightExpand+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
		sFlashExpand += '<param name="movie" value="'+flashFileExpand+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />\n';
		sFlashExpand += '<param name="quality" value="high" />\n';
		sFlashExpand += '<param name="wmode" value="transparent" />\n';
		sFlashExpand += '<embed wmode="transparent" src="'+flashFileExpand+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+widthExpand+'" height="'+heightExpand+'"></embed>\n';
		sFlashExpand += '</object>\n';
		sFlashExpand += "</div>";

		setExpandedInfo();
		document.getElementById('flash').innerHTML = sFlashExpand;
		setTimeout("document.getElementById('flash').innerHTML = '"+sFlash+"'", timeForSwitch);
		setTimeout("setFoldInfo()", timeForSwitch+100);
	}
}*/

function showFlashHomeMSN(flashFile, width, height)
{
	curRand = parseInt(Math.random()*100000);

	if(bShowFlash && flashFile != "")
	{
		sFlash = '<div id="expand_fold" style="position:relative;width:'+width+'px;height:'+height+'px;top:125px;left:62px;z-index:100;">';
		sFlash += '<object width="'+width+'" height="'+height+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';
		sFlash += '<param name="movie" value="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" />';
		sFlash += '<param name="quality" value="high" />';
		sFlash += '<param name="wmode" value="transparent" />';
		sFlash += '<embed wmode="transparent" src="'+flashFile+'?ncn='+curRand+'&clickTag=http://www.google.fr&clickTAG=http://www.google.fr" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'"></embed>';
		sFlash += '</object>';
		sFlash += "</div>";

		document.getElementById('flashpubcdc').innerHTML = sFlash;
	}
}

function hideflashpubcdc(){
	hide(document.getElementById('flashpubcdc'));
}

function hide(element)
{
	element.style.display='none';
}

function show(element)
{
	element.style.display='block';
}

function hideFold()
{
	hide(document.getElementById('expand_fold'));
}

function showFold()
{
	show(document.getElementById('expand_fold'));
}

function hideExpanded()
{
	hide(document.getElementById('expand_expanded'));
}

function showExpanded()
{
	show(document.getElementById('expand_expanded'));
}

function setExpandedInfo()
{
	setFlashInfo(flash_modif_time_expand, flash_size_expand, flash_dimension_expand);
}

function setFoldInfo()
{
	setFlashInfo(flash_modif_time_fold, flash_size_fold, flash_dimension_fold);
}

function confirmLivraison()
{
	return confirm("Etes-vous certain de vouloir livrer ?");
}

function setFlashInfo(flash_modif_time, flash_size, flash_dimension)
{
	if(!bClient)
	{
		document.getElementById('flash_modif_time').innerHTML=flash_modif_time;
		document.getElementById('flash_size').innerHTML=flash_size;
		document.getElementById('flash_dimensions').innerHTML=flash_dimension;
	}
}

function adnoviafermer()
{
	if(!bClient)
		alert("Fermeture adnovia");
}

function f4d_hide_layer()
{
	if(!bClient)
		alert("Fermeture/fin d'animation f4d");
}

function pub_ist_hd()
{
	if(!bClient)
		alert("Fermeture IST HD");
}