// JavaScript Document
 /*使用方法
 id="scrollList" onmouseover="gd.stopScroll()" onmouseout="gd.Scroll()"
 gd=new gunDOng();
	gd.id="scrollList";
	gd.Scroll();	*/
    /*向上滚动，已封装*/
function gunDOng()
{
	  
     this.id="";
	 var gdid=this;
	 this.boxM = 0;
	 this.Scroll=function(){
	 
	 this.scrollList=function()
	 {
		
	 gdid.scrolling=window.setInterval(this.moveList,200);
	 };
   
   this.moveList=function()
	 {
    var moveThis = document.getElementById(gdid.id).getElementsByTagName("li")[0];
	var boxHeight = moveThis.offsetHeight;
	if(gdid.boxM>-boxHeight){
		gdid.boxM--;
		moveThis.style.marginTop=gdid.boxM+"px";
	}
	else{
		var oldElement = moveThis.cloneNode(true);
		oldElement.style.marginTop=0+"px";
		document.getElementById(gdid.id).removeChild(moveThis);
		document.getElementById(gdid.id).appendChild(oldElement);
		gdid.boxM = 0;
	   }
	 };
     this.scrollList();	 
};
		
		
    this.stopScroll=function(){
		window.clearInterval(gdid.scrolling);}	
}


/*$(function () {
    gd1 = new gunDOng();
    gd1.id = "scrollList1";
    gd1.Scroll();
    gd2 = new gunDOng();
    gd2.id = "scrollList2";
    gd2.Scroll();
    gd3 = new gunDOng();
    gd3.id = "scrollList3";
    gd3.Scroll();
    gd4 = new gunDOng();
    gd4.id = "scrollList4";
    gd4.Scroll();
    scrollbox('qgxj');
});
*/
