//有不明白的问技术部
//            --乖乖狼

			var RandomSrc = adRandomSrc                  //飘动图片地址
			var RandomFlash = adRandomFlash                        //飘动图片类型
			var RandomHref = adRandomHref     //飘动图片连接地址
			var RandomWidth = adRandomWidth                              //飘动图片宽度
			var RandomHeight = adRandomHeight                            //飘动图片高度


//以下内容不要去修改
document.write("<DIV id=img style=\"LEFT: 90px; VISIBILITY: visible; WIDTH: 90px; POSITION: absolute; TOP: 90px; HEIGHT: 90px\">")

if (RandomSrc != "") {
				if (RandomFlash == "flash") {
					document.write("<embed src=\"" + RandomSrc + "\" quality=\"high\"  width=\"" + RandomWidth + "\" height=\"" + RandomHeight + "\" type=\"application/x-shockwave-flash\"></embed>");
				}
				else{
					document.write("<a href=\"" + RandomHref +"\"><img src=\"" + RandomSrc + "\"  width=\"" + RandomWidth + "\" height=\"" + RandomHeight + "\"  border=\"0\" \></a>");
				}
			}

document.write("</DIV>");


var xPos = 380;
var yPos = 300;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 380;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos;
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 < 380) {
xon = 1;
xPos = 380;
}
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();
