function do_reculer(){
	var actu = document.getElementById("toolbar").style.right;
	var actu_width = document.getElementById("toolbar").style.width;
	actu=actu.replace("px","");
	actu=parseInt(actu);
	actu_width=actu_width.replace("px","");
	actu_width=parseInt(actu_width);
	var arriver = -300;
	if (actu_width >= 36){
		//document.getElementById("toolbar").style.right= actu-2+"px";
		document.getElementById("toolbar").style.width= actu_width-1+"px";
		do_reculer();
	}
}

function moove(){
	var actu = document.getElementById("toolbar").style.width;
	actu=actu.replace("px","");
	actu=parseInt(actu);
	if (actu == 35){
		do_avancer();
	}else{
		do_reculer();
	}
}

function do_avancer(){
	var actu = document.getElementById("toolbar").style.right;
	var actu_width = document.getElementById("toolbar").style.width;
	actu=actu.replace("px","");
	actu=parseInt(actu);
	actu_width=actu_width.replace("px","");
	actu_width=parseInt(actu_width);
	if (actu_width < 221 ){
		//document.getElementById("toolbar").style.right= actu-2+"px";
		document.getElementById("toolbar").style.width= actu_width+1+"px";
		do_avancer();
	}
}

var initToolbar = function() {
	var toolbar_present = $$('.toolbar');
	//console.log('initToolbar');
	if(toolbar_present) {
		var toolbar = Element.remove(toolbar_present[0]);
		
		Element.insert(document.body,{'bottom':toolbar});
		Element.setStyle(toolbar,{"top":'20px',"right":'-0px'});
		Element.show(toolbar);
		
		// IE 6 hack to make links clickable inside divs with alpha PNGs
		if(Prototype.Browser.IE && parseFloat(navigator.appVersion.split("MSIE")[1]) < 7) {
			toolbar.select("a").each(function(alink) { Element.setStyle(alink,{"position":"relative","z-index":1}); } );
		}
	}
}
document.observe("dom:loaded",initToolbar);
