event.clientX showing as 0 in firefox for dragend event
===

	function move(e,obj,but){
	/*sideX can be right or left meaning the drag button is right or left. sideY can be top or bottom.
	offsetX and offsetY will vary according to the element and must be adjusted for each case.*/
		if(typeof(obj) === 'string'){
			obj = document.getElementById(obj) ;
		}
		
		if(typeof(but) === 'string'){
			but = document.getElementById(but) ;
		}
	
		//elementCoord(but) ;//get the current coords of the button &
		elementCoord(obj) ;//the container
		
		e = e || window.event ;
		var mouseX = e.clientX ;
		var mouseY = e.clientY ;
				
		//alert('mouseX='+mouseX+', but.XCoord '+but.XCoord) ;
		var diffX = Math.abs(obj.XCoord - mouseX) ;
		var diffY = Math.abs(obj.YCoord - mouseY) ;
		
		but.addEventListener("dragend",function(evt){
			evt = evt || window.event ;
			mouseX = evt.clientX ;
			mouseY = evt.clientY ;
			obj.style.left = mouseX - diffX + 'px';
			obj.style.top = mouseY - diffY + 'px';
			alert('mouseX='+mouseX+' diffX='+diffX) ;
			}
		,false) ;
		
	}

The alert from dragend is showing mouseX as zero no matter where it is currently. This works fine in Chrome so not sure what im doing wrong.

Forgot to mention, elementCoord just gets the offset of an object adding it as a property. It works fine in all browsers.