<!--



/*---------------------------------------------------------------------- 
  Gestionnaire : DETACHBAR_EventManager(), Move manager
  Evennement : onmousedown
  ----------------------------------------------------------------------*/
		var YOffset=41;
		var XOffset=0;
		var staticYOffset=30;
		var lastY=0;
		var toolBar;
		var stopMove = false;
	
	function moveBar() {
		
		toolBar = document.getElementById("div_move");
		
		winY = document.body.scrollTop;
		if ( winY != lastY && winY > YOffset-staticYOffset ) {
			smooth = .2 * (winY - lastY - YOffset + staticYOffset);
		} else if ( YOffset-staticYOffset+lastY > YOffset-staticYOffset) {
			smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));
		} else {
			smooth=0;
		}
		if(smooth > 0) {
			smooth = Math.ceil(smooth);
		} else {
			smooth = Math.floor(smooth); 
		}

		toolBar.style.top = parseInt(toolBar.style.top) + smooth;
		lastY = lastY+smooth;
		if (!stopMove) {
			setTimeout('moveBar()', 100);
		}
	}










/*---------------------------------------------------------------------- 
  Fonction    : dragNode(node)
  Description : Gére le déplacement de node sur evnmt mouse down
  ----------------------------------------------------------------------*/
	function dragNode(node){
		var e=window.event;	
		node.style.top=node.offsetTop+"px";
		node.style.left=node.offsetLeft+"px";			
		
		var deltaX = e.clientX-parseInt(node.style.left);
		var deltaY = e.clientY-parseInt(node.style.top);
		
		document.attachEvent("onmousemove",dragHandler);
		document.attachEvent("onmouseup",unDragHandler);
		e.cancelBubble=true;
		e.returnValue=false;		
		
		function dragHandler(){									
			var x,y;
			x = e.clientX ; 
			y = e.clientY ; 
			node.style.left= x-deltaX + "px";
			node.style.top = y-deltaY + "px";	
			e.cancelBubble = true;
			e.returnValue  = false;		
		}		
		function unDragHandler(){
			document.detachEvent("onmouseup",unDragHandler);
			document.detachEvent("onmousemove",dragHandler);						
			e.cancelBubble=true;
			e.returnValue=false;		
		}
			
	}




/*---------------------------------------------------------------------- 
  Fonction    : getParentNode(node)
  Description : Retourne l'element parent de node
  ----------------------------------------------------------------------*/	
	function getParentNode(node) {
		for(var n=0;n<getParentNode.arguments[1];n++){				
			try{
				node=node.parentNode;
				if(node.tagName.toLowerCase()=="body")return false;
			}
			catch(e){
				return false;			
			}
		}
		return node;
	}




/*---------------------------------------------------------------------- 
  Fonction    : visi(ouvre)
  Description : rend visible le menu
  ----------------------------------------------------------------------*/	
	function visi(ouvre) {
		var menu = document.getElementById("menu");
		if(ouvre) {
			menu.style.display = 'block';
		} else {
			menu.style.display = 'none';
		}		
	}
	
// -->