// Seismic window by Paul Anderson, copyright 1999 CNET, Inc.
var quakeID=0;
var deltaX=0;
var deltaY=0;
function tremor(dir) { // -10 to 10
with(Math) return ceil(random()10)2(floor(random()2)-.5);
}
function winQuake() {
clearTimeout(quakeID);
for (i=0;i<=((Math.random()35)+5);i++) {
xShift = tremor();
yShift = tremor();
window.moveBy(xShift,yShift);
deltaX -= xShift;
deltaY -= yShift;
}
winReset();
quakeID=setTimeout("winQuake()",Math.ceil(Math.random()3500)+250);
}
function winReset() {
window.moveBy(deltaX,deltaY);
deltaX=0; deltaY=0;
}
//window.onload=winQuake;隨載入啟動
//window.onunload=winReset;//當關閉重?#93;晃動值
//—>