function ActionsOnLoad() {
	changeclass('lodaer','displayko');
}
function changeclass(id, newClass) {
	identity=document.getElementById(id);	
	identity.className=newClass;
}
function DefineObjById(id) {
	identity=document.getElementById(id);
	if(identity.style) {
		identity = identity.style ;
	}
	return identity ;
}
function DisplayButtons(ident,btnmode) {
	if(btnmode == 'open') {
		changeclass('open'+ident, 'displayko');
		changeclass('clos'+ident, 'displayko');
		changeclass('load'+ident, 'iconbtn');
		changeclass('head'+ident, 'displayko');
	} else {
		changeclass('open'+ident, 'displayko');
		changeclass('clos'+ident, 'displayko');
		changeclass('load'+ident, 'iconbtn');
		changeclass('head'+ident, 'actions');
	}
	MoveLayer(ident,btnmode);
}
function MoveLayer(id,action) {	
	var box = document.getElementById('contener'+id);
	var boxH = box.offsetHeight+10;	
	var minH = 0;	
	var initHeight;
	var finalHeight;
	if(action == 'open') {
		initHeight = minH;
		finalHeight = boxH;		
	} else {
		initHeight = boxH;
		finalHeight = minH;	
	}	
	actionDeroule(id, initHeight, finalHeight, 5, action);
}
function actionDeroule(id, initHeight, finalHeight, interval, action) {	
	//alert(initHeight+' , '+finalHeight);	
	// Identification de l'objet
	var oElem = document.getElementById('clip'+id);
	if(!oElem) return;
	
	// Contr™le des valeurs de variables
	if(typeof(initHeight || finalHeight || interval) != 'number') return false;
	
	// Contr™le d'ˇxˇcution de la mˇthode
	if(oElem.movement) clearTimeout(oElem.movement);
	
	// Initialisation des param¸tres
	if( !oElem.style.height ) oElem.style.height = parseInt(initHeight)+'px';
	var iDimY = parseInt(oElem.style.height);
	
	// Condition de fin de la mˇthode
	if(iDimY == finalHeight) {	
		if(action == 'open') {
			changeclass('clos'+id, 'iconbtn');
		} else {
			changeclass('open'+id, 'iconbtn');
		}
		changeclass('load'+id, 'displayko');
		return true;
	}
	
	// Conditions d'incrˇmentation et dˇcrˇmentation
	if(iDimY < finalHeight)	{ 
		// increment
		var dist = Math.ceil((finalHeight - iDimY)/interval);
		iDimY = iDimY + dist;
	}
	if(iDimY > finalHeight) { 
		// decrement
		var dist = Math.ceil((iDimY - finalHeight)/interval);
		iDimY = iDimY - dist;
	}
	oElem.style.height = iDimY+'px';	
	// Rˇpˇtition de la mˇthode
	var timerIDserveur = null;
	timerIDserveur = setTimeout(function()	{
		actionDeroule(id,initHeight,finalHeight,interval,action);
	},10);
	return true;
}