
  function open_Link(URL)
  {
    document.location=URL;
  }


	// nb + 1
  	var nbMenu = 15;
	var Fade_Lenght = 20;
  	var Fade_Back_Color_Range = new Array(Fade_Lenght);
  	var Fade_Font_Color_Range = new Array(Fade_Lenght);
  	var Fade_Selected_Back_Color_Range = new Array(Fade_Lenght);
  	
  	// 0 pour none, 1 pour in, 2 pour out
  	var Fade_Stat = new Array(nbMenu);
  	var Fade_Pos = new Array(nbMenu);
  	
  	var Selected_Button;
  	
  	function maketable(n) 
  	{
  	  var nb;
  	  this.length = n;
  	  for (var i = 1; i <=n; i++)
  	    if (i<10) 
  		{
  	      nb = i+"";
  	      nb = nb.substring(0,1);   	
  	      this[i] = nb;
  	    }
  	  return this;
  	}
  
  	function intToHex(color) 
  	{
  	  var hexa1;
  	  var hexa2;
  	  var colorHexa;
  	  tabHex = new maketable(16);
  	
  	  tabHex[10]="A"; tabHex[11]="B"; tabHex[12]="C"; tabHex[13]="D"; tabHex[14]="E"; tabHex[15]="F";
  	  hexa2 = (color%16);
  	  hexa1 = parseInt(color/16);
  	  hexa2 = tabHex[hexa2];
  	  
  	  if (hexa2 == null)
  	    hexa2 = "0";
  		
  	  hexa1 = tabHex[hexa1];
  	  
  	  if (hexa1 == null)
  	    hexa1 = "0";
  		
  	  colorHexa = hexa1 + hexa2;
  	  
  	  return colorHexa;
  	}
  	
  	function make_Fade_Color_Range(SR,SG,SB,ER,EG,EB,Fade_Color_Range)
  	{
  		var i;
  		var IncR,IncG,IncB;
  		var IR,IG,IB,TR,TG,TB;
  		
  		IR = ER - SR;
  		IG = EG - SG;
  		IB = EB - SB;
  		
  		TR = SR;
  		TG = SG;
  		TB = SB;
  		
  		Fade_Color_Range[0] = '#'+intToHex(SR)+intToHex(SG)+intToHex(SB);
  		
  		for(i=2;i<Fade_Lenght;i++)
  		{
  			IncR = Math.round(IR/(Fade_Lenght-i));
  			IncG = Math.round(IG/(Fade_Lenght-i));
  			IncB = Math.round(IB/(Fade_Lenght-i));
  		
  			TR += IncR;
  			TG += IncG; 
  			TB += IncB;
  			
  			IR -= IncR; 
  			IG -= IncG; 		
  			IB -= IncB;
  		
  			Fade_Color_Range[i-1] = '#'+intToHex(TR)+intToHex(TG)+intToHex(TB);
  		}
  
  		Fade_Color_Range[Fade_Lenght-1] = '#'+intToHex(ER)+intToHex(EG)+intToHex(EB);
  		
  	}
  	
  	function make_Fade_Array()
  	{
  		var i
  		
  		make_Fade_Color_Range(245,245,245,141,157,217,Fade_Back_Color_Range);
  		make_Fade_Color_Range(140,117,66,255,255,255,Fade_Font_Color_Range);
  		
  		for (i=0; i< nbMenu; i++) 
  		{
  			Fade_Stat[i] = 0;
  			Fade_Pos[i] = 0;
  		}
  	}
  	
  	function fade_In(ID,i)
  	{
  		var button_Frame = document.getElementById("Div_Button"+ID);
  		var button_Font = document.getElementById("Button"+ID);
  		
  		if(Selected_Button != ID)	
  		{	
  			if(button_Frame != null && Fade_Stat[ID] == 1)
  			{
  				Fade_Pos[ID] = i;
  				
  				button_Frame.style.backgroundColor = Fade_Back_Color_Range[i];
  				button_Font.style.color = Fade_Font_Color_Range[i];
  					
  				if(++i < Fade_Lenght) setTimeout('fade_In('+ID+','+i+')',10);
  			}
  		}
  	}
  	
  	function fade_Out(ID,i)
  	{
  		var button_Frame = document.getElementById("Div_Button"+ID);
  		var button_Font = document.getElementById("Button"+ID);
  		
  		if(Selected_Button != ID)
  		{
  			if(button_Frame != null && Fade_Stat[ID] == 2)
  			{
  				Fade_Pos[ID] = i;
  
  				button_Frame.style.backgroundColor = Fade_Back_Color_Range[i];
  				button_Font.style.color = Fade_Font_Color_Range[i];
  				
  				if(--i >= 0) setTimeout('fade_Out('+ID+','+i+')',15);
  			}
  		}
  	}
  
  
  	function swap_Color_Down(ID)
  	{
  		Fade_Stat[ID] = 1;
  				
  		fade_In(ID,Fade_Pos[ID]);
  	}
  
  	function swap_Color_Up(ID)
  	{
  		Fade_Stat[ID] = 2;
  	
  		fade_Out(ID,Fade_Pos[ID]);	
  	}

  	function select_Button(ID)
  	{
  		var button_Frame = document.getElementById("Div_Button"+ID);
  		var button_Font = document.getElementById("Button"+ID);
  		
  		Selected_Button=ID;
  		
  		Fade_Pos[Selected_Button] = Fade_Lenght-1;
  		

  	}
  	
  	function init_Banner()
  	{
  		  make_Fade_Array();
    		
            			  
            select_Button(0);
    	 	
          	}


	init_Banner();
