// JavaScript Document

var compteur = 0;
var pos = 0;
var mouv;
var defil_ok=true;
var total=0;
function mouve(type,nb,c) {
clip = document.getElementById(c);
total = -1000000;
if(type=='droite') {
if(pos>total) {
pos -= 5;
}
} else {
if(pos<0) {
pos += 5;
}
}
clip.style.marginLeft = pos+'px';
mouv = setTimeout('mouve(\''+type+'\','+nb+',\''+c+'\')',25);
}
function stop_mouve() {
clearInterval(mouv);
}


var compteurcomm = 0;
var poscomm = 0;
var mouvcomm;
var defil_okcomm=true;
var totalcomm=0;
function mouvecomm(typecomm,nbcomm,ccomm) {
clipcomm = document.getElementById(ccomm);
totalcomm = parseInt(document.getElementById(ccomm).parentNode.scrollHeight)*(-1);
//console.log(':'+totalcomm);
if(typecomm=='bas') {
if(poscomm>totalcomm) {
poscomm -= 5;
}
} else {
if(poscomm<0) {
poscomm += 5;
}
}

clipcomm.style.marginTop = poscomm+'px';
mouvcomm = setTimeout('mouvecomm(\''+typecomm+'\','+nbcomm+',\''+ccomm+'\')',25);
}
function stop_mouvecomm() {
clearInterval(mouvcomm);
}

