function color(elt, couleur) {
  	couleur = trimAll(couleur);	
	elt.style.color = couleur;
}

function trimAll(sString) {
  while ( sString.substring(0,1) == ' ' )  {
  	sString = sString.substring(1, sString.length);
  }
  while (sString.substring(sString.length-1, sString.length) == ' ') {
  	sString = sString.substring(0,sString.length-1);
  }
  return sString;
}

// -------------- Filières
function positionAbsolut( obj ) {
	var iVal = 0;
	while ( obj && obj.tagName != "BODY" ) {
		iVal += obj.offsetTop;
		obj = obj.offsetParent;
	}
	return iVal;
}
function collerMenu() {
	var diva = document.getElementById( "ascenceur" );
	if ( diva != null ) {
		var positionDiva = positionAbsolut( diva );
		var gm = document.getElementById( "groupesmenu" );
		if ( gm != null ) {
			gm.style.position = "absolute";
			gm.style.top = Math.max( 0, document.body.scrollTop - document.body.clientHeight / 2 ) + positionDiva;
		}
	}
	setTimeout( collerMenu, 50 );
}
setTimeout( collerMenu, 50 );


