function CreerCurseur(nom,min,max,pas,initC,l,h,gon,goff,gon0,goff0,delai) {
	var nbval=((max-min)/pas)+1;
	this.nom=nom; this.valeur=min-1;
	this.action=0; this.delai=delai;
	this.min=min; this.max=max; this.pas=pas;
	this.initC=initC;
	this.letab=new Array()	
	for (var i=0;i<nbval;i++) this.letab[i]=min+(pas*i)
	this.itemmin=1; this.itemmax=nbval;	
	this.larg=l; this.haut=h;
	this.gifon=gon; this.gifoff=goff; 
	this.gifon0=gon0; this.gifoff0=goff0;
    this.Affecte=AffecteCurseur; this.Affiche=AffCurseur;
    this.Update=UpdateCurseur;
}
function AffCurseur() {
	var Z='';
	var s=this.nom.substring(4);  //ex cursQ1 commence a 0
	if(document.fML){ if(document.fML[s]){ if(document.fML[s].value){
		for (var i=0;i<this.letab.length;i++) {
			if(this.letab[i] == document.fML[s].value){
				this.valeur=i+1; i=this.letab.length;						
			}
		}
	}}}
	for (var i=1;i<=this.itemmax;i++) {
    	if (i<=this.valeur){
      		if(this.larg>this.initC)gif=this.gifon; else gif=this.gifon0;
      		}else{ if(this.larg>this.initC)gif=this.gifoff; else gif=this.gifoff0 ;}
      
 	  Z+="<IMG name=" + this.nom+"_"+i+ " src='" +gif+ "' width= "+this.larg+" height=" +this.haut+ " border=0 alt='" ;
	  	Z+= this.letab[i-1] + "'";
	  	if(this.larg>this.initC) Z+=' hspace=1';
	  	Z+=" onMouseOver='this.style.cursor=\"hand\"'";
	  	Z+=" onMouseOut='this.style.cursor=\"default\"'";
	  	Z+=">";
	}
	document.write(Z);
}
function AffecteCurseur(val) {
	if (val==this.valeur) this.valeur-=1;
	else this.valeur=val;
	this.Update();
	return false;
}
function UpdateCurseur() {
	for (var i=1;i<=this.itemmax;i++) {
    	if (i<=this.valeur){
      		if(this.larg>this.initC)gif=this.gifon; else gif=this.gifon0;
      		}else{ if(this.larg>this.initC)gif=this.gifoff; else gif=this.gifoff0 ;}
	 	document.images[this.nom+"_"+i+""].src=gif;
	}
	n=this.letab[this.valeur-1];
	s=this.nom.substring(4);  //ex cursQ1 commence a 0
	document.fML[s].value= n;
	QuSAuto(s);
}