<!--
var Speed = 10; //速度(毫秒)
var Space = 15; //每次移动(px)
var PageWidth = 650; //翻页宽度
var fill = 0; //整体移位
var MoveLock = false;
var MoveTimeObj;
var Comp = 0;
var AutoPlayObj=null;
var ISL_Pages = Math.floor(GetObj("List1").scrollWidth / PageWidth);
var ISL_Page = 1;
var GotoLock = false;
GetObj("List2").innerHTML = GetObj("List1").innerHTML;
GetObj('ISL_Cont').scrollLeft = fill>=0?fill:GetObj('List1').scrollWidth - Math.abs(fill);
GetObj("ISL_Cont").onmouseover = function(){clearInterval(AutoPlayObj);}
GetObj("ISL_Cont").onmouseout = function(){AutoPlay();}
AutoPlay();
//ISL_PageList();//点列表
function GetObj(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}
function AutoPlay(){ //自动滚动
	clearInterval(AutoPlayObj);
	AutoPlayObj = setInterval('ISL_GoDown();ISL_StopDown();',5000); //间隔时间
}
/*function ISL_PageList(){
	var i,temp="";
	for(i = 1;i<=ISL_Pages;i++){
		temp += "<img src='' class='" + (ISL_Page==i?"dotON":"dotOFF") + "' onclick='ISL_GotoPage(" + i + ")' alt='" + i + "页' />";
	};
	GetObj('dotList').innerHTML = temp;
}*/
function ISL_GotoPage(num){
	if(MoveLock)return;
	MoveLock = true;
	GotoLock = true;
	Comp = (num - 1) * PageWidth - GetObj('ISL_Cont').scrollLeft;
	ISL_Page = num;
	//ISL_PageList();
	clearInterval(AutoPlayObj);
	CompScr();
	AutoPlay();
}
function ISL_GoUp(){ //上翻开始
	if(MoveLock) return;
	clearInterval(AutoPlayObj);
	MoveLock = true;
	MoveTimeObj = setInterval('ISL_ScrUp();',Speed);
}
function ISL_StopUp(){ //上翻停止
	if(GotoLock){return};
	clearInterval(MoveTimeObj);
	if((GetObj('ISL_Cont').scrollLeft - fill) % PageWidth != 0){
		Comp = fill - (GetObj('ISL_Cont').scrollLeft % PageWidth);
		CompScr();
	}else{
		MoveLock = false;
	}
	AutoPlay();
}
function ISL_ScrUp(){ //上翻动作
	if(GetObj('ISL_Cont').scrollLeft <= 0){GetObj('ISL_Cont').scrollLeft = GetObj('ISL_Cont').scrollLeft + GetObj('List1').offsetWidth}
	GetObj('ISL_Cont').scrollLeft -= Space ;
	/*var tempPage = Math.round((GetObj('ISL_Cont').scrollLeft - fill) / PageWidth) + 1;
	if(tempPage != ISL_Page){
		ISL_Page = tempPage;
		if(ISL_Page>ISL_Pages){ISL_Page = 1};
		ISL_PageList();
	}*/
}


function ISL_GoDown(){ //下翻
	clearInterval(MoveTimeObj);
	if(MoveLock) return;
	clearInterval(AutoPlayObj);
	MoveLock = true;
	ISL_ScrDown();
	MoveTimeObj = setInterval('ISL_ScrDown()',Speed);
}
function ISL_StopDown() { //下翻停止
	if(GotoLock){return};
	clearInterval(MoveTimeObj);
	if(GetObj('ISL_Cont').scrollLeft % PageWidth - (fill>=0?fill:fill+1) != 0 ){
		Comp = PageWidth - GetObj('ISL_Cont').scrollLeft % PageWidth + fill;
		CompScr();
	}else{
		MoveLock = false;
	}
	AutoPlay();
}
function ISL_ScrDown(){ //下翻动作
	if(GetObj('ISL_Cont').scrollLeft >= GetObj('List1').scrollWidth){GetObj('ISL_Cont').scrollLeft = GetObj('ISL_Cont').scrollLeft - GetObj('List1').scrollWidth;}
	GetObj('ISL_Cont').scrollLeft += Space;
	/*var tempPage = Math.round((GetObj('ISL_Cont').scrollLeft - fill) / PageWidth) + 1;
	if(tempPage != ISL_Page){
		ISL_Page = tempPage;
		if(ISL_Page>ISL_Pages){ISL_Page = 1};
		ISL_PageList();
	}*/
}
 
