// JavaScript Document
//----------------------------- [Variables] -----------------------------------------------//
addOnload(defile);
addOnload(ecrire_rechercher);

function addOnload(newFunction) {
	var oldOnload = window.onload;
	
	if (typeof oldOnload == "function") {
		window.onload = function() {
			if (oldOnload) {
				oldOnload();
			}
			newFunction();
		}
	}
	else {
		window.onload = newFunction;
	} 
}

//=================================================================================//

function ecrire_rechercher() {
document.getElementById("q2").value="Rechercher"; /* q2 est dans rechercher.inc.php */
}

//=================================================================================//


var max = 11;                    // Nombre d'images
  		var definition = new Array(max-1) // Texte à afficher
  		var ImageEnCours = 0              // Image affichée
  		var timeout = 0                   // Timer
  		var Vitesse = 1.7*1000                 // Vitesse de défliement
  		
   		//----------------------------- [Charge une image] ----------------------------------------//
  		function ChargeImage(NumImage) 
  		  {
  		    //document.images[0].src = "img" + (NumImage) +".jpg"
			document.images['petite_vignette'].src = "http://7fleches.com/im/vignettes_sm/vignetteV" + (NumImage) + "sm.jpg" ;
			//document.images['petite_vignette'].src = "im/vignettes_sm/vignetteV" + (NumImage) + "sm.jpg" ;
			
  		    //document.links[max].href="page"+NumImage+".htm"
  		    //document.links[max+1].href="page"+NumImage+".htm"
  		  }
  		
  		//----------------------------- [Affiche image suivante] ---------------------------------//
  		function ImageSuivante() 
  		  {
  		    ImageEnCours++
  		    if (ImageEnCours > max-1 ) 
  		      {
  		        ImageEnCours = 1
  		      }
  		    ChargeImage(ImageEnCours)
  		  }

function defile() 
  		  {
  		    ImageSuivante()
  		    timeout = setTimeout("defile()", Vitesse)
  		  }

//==============================================================================//


						