document.writeln("<div id=\"pf\"  onMouseUp=\"pause_resume()\"  onMouseOut=\"pause_resume()\" style=\"position:absolute; left:570px; top:239px; width:200px; height:100px; z-index:1\"><a href=\"http://bbs.fishtt.hk\" target=\"_blank\"><img src=\"ad/ad_pf.jpg\" border=\"0\"></a><div align=\"right\" style=\"position: absolute;top:90px;right:0px;margin:2px;padding:2px;z-index:2000;cursor:hand;\"><a onClick=\"unstart()\" style=\"color:#0000FF;text-decoration:none;font-size:12px;\">¹Ø±Õ</a></div></div>");
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30; 
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
pf.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = pf.offsetHeight;
Woffset = pf.offsetWidth;
pf.style.left = xPos + document.body.scrollLeft;
pf.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
   }
}
function start() {
pf.visibility = "visible";
interval = setInterval('changePos()', delay);
}

function unstart() {
pf.style.display="none";
if(pause)
{
clearInterval(interval);
pause = false;
}
else
{
interval = setInterval('changePos()',delay);
pause = true;
}
}

function pause_resume() {
if(pause) {
clearInterval(interval);
pause = false;
}
else {
interval = setInterval('changePos()',delay);
pause = true;
   }
}
start();

