65 lines
1.6 KiB
JavaScript
65 lines
1.6 KiB
JavaScript
|
|
var x = 0;
|
|
var y = 0;
|
|
var snow = 0;
|
|
var sw = 0;
|
|
var cnt = 0;
|
|
var dir = 1;
|
|
var offsetx = 3;
|
|
var offsety = 3;
|
|
var width = 150;
|
|
var height = 50;
|
|
var doc = .bbb;
|
|
|
|
over = overDiv.style; //ÇöÀçâ
|
|
bbb.onmousemove = mouseMove;
|
|
|
|
|
|
function drs(text, title,z,k) {dts(1,text,z,k); }
|
|
|
|
function nd() {
|
|
if ( cnt >= 1 ) { sw = 0 };
|
|
if ( sw == 0 ) { snow = 0; hideObject(over); }
|
|
else { cnt++; }
|
|
}
|
|
|
|
function dts(d,text,z,k) {
|
|
//alert(z);
|
|
txt = "<TABLE WIDTH=180 STYLE=\"border:1 #D9CEA5 solid\" CELLPADDING=5 CELLSPACING=0 BORDER=0><TR><TD BGCOLOR=#ffffff CLASS=cal>"+text+"</TD></TR></TABLE>"
|
|
layerWrite(txt);
|
|
dir = d;
|
|
x = z;
|
|
y = k;
|
|
disp();
|
|
}
|
|
|
|
function disp() {
|
|
if (snow == 0) {
|
|
if (dir == 2) { moveTo(over,x+offsetx-(width/2),y+offsety); } // Center
|
|
if (dir == 1) { moveTo(over,x+offsetx,y+offsety); } // Right
|
|
if (dir == 0) { moveTo(over,x-offsetx-width,y+offsety); } // Left
|
|
showObject(over);
|
|
snow = 1;
|
|
}
|
|
}
|
|
|
|
function mouseMove(e) {
|
|
x=event.x + doc.body.scrollLeft+10
|
|
y=event.y + doc.body.scrollTop
|
|
if (x+width-doc.body.scrollLeft > doc.body.clientWidth) x=x-width-25;
|
|
if (y+height-doc.body.scrollTop > doc.body.clientHeight) y=y-height;
|
|
|
|
if (snow) {
|
|
if (dir == 2) { moveTo(over,x+offsetx-(width/2),y+offsety); } // Center
|
|
if (dir == 1) { moveTo(over,x+offsetx,y+offsety); } // Right
|
|
if (dir == 0) { moveTo(over,x-offsetx-width,y+offsety); } // Left
|
|
}
|
|
}
|
|
|
|
function cClick() { hideObject(over); sw=0; }
|
|
|
|
function layerWrite(txt) { document.all["overDiv"].innerHTML = txt } //ÇöÀçâ
|
|
function showObject(obj) { obj.visibility = "visible" }
|
|
function hideObject(obj) { obj.visibility = "hidden" }
|
|
function moveTo(obj,xL,yL) { obj.left = xL; obj.top = yL; }
|