function $$(e) {return document.getElementById(e);}
document.getElementsByClassName = function(cl) {
    var retnode = [];
    var myclass = new RegExp('\\b'+cl+'\\b');
    var elem = this.getElementsByTagName('*');
    for (var i = 0; i < elem.length; i++) {
        var classes = elem[i].className;
        if (myclass.test(classes)) retnode.push(elem[i]);
    }
    return retnode;
}
var MyMar;
var speed = 15; //速度，越大越慢
var spec = 1; //每次滚动的间距, 越大滚动越快
var ipath = '/info/OJaW5aMU8L/'; //图片路径
var thumbs = document.getElementsByClassName('thumb_img');
for (var i=0; i<thumbs.length; i++) {
    //thumbs[i].onmouseover = function () {$$('main_img').src=this.rel; $$('main_img').link=this.link;};
    thumbs[i].onclick = function () {window.open(this.link)}
}

$$('gotop').onmouseover = function() {this.src = ipath + 'top2.jpg'; MyMar=setInterval(gotop,speed);}
$$('gotop').onmouseout = function() {this.src = ipath + 'top1.jpg'; clearInterval(MyMar);}
$$('gobottom').onmouseover = function() {this.src = ipath + 'end2.jpg'; MyMar=setInterval(gobottom,speed);}
$$('gobottom').onmouseout = function() {this.src = ipath + 'end1.jpg'; clearInterval(MyMar);}
function gotop() {$$('showArea').scrollTop-=spec;}
function gobottom() {$$('showArea').scrollTop+=spec;}
