﻿imgsrc="<a href='comp_ly.htm'><img src='../images/kefu.gif' width='101' border='0'></a>"
document.write ("<div id='piaodongimg1' style='position:absolute; z-index:5' onmouseover='pause_resume()' onmouseout='pause_resume()'>");
document.write ("<table cellpadding='2' cellspacing='0' border='0'>")
  document.write("<tr><td><div onmouseup=turnit(piaodongimg1); style='CURSOR: hand;font-size:12px;' align='right'>×关闭</div></td></tr>");
document.write ("<tr><td>"+imgsrc+"</td></tr>")
  document.write("</table>");
document.write ("</div>");

var xPos4 = 400;
var yPos4 = document.body.clientHeight;
var step = 1;
var delay = 20; 
var height = 0;
var Hoffset4 = 0;
var Woffset4 = 0;
var yon4 = 0;
var xon4 = 0;
var pause = true;
var interval;
piaodongimg1.style.top = yPos4;
function changePos4() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset4 = piaodongimg1.offsetHeight;
Woffset4 = piaodongimg1.offsetWidth;
piaodongimg1.style.left = xPos4 + document.body.scrollLeft;
piaodongimg1.style.top = yPos4 + document.body.scrollTop;
if (yon4) {
yPos4 = yPos4 + step;
}
else {
yPos4 = yPos4 - step;
}
if (yPos4 <0) {
yon4 = 1;
yPos4 = 0;
}
if (yPos4 >= (height - Hoffset4)) {
yon4 = 0;
yPos4 = (height - Hoffset4);
}
if (xon4) {
xPos4 = xPos4 + step;
}
else {
xPos4 = xPos4 - step;
}
if (xPos4 < 0) {
xon4 = 1;
xPos4 = 0;
}
if (xPos4 >= (width - Woffset4)) {
xon4 = 0;
xPos4 = (width - Woffset4);
}
}
function start() {
piaodongimg1.visibility = "visible";
interval = setInterval('changePos4()', delay);
}

function close_float1(){
	piaodongimg1.style.visibility='hidden';
}
function pause_resume() {
	if(pause) {
		clearInterval(interval);
		pause = false;
	}
	else {
		interval = setInterval('changePos4()',delay);
		pause = true;
	}
}
start();
