
/* DEFILEMENT */

var x = 0;
var dest = 0;
var distance = 0;
var step = 0;
var destination = 0;
var dest2 = 0;
var dest3 = 0;

function scroll6(six) {

	step = 2;
	six = six;
	six2 = six - 2;
	six3 = six + 2;

	if (x<six) {

			 while(x<six) {
					step += (step / 7);
					x += step;
					self.scroll(x,0);   
			}

			while(x>six2) {
					x -= 3;
					self.scroll(x,0);
			}

			if(six <= 6000) { self.scroll(six,0); }
			x = six;
			}


	if (x>six)  {

			while (x>six) {
					step += (step / 7);

				if(x >= (0+step)) {
						x -= step; 
						self.scroll(x,0);
				}

				else { break; }

			} 

			while(x<six3) {
					x += 3;
					self.scroll(x,0);
			}

			if(dest >= 0) { self.scroll(x,0); }
			x = six;
	}

	if (x<1) {x=0}
	if (x>6000) {x=6000}
	/* if (x>7200) {x=7200}*/
}


/* GESTION DES CALQUES */

function MM_findObj(n, d) { //v4.0
	var p,i,x;
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function changestyle(couche, style) {
	if (!(layer = MM_findObj(couche))) return;
	layer.style.visibility = style;
}

function changeclass(objet, myClass)
{ 
  objet.className = myClass;
}
