document.write("<div id='divpiao4' style='Z-INDEX:100; right:2px; WIDTH:100px; POSITION:absolute; TOP:44px; HEIGHT:100px; visibility: visible;'>");
document.write("<a href='http://www.yaofu.cn/zhaoshang/weihao/' target=_blank><img src='/ad/weihao.gif' width='153' height='106' border='0'></a>");
document.write("<div onclick=\"turnit('divpiao4');\" style='cursor:pointer;' align='right'><img src='http://www.yaofu.cn/images/close_piao.gif' width='42' height='14' border='0' alt='¹Ø±Õ¹ã¸æ'></div></div>");

var obj4=document.getElementById("divpiao4");
var xPos4 = 000;
var yPos4 = 500;
var step4 = 1;
var delay4 = 40; 
var height4 = 0;
var Hoffset4 = 0;
var Woffset4 = 0;
var yon4 = 0;
var xon4 = 0;
var pause4 = true;
var interval4;
document.getElementById('divpiao4').style.top = yPos4 + "px";
function changePos4() {
width4 = document.documentElement.clientWidth;
height4 = document.documentElement.clientHeight;
Hoffset4 = document.getElementById('divpiao4').offsetHeight;
Woffset4 = document.getElementById('divpiao4').offsetWidth;
document.getElementById('divpiao4').style.left = xPos4 + document.documentElement.scrollLeft + "px";
document.getElementById('divpiao4').style.top = yPos4 + document.documentElement.scrollTop + "px";
if (yon4) {
yPos4 = yPos4 + step4;
}
else {
yPos4 = yPos4 - step4;
}
if (yPos4 < 0) {
yon4 = 1;
yPos4 = 0;
}
if (yPos4 >= (height4 - Hoffset4)) {
yon4 = 0;
yPos4 = (height4 - Hoffset4);
}
if (xon4) {
xPos4 = xPos4 + step4;
}
else {
xPos4 = xPos4 - step4;
}
if (xPos4 < 0) {
xon4 = 1;
xPos4 = 0;
}
if (xPos4 >= (width4 - Woffset4)) {
xon4 = 0;
xPos4 = (width4 - Woffset4);
}
}
function start4() {

document.getElementById('divpiao4').visibility = "visible";
interval4 = setInterval('changePos4()', delay4);
}

obj4.onmouseover=function() 
{ 
    pause_resume4();
}    

obj4.onmouseout=function()
{
    pause_resume4();
}

function pause_resume4() {
if(pause4) {
clearInterval(interval4);
pause4 = false;
}
else {
interval4 = setInterval('changePos4()',delay4);
pause4 = true;
}
}
start4();