document.write("<DIV id=img style='LEFT: 64px; WIDTH: 170px; POSITION: absolute; TOP: 64px; HEIGHT: 80px'>"
                +"<A href='http://gk.zjedu.org/gb/index1.html' target=_blank><IMG src='http://www.zjpqzx.com/images/logo110.gif' border=0></a>"
                +"<br><td width=80 height=20 align=middle><a href='javascript:close_float_left();void(0);' ><b><font color=#ff0000>关闭<font></b></a></td></div>");

var xPos = 100;//图片起始的横坐标,从屏幕左部算起~
var yPos = 0;//图片起始的纵坐标,从屏幕上部算起~
var step = 1;//图片广告漂浮的速度~数字越大,漂浮越快~
var delay = 40; 
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function close_float_left(){
    img.style.visibility='hidden';
}
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.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() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
function pause_resume() {
if(pause) {
clearInterval(interval);
pause = false;
}
else {
interval = setInterval('changePos()',delay);
pause = true;
}
}
start();
