1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76: | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ebende verschieben mit Abbremsen</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function flevSlideDiv() { // v2.0, Marja Ribbers-de Vroed, FlevOOware
if (arguments.length < 4) {return;}
var sD = arguments[0]; if (sD == "") {return;}
var oD = eval("MM_findObj('" + sD + "')"); if (oD == null) {return;}
var iNX = parseInt(arguments[1]), iNY = parseInt(arguments[2]), iS = parseInt(arguments[3]);
var iPx = (arguments.length > 4) ? parseInt(arguments[4]) : 0;
var iR = (arguments.length > 5) ? parseInt(arguments[5]) : 0;
var iT = 10, sS = ""; if (!document.layers) {oD = oD.style;}
if (oD.tT != null) {clearTimeout(oD.tT);}
var iCX = parseInt(oD.left), iCY = parseInt(oD.top);
if (iR != 0) { // relative
if (iR == 1) {iNX = iCX - iNX; iNY = iCY;} // left
else if (iR == 2) {iNX = iCX + iNX; iNY = iCY;} // right
else if (iR == 3) {iNY = iCY - iNY; iNX = iCX;} // up
else {iNY = iCY + iNY; iNX = iCX;} // down
}
var iX = iNX, iY = iNY;
if ((iCX != iNX) || (iCY != iNY)) {
if (iPx > 0) { iT = iS;
var iPxX = iPx, iPxY = iPx, iMX = Math.abs(iCX - iNX), iMY = Math.abs(iCY - iNY);
if (iMX < iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
else {iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
if (iPxX >= iMX) {iPxX = Math.min(Math.ceil(iPxX), iPx);}
if (iPxY >= iMY) {iPxY = Math.min(Math.ceil(iPxY), iPx);}
if ((iCX < iNX) && (iCX + iPxX < iNX)) {iNX = iCX + iPxX;}
if ((iCX > iNX) && (iCX - iPxX > iNX)) {iNX = iCX - iPxX;}
if ((iCY < iNY) && (iCY + iPxY < iNY)) {iNY = iCY + iPxY;}
if ((iCY > iNY) && (iCY - iPxY > iNY)) {iNY = iCY - iPxY;}
}
else {
var iMX = ((iNX - iCX) / iS);
iMX = (iMX > 0) ? Math.ceil(iMX) : Math.floor(iMX);
iNX = iCX + iMX;
var iMY = ((iNY - iCY) / iS);
iMY = (iMY > 0) ? Math.ceil(iMY) : Math.floor(iMY);
iNY = iCY + iMY;
}
if ((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
if (iMX != 0) {eval("oD.left = '" + iNX + sS + "'");}
if (iMY != 0) {eval("oD.top = '" + iNY + sS + "'");}
var sFunction = "flevSlideDiv('" + sD + "'," + iX + "," + iY + "," + iS + "," + iPx + ",0)";
oD.tT = setTimeout(sFunction,iT);
}
}
//-->
</script>
</head>
<body>
<a href="#" onClick="flevSlideDiv('ebene',10,200,20,0,0)">Ebene verschieben</a>
<div id="ebene" style="position:absolute; width:100px; height:50px; z-index:1; background-color: #FF0000; layer-background-color: #FF0000; border: 1px #000000; top: 80; left: 10;"></div>
</body>
</html>
|