var xPos = document.body.clientWidth-20; 
var yPos = document.body.clientHeight/2; 
var step = 1; 
var delay = 5; 
var height = 0; 
var Hoffset = 0; 
var Woffset = 0; 
var yon = 0; 
var xon = 0; 
var pause = true; 
var interval; 
var img=null;
function changePos() {  
if(img==null)return
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() { 
if(img==null)return
img.visibility = "visible"; 
interval = setInterval('changePos()', delay); 
} 
function pause_resume() { 
if(img==null)return
if(pause) { 
clearInterval(interval); 
pause = false; 
}else { 
interval = setInterval('changePos()',delay); 
pause = true; 
} 
} 
function floatdiv(name,strHtml,width,height,border,bgimg){
	document.write("<div id='"+name+"' style=\"position:absolute;z-index:99999;color:#ff0000;background-color: ; border: 0px double #3399ff;width:"+width+";height:"+height+"\" onmouseover='pause_resume();' onmouseout='pause_resume();' onclick=window.location.href='http://www.b2bsky.com/使用说明/《站细》使用说明书V3.5.doc'>");
	document.write("<div style='width: 100%; height:  100%; position: relative;'>");
	document.write("<div style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+((bgimg==null || bgimg=="")?"images/float_bg.png":bgimg)+"',sizingMethod='scale');width: 100%; height:  100%; position: absolute;\"></div>");
	document.write("<img src='images/zxpd.png' style='position: absolute; z-index: 0; width: 100%; height: 100%' />");
	document.write("<div style='position: relative; width: 100%; height: 100%; z-index: 1' id='layer1'>");
	document.write("<table border=0 cellspacing=0 cellpadding="+((border==null || border=="")?10:border)+" align=center width='100%' height='100%'>");
	document.write("<tr>");
	document.write("<td align='center'>");
	document.write(strHtml);
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</div>");
	document.write("</div>");
	document.write("</div>");
	img=document.all[name];
	if(img!=null){
		img.style.top = yPos; 
		start(); 
	}
}
