var scrollInterval = 10;
var scrollHeight = 170; //高度,注意如果修改这个值,table中也要相应的修改
var scrollTimer;
var scrollBtn;
var mouseInit;
var slideInit;
function uncScroll(oBtn, nStep)
{
var content = oBtn.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling.childNodes[0].childNodes[0];
var slide = oBtn.parentNode.parentNode.parentNode.rows[1].cells[0].childNodes[0];
var h = content.clientHeight;
if (h <= scrollHeight)
return;
content.style.pixelTop += nStep;
if (content.style.pixelTop > 0)
content.style.pixelTop = 0;
if (content.style.pixelTop+h < scrollHeight)
content.style.pixelTop = scrollHeight - h;
var m = -content.style.pixelTop*(slide.parentNode.clientHeight-slide.clientHeight)/(h-scrollHeight);
slide.style.marginTop = m + "px";
}
function uncSlide(oSlide)
{
var content = oSlide.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling.childNodes[0].childNodes[0];
var h = content.clientHeight;
if (h <= scrollHeight)
return;
var m = slideInit + (event.y - mouseInit);
if (m < 0)
m = 0;
if (m > oSlide.parentNode.clientHeight-oSlide.clientHeight)
m = oSlide.parentNode.clientHeight-oSlide.clientHeight;
oSlide.style.marginTop = m + "px";
content.style.pixelTop = -m*(h-scrollHeight)/(oSlide.parentNode.clientHeight-oSlide.clientHeight);
}
</script>