<html>
<head>
<title>TEST!</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:219px;
top:351px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer2 {
position:absolute;
left:709px;
top:328px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer3 {
position:absolute;
left:18px;
top:12px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer4 {
position:absolute;
left:301px;
top:46px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer5 {
position:absolute;
left:23px;
top:185px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer6 {
position:absolute;
left:457px;
top:288px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer7 {
position:absolute;
left:699px;
top:33px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer8 {
position:absolute;
left:207px;
top:91px;
width:auto;
height:auto;
z-index:1;
border-color:#333333;
border-width:thick;
border-style:ridge;
}
#Layer9 {
position:absolute;
left:227px;
top:146px;
width:126px;
height:49px;
z-index:9;
}
-->
</style>
</head>
<body>
<script type="text/javascript" src="wz_dragdrop/wz_dragdrop.js"></script>
<div id="Layer1">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer2">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer3">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer4">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer5">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer6">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer7">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<div id="Layer8">
<applet code="" width="160" height="146" alt="Sie m&ssen Java installieren!"><param name="TestText" value="SELFHTML"></applet>
</div>
<script type="text/javascript">
<!--
SET_DHTML(CURSOR_MOVE, SCROLL, "Layer1", "Layer2", "Layer3", "Layer4", "Layer5", "Layer6", "Layer7", "Layer8");
var dy = 7;
var margTop = 1500;
var posOld;
// Array intended to reflect the order of the draggable items
var aElts = [dd.elements.Layer1, dd.elements.Layer2, dd.elements.Layer3, dd.elements.Layer4, dd.elements.Layer5, dd.elements.Layer6, dd.elements.Layer7, dd.elements.Layer8];
function my_PickFunc()
{
// Store position of the item about to be dragged
// so we can interchange positions of items when the drag operation ends
posOld = dd.obj.y;
}
function my_DropFunc()
{
// Calculate the snap position which is closest to the drop coordinates
var y = dd.obj.y+dy/2;
y = Math.max(margTop, Math.min(y - (y-margTop)%dy, margTop + (aElts.length-1)*dy));
// Index of the new position within the spatial order of all items
var i = (y-margTop)/dy;
// Interchange the positions of the two items
aElts[i].moveTo(100, posOld);
// Let the dropped item snap to position
dd.obj.moveTo(100, y);
// Update the array according to the changed succession of items
aElts[(posOld-margTop)/dy] = aElts[i];
aElts[i] = dd.obj;
}
//-->
</script>
</body>
</html>