var scrollIMG = {
	 addEvent:function(sr,ev,fn,can){
			if(sr.addEventListener){
			sr.addEventListener(ev,fn,can);
			return true;
			}
			else if(sr.attachEvent){	
			var rel = sr.attachEvent("on"+ev,fn);
			return rel;
			}
			else{
			sr["on"+ev]=fn;
			}		
	},
	chick:function(e){
		if(!document.getElementsByName || !document.getElementById){return false;}
		var tagA = document.getElementsByTagName("a");
		for(i=0;i<tagA.length;i++){
			if(tagA[i].className.search(/\Sup\b/) == -1){continue;}			
			scrollIMG.addEvent(tagA[i],"mouseover",scrollIMG.scrollRightIn,false);
			scrollIMG.addEvent(tagA[i],"mouseout",scrollIMG.scrollRightOut,false);
		}
		for(j=0;j<tagA.length;j++){
			if(tagA[j].className.search(/\Sdown\b/) == -1){continue;}			
			scrollIMG.addEvent(tagA[j],"mouseover",scrollIMG.scrollLeftIn,false);
			scrollIMG.addEvent(tagA[j],"mouseout",scrollIMG.scrollLeftOut,false);
		}
		
		
	},
	scrollRightIn:function(e){		
	 t=setInterval(scrollIMG.scrollfucup,30);
	},
	scrollRightOut:function(e){	
	 clearInterval(t);i=0;
	},
	scrollLeftIn:function(e){	
	 t=setInterval(scrollIMG.scrollfucdown,30);			
	},
	scrollLeftOut:function(e){	
	 clearInterval(t);i=0;	
	},	
	scrollfucdown:function(e){	
    	i++;
    	document.getElementById(scrollIMG["ScrollBox"]).scrollTop+=i;
    },
    scrollfucup:function(e){
    	i++;
    	if(document.getElementById(scrollIMG["ScrollBox"]).scrollTop>0){
    	document.getElementById(scrollIMG["ScrollBox"]).scrollTop-=i;
    	}
		else{
			clearInterval(t);
	        i=0;
          	}
    },
	"ScrollBox":"ScrollBox"	
}
scrollIMG.addEvent(window,"load",scrollIMG.chick,false);
