rem: hop_add_event_listener( document, "mousemove", mousemove ); 
context: function hop_iwindow_drag( event, win ) {   var dx = event.clientX - win.offsetLeft;   var dy = event.clientY - win.offsetTop;   var ocursor = win.el_handle.style.cursor;   hop_iwindow_raise( win );      win.el_main.style.height = win.el_main.offsetHeight;   win.el_main.style.width = win.el_main.offsetWidth;   win.el_body.style.visibility = "hidden";   win.el_handle.style.cursor = "move";   var mousemove = function( event ) {      var nx = (event.clientX - dx);      var ny = (event.clientY - dy);      if( win.user_parent ) {	 var p = win.parentNode;	 var px = hop_element_x( p );	 var py = hop_element_y( p );      	 if( (nx > px) && ((nx + win.offsetWidth) < (px + p.offsetWidth)) ) {	    win.style.left = nx;	 }	 if( (ny > py) && ((ny + win.offsetHeight) < (py + p.offsetHeight)) ) {	    win.style.top = ny;	 }      } else {	 if( nx > 0 ) win.style.left = nx;	 if( ny > 0 ) win.style.top = ny;      }   }   hop_add_event_listener( document, "mousemove", mousemove );   document.onmouseup = function( event ) {      hop_remove_event_listener( document, "mousemove", mousemove );      win.el_handle.style.cursor = ocursor;      win.el_body.style.visibility = "visible";      /* user event */      if( win.ondrag ) win.ondrag();   }   hop_stop_propagation( event );}
meta: 4636	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4636/a6ed8e1dacfac579593af3fc5dd75eae78ef2b2f/hop-iwindow.js/buggy/share/hop-iwindow.js