ciao a tutti,
sto cercando di creare una routine che mi permette di spostare un div, tramite il mouse, appunto il drag & drop.
ecco quello che sono riuscito a fare, prendendo spunto qua e la:
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" lang="it">

<
head>
<
titleprova</title>

<
style>
#cont{ 
    
width:300px;
}
#cont{
    
positionrelative;
    
top:0px;
    
left:0px;
}
.
bordo{
    
position:relative;
    
float:left;
    
background-colorblack;
}    

</
style>
</
head>
<
body>
<
script type="text/javascript">
<!--
var 
giu true;
var 
LTXY;
function 
coordinate(coord){
   
giu true;
   
document.getElementById("cont").style.left;
   
document.getElementById("cont").style.top;
    
X=coord.pageX;
    
Y=coord.pageY;
   
document.onmousemove muovi;
}
function 
muovi(){
    var 
xy;
    if (
giu){
        
ycoord.pageY Y;
        
document.getElementById("cont").style.top "px";
        
xcoord.pageX X;
        
document.getElementById("cont").style.left "px";
    }
}
function 
su(){
    
giu false;
}

document.getElementById("top").onmousedown=coordinate;
document.getElementById("bottom").onmouseup=su;
//-->
</script>
<div id="cont">
<div style="width:3px; height: 3px; cursor:nw-resize" class="bordo"></div>
<div style="width:294px; height: 3px; cursor:n-resize" class="bordo"></div>
<div style="width:3px; height: 3px; cursor:ne-resize" class="bordo"></div>
<div style="width:3px; height: 175px; cursor:w-resize" class="bordo"></div>
<div style="width:294px; float:left">
    <div id="top" style="height:25px; background-color: blue; cursor:move;" ></div>
    <div id="bottom" style="height:150px; background-color: yellow;"></div>
</div>
<div style="width:3px; height: 175px; cursor:e-resize" class="bordo"></div>
<div style="width:3px; height: 3px; cursor:sw-resize" class="bordo"></div>
<div style="width:294px; height: 3px; cursor:s-resize" class="bordo"></div>
<div style="width:3px; height: 3px; cursor:se-resize" class="bordo"></div>
</div>

</body>
</html> 
per adesso mi basta la compatibilità con firefox.
grazie