hier heb je een scriptje van een menu dat je kan verplaatsen waar je maar wil:
<div id="movmenu" style="position:absolute; visibility:show; left:20; top:20; z-index:2; width:149; height:168"> <table border="1" bgcolor="#9C9673" bordercolor="#313031" style="border-collapse: collapse" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#6B6952"><b><center> <p> <font FACE="MS Sans Serif" style="color:#313031;cursor:move;text-decoration:none;font-size:12pt"> Menu</font></b></p> </center></td> </tr> <tr> <td bgcolor="#9C9673"><font color="#313031"><br> </font> <a href="yoururl1.html"><font color="#313031">Your</font><font color="#313031"> Link1</font></a><font color="#313031"><br> </font> <a href="yoururl2.html"><font color="#313031">Your</font><font color="#313031"> Link2</font></a><font color="#313031"><br> </font> <a href="yoururl3.html"><font color="#313031">Your</font><font color="#313031"> Link3</font></a><font color="#313031"><br> </font> <a href="yoururl4.html"><font color="#313031">Your</font><font color="#313031"> Link4</font></a><font color="#313031"><br> </font> </td> </tr> <tr> <td bgcolor="#6B6952"><center> <p> <a href="javascript:void(0)" FACE="MS Sans Serif" style="color:#313031;cursor:move;text-decoration:none;font-size:10pt" onmousedown="InitializeMove()"> <b>Click hier voor het verplaatsen van het Menu<br> Double-Click to Stop</b></p> </center></a></td> </tr> </table> </div> <div id="emptycell" style="position:absolute; visibility:show; left:-70px; top:-70px; z-index:2"> </div> <script language="JavaScript1.2"> <!-- var XX = -70; var YY = -70; var cur_one = "emptycell" var moving = false; var xpos1 = 20; var ypos1 = 20; var myX = 0; var myY = 0;
function InitializeMove() { cur_one = "movmenu"; XX = eval("xpos1"); YY = eval("ypos1"); }
function CaptureMove() { if (document.layers) document.captureEvents(Event.MOUSEMOVE); }
function EndMove() { if (document.layers) document.releaseEvents(Event.MOUSEMOVE);
cur_one = "emptycell" moving = false; document.close(); }
function WhileMove() {
if (document.all) { eval(cur_one+".style.left="+myX); eval(cur_one+".style.top="+myY); } if (document.layers) { eval("document."+cur_one+".left="+myX); eval("document."+cur_one+".top="+myY); } }
function MoveHandler(e) {
myX = (document.all) ? event.clientX : e.pageX; myY = (document.all) ? event.clientY : e.pageY;
if (!moving) { diffX = XX - myX; diffY = YY - myY; moving = true; if (cur_one == "emptycell") moving = false; } myX += diffX; myY += diffY;
if (moving) { xpos1 = myX; ypos1 = myY; }
WhileMove(); }
function ClearError() { return true; }
if (document.layers) { document.captureEvents(Event.CLICK); document.captureEvents(Event.DBLCLICK); }
document.onmousemove = MoveHandler; document.onclick = CaptureMove; document.ondblclick = EndMove; window.onerror = ClearError;
WhileMove(); //--> </script>
|