function GetScrollPage(){
	var Left;
	var Top;
	var DocRef;
	
	if( window.innerWidth){
		with( window){
			Left = pageXOffset;
			Top = pageYOffset;
		}
	}
	else{ // Cas Explorer a part
		if( document.documentElement && document.documentElement.clientWidth)
			DocRef = document.documentElement;
		else
			DocRef = document.body;
		
		with( DocRef){
			Left = scrollLeft;
			Top = scrollTop;
		}
	}
	return({top:Top, left:Left});
}
//---------------------------

function ObjGetPosition(obj_){
	var PosX = 0;
	var PosY = 0;
	//-- suivant type en parametre
	if( typeof(obj_)=='object')
		var Obj = obj_;
	else
		var Obj = document.getElementById( obj_);
	//-- Si l'objet existe
	if( Obj){
		//-- Recup. Position Objet
		PosX = Obj.offsetLeft;
		PosY = Obj.offsetTop;
		//-- Si propriete existe
		if( Obj.offsetParent){
			//-- Tant qu'un parent existe
			while( Obj = Obj.offsetParent){
				if( Obj.offsetParent){ // on ne prend pas le BODY
					//-- Ajout position Parent
					PosX += Obj.offsetLeft;
					PosY += Obj.offsetTop;
				}
			}
		}
	}
	//-- Retour des positions
	return({left:PosX, top:PosY});
}

//-------------------------------------
// MENU FLOTTANT //////////////////////
//-------------------------------------
var div_conteneur;
var tab_obj = new Array();
var tab_timer1 = new Array();
var tab_timer2 = new Array();
//-----------------------
function DIV_Scroll( id_){
	var Obj = document.getElementById( id_);
	this.Obj = Obj;
	if( Obj){
		Obj.style.position = "absolute"; // IMPERATIF
		//-- Recup position de depart
		var Pos = ObjGetPosition( id_);
		this.PosX = Pos.left;
		this.PosY = Pos.top;
		this.DebX = this.PosX;
		this.DebY = this.PosY;
		this.NewX = 0;
		this.NewY = 0;
		this.Move = DIV_Deplace;
	}
}

function DIV_Deplace( x_, y_){
	if( arguments[0] != null){
		this.PosX = x_;
		this.Obj.style.left = parseInt(x_) +"px";
	}
	if( arguments[1] != null){
		this.PosY = y_;
		this.Obj.style.top = parseInt(y_) +"px";
	}
}


function DIV_CheckScroll(i){
	var Scroll = GetScrollPage();
	if(Scroll.top > tab_obj[i].PosY) {
		tab_obj[i].Obj.style.top = Scroll.top - tab_obj[i].PosY + "px";
	}
	else {
		tab_obj[i].Obj.style.top = "0px";
	}
	return( true);
}

function DIV_InitScroll(){
	div_conteneur = document.getElementById("conteneur");
	for(i=0; i<tab_div.length; i++) {
		tab_obj[i] = new DIV_Scroll(tab_div[i]);
		
		if(tab_obj[i].Obj)
			tab_timer2[i] = setInterval('DIV_CheckScroll('+i+')', 10);
	}
}