function SVP(ASC,AF){
	
	this.ASC=ASC;
	this.AF=AF;
	this.timg=new Array();	//~~~~ positions initiales ~~~~
	this.h=new Array();
	var i=-1;
	for ( var n=0;n<this.ASC.childNodes.length;n++ )
	{	// tous les éléments
		if (this.ASC.childNodes[n].src)
		{	// les 2 1ères images
			i++;
			this.timg[i]=this.ASC.childNodes[n];
			this.Adresses(i);
			if ( i>=2) n=this.ASC.childNodes.length;
		}
	}
	this.timg[3]=this.ASC;
	this.Adresses(3);
	this.FH=this.timg[0];
	this.FH.style.position="absolute";
	this.FB=this.timg[1];
	this.FB.style.position="absolute";
	this.FB.style.top=(this.ASC.offsetHeight-this.ASC.offsetTop)+"px";
	this.dispo=	(parseInt(this.FB.offsetTop,10) -
				parseInt(this.FH.offsetTop,10) -
				this.FH.offsetHeight)+"px";
	this.CurDep=false;
	var Lui=this;
	
	this.ASC.onclick =	function() { Lui.Cliquer(); }
	this.FB.onclick =	function() { Lui.Bouge(1); };	
	this.FH.onclick =	function() { Lui.Bouge(-1); };
}

SVP.prototype.Adresses=function(i){
	
	var p=this.timg[i];
	this.h[i]=0;
	do
	{	// position image + position des parents
		this.h[i]+=p.offsetTop;
		if ( p.style.position.toLowerCase()=="absolute" )
				{
					p=false;
				}
		else	{
					p=p.offsetParent;
				}
	} while (p)
}		
	
SVP.prototype.Bouge=function(sens){
	
	var tmp=this.AF.scrollTop+(sens*this.AF.offsetHeight);
	if (tmp<0)
			{
				tmp=0;
			}
	else	{
				if (tmp>this.AF.scrollHeight) 
				{
					tmp=this.AF.scrollHeight;
				}
			}
	this.AF.scrollTop=tmp;
}

SVP.prototype.Cliquer=function(){}
