
/*=============图片无缝滚动JS==============
  Author: bbm设计传媒
  Web: www.szbbm.cn
  QQ: 278908596
  Tel: 0755-81225249
  Copyright: 深圳市多来美礼品厂
========================================*/

marqueesHeight=150;//定义移动对象的高度
stopscroll=false;
var makewing=document.getElementById("makewing");//这里声明一个标准（不可以用省略方式否则标准浏览器不支持！）
with(makewing){
style.width=200;//显示的宽度如果是文本可不要,这里一定要定义，不然在火狐下显示不出来
	  style.height=marqueesHeight+"px";
	  //把marqueesHeight的值賦給显示高度的对象
	  style.overflowX="visible";
	  style.overflowY="hidden";
	  noWrap=true;
	  onmouseover=new Function("stopscroll=true");
	  onmouseout=new Function("stopscroll=false");
  }
  preTop=0; currentTop=marqueesHeight; stoptime=0;
  //这里修改currentTop的值
  makewing.innerHTML+=makewing.innerHTML;
  

function init_srolltext(){
  makewing.scrollTop=0;
  setInterval("scrollUp()",1);
}//init_srolltext();

function scrollUp(){
  if(stopscroll==true) return;
  currentTop+=1;
  if(currentTop==marqueesHeight+1) 
  {
  	stoptime+=1;
  	currentTop-=1;
  	if(stoptime==100) //这里是显示的时间，越大越慢！
  	{
  		currentTop=0;
  		stoptime=0;  		
  	}
  }
  else {  	
	  preTop=makewing.scrollTop;
	  makewing.scrollTop+=1;
	  if(preTop==makewing.scrollTop){
	    makewing.scrollTop=marqueesHeight;
	    makewing.scrollTop+=1;
	    
	  }
  }

}
init_srolltext();
// JavaScript Document
