
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function VersionNavigateur(Netscape, Explorer) {
  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
    return true;
else return false;
}

/*
function Semaine(){
           this[0] = "Dimanche";  this[1] = "Lundi";
           this[2] = "Mardi";     this[3] = "Mercredi";
           this[4] = "Jeudi";     this[5] = "Vendredi";
           this[6] = "Samedi";
           }

function Mois(){
           this[0] = "Janvier";    this[1] = "Février";
           this[2] = "Mars";       this[3] = "Avril";
           this[4] = "Mai";        this[5] = "Juin";
           this[6] = "Juillet";    this[7] = "Août";
           this[8] = "Septembre";  this[9] = "Octobre";
           this[10] = "Novembre";  this[11] = "Decembre";
           }
today = new Date;
function date(){
        var semaine=new Semaine();
        var myDate=new Date();
		var mois=new Mois();
        annee = today.getFullYear();
  

        var result=semaine[myDate.getDay()]+", "+myDate.getDate()+" "+mois[myDate.getMonth()]+" "+annee;
        document.writeln(result);
}
*/
    
function openWin( windowURL, windowName, windowFeatures ) { 
       return window.open( windowURL, windowName, windowFeatures ) ; 
} 
	
function Menu(nom_swf, base_href)
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+base_href+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="530" height="40" id="flash/'+nom_swf+'" loop="true" align="left"\n');
	//document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="920" height="47" id="flash/navigation.swf" loop="true" align="middle"\n');
	document.write('<param name="allowScriptAccess" value="sameDomain"/>\n');
	document.write('<param name="movie" value="flash/'+nom_swf+'"/><param name="quality" value="high" /><param name="bgcolor" /><embed src="flash/'+nom_swf+'" quality="high" width="530" height="40" name="navigation" align="middle" loop="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
   //document.write('<param name="movie" value="flash/navigation.swf"/><param name="quality" value="high" /><param name="bgcolor" /><embed src="flash/navigation.swf" quality="high" width="920" height="47" name="navigation" align="middle" loop="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
   document.write('</object>\n');

}


function logo(base_href)
{
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+base_href+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="548" height="190" id="flash/514logo.swf" loop="true" align="middle"\n');
   document.write('<param name="allowScriptAccess" value="sameDomain"/>\n');
   document.write('<param name="movie" value="flash/514logo.swf"/><param name="quality" value="high" /><param name="bgcolor" /><embed src="flash/514logo.swf" quality="high" width="548" height="190" name="navigation" align="middle" loop="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
   document.write('</object>\n');
}

	

//--------------** Script pour image dans billboard //
/*
var imageArray = new Array()

imageArray[0] = new Image(); imageArray[0].src = "images/fr/billboard/tin.jpg";
imageArray[1] = new Image(); imageArray[1].src = "images/fr/billboard/can.jpg";
imageArray[2] = new Image(); imageArray[2].src = "images/fr/billboard/mad.jpg";
*/

var imageNum = 1;
var finished = 0;
var intervalID = "";

function startTransition()
{
/*
  window.clearInterval(intervalID);

  if(finished == 0)
  {
    if(imageNum == imageArray.length) { imageNum = 0; }

    transImage.filters.item(0).Apply();
    transImage.src = imageArray[imageNum].src;
    transImage.filters.item(0).Play();

    finished = 1
  }
  intervalID = window.setInterval("startTransition()", 4000);
*/
}


//--------------** Script pour Menu //

//var ContentHeight = 126;
var TimeToSlide = 250.0;

var openAccordion = '';

function runAccordion(index, contentHeight)
{
  var nID = "Accordion" + index + "Content";
  if(openAccordion == nID)
    nID = '';
    
  setTimeout("animate(" 
      + new Date().getTime() + "," + TimeToSlide + ",'" 
      + openAccordion + "','" + nID + "',"+ contentHeight+")", 33);
  
  openAccordion = nID;
}

function animate(lastTick, timeLeft, closingId, openingId, ContentHeight)
{  

  var curTick = new Date().getTime();
  var elapsedTicks = curTick - lastTick;
  
  var opening = (openingId == '') ? 
      null : document.getElementById(openingId);
  var closing = (closingId == '') ? 
      null : document.getElementById(closingId);
 
  if(timeLeft <= elapsedTicks)
  {
    if(opening != null)
      opening.style.height = ContentHeight + 'px';
    
    if(closing != null)
    {
      closing.style.display = 'none';
      closing.style.height = '0px';
    }
    return;
  }
 
  timeLeft -= elapsedTicks;
  var newClosedHeight = 
      Math.round((timeLeft/TimeToSlide) * ContentHeight);

  if(opening != null)
  {
    if(opening.style.display != 'block')
      opening.style.display = 'block';
    opening.style.height = 
        (ContentHeight - newClosedHeight) + 'px';
  }
  
  if(closing != null)
    closing.style.height = newClosedHeight + 'px';

  setTimeout("animate(" + curTick + "," + timeLeft + ",'" 
      + closingId + "','" + openingId + "',"+ContentHeight+")", 33);
}

/***********************/
var c = new Array("FF", "EE", "DD", "CC", "BB", "AA",
"99", "88", "77", "66", "55", "44", "33", "22", "11", "00");

x = 0;

function bg_eff(id)
   {
   col_val = "#00" + c[x] + "00";
   document.getElementById(id).style.color=col_val;
   x++;
   if (x == 16)
      {
      clearInterval(change_bg);
      }
   }

function change_couleur(id){
   change_bg = setInterval("bg_eff('"+id+"')", 125);
}