function ScrollLayer(objIFrame,objIframeInfo)
{
	this.IFrameHeight = -1 ;         //IFrame的高度  //设为-1采用Html中的值
	this.IFrameWidth = -1 ;          //IFrame的宽度
	this.Position = 0 ;              //当前位置
	this.Step = 1 ;                  //每次移动步长 //设置定默认值为1
	this.TimerSpan = 20 ;            //每循环间隔秒数
	this.Direction = 1 ;             // 方向为 (上下移动 1)( 左右移动 2) ,默认为上下移动
	this.IFrame = objIFrame ;        //IFrame对象
	this.IframeInfo = objIframeInfo  //Iframe中的对象名称
	this.Name = "" ;                 //记录对象名称，必须设置字段，setTimeout 中用。	
}

ScrollLayer.prototype.Initilize = function() 
{

    if ( -1 != this.IFrameHeight )
		this.IFrame.height = this.IFrameHeight ;
    if ( -1 != this.IFrameWidth )
		this.IFrame.width = this.IFrameWidth ;
}

ScrollLayer.prototype.Scroll = function()
{
	this.Position = (this.Position + this.Step) % (this.IframeInfo.clientWidth / 2)
	if ( 1 == this.Direction ) 	
	{
		this.IFrame.scrollTo( 0 , this.Position );
	}
	else if( 2 == this.Direction ) 
	{
		this.IFrame.scrollTo( this.Position , 0 );
	}
}
ScrollLayer.prototype.Pause = function()
{
    clearInterval(this.Interval);
}
ScrollLayer.prototype.Play = function()
{
	this.Interval = setInterval(this.Name + ".Scroll()",this.TimerSpan)
}





















