function EcrireCookie(nom, valeur)
{

var argv=EcrireCookie.arguments;
var argc=EcrireCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=nom+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");

}
function getCookieVal(offset)
{

var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr)); 
}
function LireCookie(nom)
{

var arg=nom+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen)
{

var j=i+alen;
if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;


}
return null; 
}

function EffaceCookie(nom)
{

date=new Date;
date.setFullYear(date.getFullYear()-1);
EcrireCookie(nom,null,date); 
}


function doCountFlash() {
    
    var date=new Date();
    date.setMonth(date.getMonth()+1);
    var L = LireCookie("transparent");
    if(L ==-1){
        L=0;
    }
    
    
    
    if(L<2) {
        flashtransparent = "<div id=\"flash_banner\" style=\"display: block; position:absolute; top:0; left:0; width:100%; height:100%; z-index:999\">";
        
        var protocole;
        if(document.location && document.location.protocol)
            protocole = 'http'+((document.location.protocol=='https:')?'s':'')+':';
        else
            protocole = 'http:';
        flashtransparent=flashtransparent + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="' + protocole + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ID=AnimationFlashBanner width="100%" height="100%">';	
        
        flashtransparent=flashtransparent + "<param name=\"movie\" value=\"%%MACRO:06c-zone-maxi-principal-flash.visuel2%%\">";
        flashtransparent=flashtransparent + "<param name=\"allowScriptAccess\" value=\"sameDomain\"> ";
        flashtransparent=flashtransparent + "<param name=\"quality\" value=\"high\">";
        flashtransparent=flashtransparent + "<param name=\"wmode\" value=\"transparent\">";
        flashtransparent=flashtransparent + "<param name=\"flashVars\" value=\"divName=flash_banner\">";
        flashtransparent=flashtransparent + '<embed flashVars="divName=flash_banner" wmode="transparent" src="%%MACRO:06c-zone-maxi-principal-flash.visuel2%%" allowScriptAccess="sameDomain" swLiveConnect="TRUE" width="100%" height="100%" quality="high"  type="application/x-shockwave-flash" pluginspage="'+ protocole +'://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
        flashtransparent=flashtransparent + "</embed></object></div>";
    }
    L=L+1;
    EcrireCookie("transparent",L, date);
    
}