var timeOut;
function init_ascenceur(id, pref) {
	if ((document.getElementById("div_vignette_"+pref+"_"+id).offsetWidth-10)>document.getElementById("table_vignettes_"+pref+"_"+id).offsetWidth) {
		document.getElementById("td_fl_g_"+pref+"_"+id).style.display="none";
		document.getElementById("td_fl_d_"+pref+"_"+id).style.display="none";
	}
}

function ascenceur(id, pref, sens) {
	timeOut=setTimeout('ascenceur_fct("'+id+'", "'+pref+'", "'+sens+'")', 20);
}
function ascenceur_fct(id, pref, sens) {
	clearTimeout(timeOut);
	if (sens==1) {
		var pos_int = document.getElementById("table_vignettes_"+pref+"_"+id).offsetLeft;
		var new_pos = pos_int-10;
		//alert(document.getElementById("div_vignette_"+pref+"_"+id).offsetWidth);
		var limit=document.getElementById("div_vignette_"+pref+"_"+id).offsetWidth-10-document.getElementById("table_vignettes_"+pref+"_"+id).offsetWidth;
		if (new_pos>limit) {
			//alert(new_pos);
			document.getElementById("table_vignettes_"+pref+"_"+id).style.left = new_pos+"px";
			timeOut=setTimeout('ascenceur_fct("'+id+'", "'+pref+'", "'+sens+'")', 100);
		}
		else clearTimeout(timeOut);
	}
	else {
		var pos_int = document.getElementById("table_vignettes_"+pref+"_"+id).offsetLeft;
		var new_pos = pos_int+10;
		if (new_pos<'10') {
			//alert(new_pos);
			document.getElementById("table_vignettes_"+pref+"_"+id).style.left = new_pos+"px";
			timeOut=setTimeout('ascenceur_fct("'+id+'", "'+pref+'", "'+sens+'")', 100);
		}
		else clearTimeout(timeOut);
	}
}

function stop_ascenceur() {
	clearTimeout(timeOut);
}