<HTML>
<HEAD>
<TITLE>图片滚动控制效果-</TITLE>
</HEAD>
<BODY STYLE="overflow: hidden; border: 0"topmargin=0 leftmargin=0>
<table>
<tr><tdstyle="padding: 5">
<div id="testDiv" style="border: buttonface 2solid">
<img src="http://www.fxzww.com/alixixi.gif">
</div>
<script language="JScript">
function scroll(obj, oWidth, oHeight, direction, drag, zoom,speed)
{
varscrollDiv = obj
varscrollContent = document.createElement("span")
scrollContent.style.position = "absolute"
scrollDiv.applyElement(scrollContent, "inside")
vardisplayWidth = (oWidth != "auto" && oWidth ) ?oWidth :scrollContent.offsetWidth +parseInt(scrollDiv.currentStyle.borderRightWidth)
vardisplayHeight = (oHeight != "auto" && oHeight) ?oHeight : scrollContent.offsetHeight +parseInt(scrollDiv.currentStyle.borderBottomWidth)
varcontentWidth = scrollContent.offsetWidth
varcontentHeight = scrollContent.offsetHeight
varscrollXItems = Math.ceil(displayWidth /contentWidth) + 1
varscrollYItems = Math.ceil(displayHeight / contentHeight) + 1
scrollDiv.style.width = displayWidth
scrollDiv.style.height = displayHeight
scrollDiv.style.overflow = "hidden"
scrollDiv.setAttribute("state", "stop")
scrollDiv.setAttribute("drag", drag ? drag : "horizontal")
scrollDiv.setAttribute("direction", direction ? direction :"left")
scrollDiv.setAttribute("zoom", zoom ? zoom : 1)
scrollContent.style.zoom = scrollDiv.zoom
varscroll_script= "varscrollDiv = " +scrollDiv.uniqueID +"\n"+
"var scrollObj = " +scrollContent.uniqueID +"\n"+
"var contentWidth = " + contentWidth + " *(scrollObj.runtimeStyle.zoom ? scrollObj.runtimeStyle.zoom :1)" +"\n"+
"var contentHeight = " + contentHeight + " *(scrollObj.runtimeStyle.zoom ? scrollObj.runtimeStyle.zoom :1)" +"\n"+
"var scrollx =scrollObj.runtimeStyle.pixelLeft" +"\n"+
"var scrolly =scrollObj.runtimeStyle.pixelTop"