function run_flash(largeur,hauteur,fichier,nom,ok){ 	
	name = "";
	if(nom=="banniere"){
		if(ok==true){
			fichier=Fourchette()+".swf";	
		}else{
			fichier="bannieres/ban00.swf";			
		}		
	}	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+largeur+'" height="'+hauteur+'" id="FlashID" ');
	document.write('title="menu entete">');
	document.write('<param name="movie" value="'+fichier+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="swfversion" value="9.0.45.0" />');
	document.write('<param name="expressinstall" value="/scripts/expressInstall.swf" />');
	document.write('<!--[if !IE]>-->');
	document.write('<object type="application/x-shockwave-flash" data="'+fichier+'" width="'+largeur+'" height="'+hauteur+'">');
	document.write('<!--<![endif]-->');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="swfversion" value="9.0.45.0" />');
	document.write('<param name="expressinstall" value="/scripts/expressInstall.swf" />');
	document.write('<div>');
	document.write('<h4>Le contenu de cette page n&eacute;cessite une version plus r&eacute;cente d’Adobe Flash Player.</h4>');
	document.write('<p><a href="http://www.adobe.com/go/getflashplayer">');
	document.write('<img  src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" ');
	document.write('alt="Obtenir le lecteur Adobe Flash" width="112" height="33" /></a></p>');
	document.write('</div>');
	document.write('<!--[if !IE]>-->');
	document.write('</object>');
	document.write('<!--<![endif]-->');
	document.write('</object>');
}
//------------------------------------------------------------
function getTaille(){
	return tbl.length;
	}
//------------------------------------------------------------
function deuxCar(c){
		var ch=new String('0'+c);
		l=ch.length-2;
		r=ch.substr(l, 2)
		return r;
	}			 
//------------------------------------------------------------	
function Fourchette(){
		var t="";
		var res="";
// fichier par défaut		
		var def=tbl[0];
		var tbl_def=def.split(";");
		var fichier_def=tbl_def[0];
		var j1=""; var m1=""; var a1="";		
		var j2=""; var m2=""; var a2="";				
// parcours des autres		
		for(i=1;i<getTaille();i++){
				t=tbl[i]; tb=t.split(";");			
// 1° decoupage : fichier;jjmmaajjmmaa
				fichier=tb[0]; 
				sdt=tb[1];
// 2° découpage : jj/mm/aa  jj/mm/aa			
// date 1
			//011010311211
				j1=sdt.substr(0,2);
				m1=sdt.substr(0,2);
				a1=sdt.substr(4,2);
				d1 = new Date(); d1.setDate(j1); d1.setMonth(m1-1); d1.setFullYear('20'+a1);
// date 2						
				j2=sdt.substr(6,2);m2=sdt.substr(8,2);a2=sdt.substr(10,2);
				d2 = new Date(); d2.setDate(j2); d2.setMonth(m2-1); d2.setFullYear('20'+a2); 
// date 3 ( date du jour )
				dte=new Date();
// test  date 1<= date3 < date 2		
				//alert(d1.toLocaleString() + " " + dte.toLocaleString() + ' ' + d2.toLocaleString());	
				if ((d1<=dte)&&(dte<d2)){
						res=fichier;
						break;
				}
		}
		if (res==""){res=fichier_def;}
		return res;
}
//------------------------------------------------------------	
function popup_garantie(url){
	f=window.open(url,"","menubar=no, status=no, scrollbars=no, menubar=no, resizable=no, width=540, height=270");;
	f.focus();
}
//------------------------------------------------------------
function popup_espace(url){
	g=window.open(url,"","menubar=no, status=no, scrollbars=yes, menubar=no, resizable=yes, width=640, height=600");;
	g.focus();
}
//------------------------------------------------------------