function CompScr() {
	if(Comp == 0){
		ISL_Page = Math.round((GetObj('ISL_Cont').scrollLeft - fill) / PageWidth) + 1;
		if(ISL_Page>ISL_Pages){ISL_Page = 1};
		//ISL_PageList();
		MoveLock = false;
		GotoLock = false;
		return;
	}
	
	var num;
	var TempSpeed = Speed,TempSpace = Space;
	if(Math.abs(Comp)<PageWidth/5){
		TempSpace =  Math.round(Math.abs(Comp/5));
		if(TempSpace<1){TempSpace=1};
	}
	
	if(Comp < 0){ //上翻
		if(Comp < -TempSpace){
			Comp += TempSpace;
			num = TempSpace;
		}else{
			num = -Comp;
			Comp = 0;
		}
		GetObj('ISL_Cont').scrollLeft -= num;
		setTimeout('CompScr()',TempSpeed);
	}else{ //下翻
		if(Comp > TempSpace){
			Comp -= TempSpace;
			num = TempSpace;
		}else{
			num = Comp;
			Comp = 0;
		}
		GetObj('ISL_Cont').scrollLeft += num;
		setTimeout('CompScr()',TempSpeed);
	}
}
/*
function ScrollText(content, btnPrevious, btnNext, autoStart, timeout, isSmoothScroll) {
	this.Speed = 10;
	this.Timeout = timeout;
	this.stopscroll = false;//是否停止滚动的标志位
	this.isSmoothScroll = isSmoothScroll;//是否平滑连续滚动
	this.LineHeight = 20;//默认高度。可以在外部根据需要设置
	this.NextButton = this.$(btnNext);
	this.PreviousButton = this.$(btnPrevious);
	this.ScrollContent = this.$(content);
	this.ScrollContent.innerHTML += this.ScrollContent.innerHTML;//为了平滑滚动再加一遍

	if(this.PreviousButton) {
		this.PreviousButton.onclick = this.GetFunction(this,"Previous"); 
		this.PreviousButton.onmouseover = this.GetFunction(this,"MouseOver");
		this.PreviousButton.onmouseout = this.GetFunction(this,"MouseOut");
	}
	if(this.NextButton) {
		this.NextButton.onclick = this.GetFunction(this,"Next");
		this.NextButton.onmouseover = this.GetFunction(this,"MouseOver");
		this.NextButton.onmouseout = this.GetFunction(this,"MouseOut");
	}
	this.ScrollContent.onmouseover = this.GetFunction(this,"MouseOver");
	this.ScrollContent.onmouseout = this.GetFunction(this,"MouseOut");

	if(autoStart) {
		this.Start();
	}
}

ScrollText.prototype = {
	$:function(element) {
		return document.getElementById(element);
	},
	Previous:function() {
		this.stopscroll = true;
		this.Scroll("up");
	},
	Next:function() {
		this.stopscroll = true;
		this.Scroll("down");
	},
	Start:function() {
		if(this.isSmoothScroll) {
			this.AutoScrollTimer = setInterval(this.GetFunction(this,"SmoothScroll"), this.Timeout);
		} else {
			this.AutoScrollTimer = setInterval(this.GetFunction(this,"AutoScroll"), this.Timeout);
		}
	},
	Stop:function() {
		clearTimeout(this.AutoScrollTimer);
		this.DelayTimerStop = 0;
	},
	MouseOver:function() {	
		this.stopscroll = true;
	},
	MouseOut:function() {
		this.stopscroll = false;
	},
	AutoScroll:function() {
	
		if(this.stopscroll) {
			return;
		}
		
		this.ScrollContent.scrollTop++;
	
		if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0) {
			this.ScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Speed);
		} else {
			if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2) {
				this.ScrollContent.scrollTop = 0;
			}
			clearTimeout(this.ScrollTimer);
			//this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout);
		}
	},
	SmoothScroll:function() {
		if(this.stopscroll) {
			return;
		}
		this.ScrollContent.scrollTop++;
		//document.getElementById("ad").innerHTML=this.ScrollContent.scrollTop;
		if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2) {
			this.ScrollContent.scrollTop = 0;
		}
	},
	Scroll:function(direction) {
		if(direction=="up") {
			this.ScrollContent.scrollTop--;
		} else {
			this.ScrollContent.scrollTop++;
		}
		if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2) {
			this.ScrollContent.scrollTop = 0;
		} else if(parseInt(this.ScrollContent.scrollTop)<=0) {
			this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2;
		}
		
		if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0) {
			this.ScrollTimer = setTimeout(this.GetFunction(this,"Scroll",direction), this.Speed);
		}
	},
	GetFunction:function(variable,method,param) {
		return function() {
			variable[method](param);
		}
	}
}
function ignoreError() {
	return true;
}

var scroll2 = new ScrollText("breakNewsList", "pre", "next", true, 70, true);
scroll2.LineHeight = 24;
*/
//alert(document.documentElement.scrollTop);
//alert(document.documentElement.scrollLeft);   
//window.onerror = ignoreError; 
//-->