function news_scroll(divid, height, arrStack)
{
	this.ie = navigator.userAgent.indexOf('MSIE')>=0;
	this.div = document.all[divid]; 
	this.to=this.j=0;this.po=1;this.mflag=false;  
        this.st1=arrStack; 
        this.rolling=(height%2)?3:2;
	this.up = height; 
	this.height = height; 
	this.down = 0-height;

	this.start = news_scroll_start;
	this.go = news_scroll_go; 
	this.gt = news_scroll_gt; 	
	this.chgdata = news_scroll_chgdata; 
	this.chog = news_scroll_chog; 
	return this; 
}
function news_scroll_start(objName) { 
	this.chgdata(1); this.chog(1,objName);
	this.mflag = true;
}
function news_scroll_go(o)
{return this.div.all['e'+o];}
function news_scroll_gt()
{return this.ie?"pixelTop":"top";}
function news_scroll_chgdata(o) 
{ 
	var szhtml = ""; 
	for(var idx=0; idx< this.st1.length; idx++)
		szhtml += "<div style='height:"+this.height+"'>"+this.st1[idx]+"</div>";  
	for(var idx=0; idx< this.st1.length; idx++)
		szhtml += "<div style='height:"+this.height+"'>"+this.st1[idx]+"</div>";  
	this.go(o).innerHTML = szhtml; 	
}
function news_scroll_chog(o,objName)
{
	if (this.st1.length==0) return;
        if (this.mflag) 
              eval("this.go(o).style."+this.gt()+"=parseInt(this.go(o).style."+this.gt()+")-"+this.rolling+";"); 
        if (parseInt(eval("this.go(o).style."+this.gt())%this.height) == 0) 
		{
		if( parseInt(eval("this.go(o).style."+this.gt())) == this.height*this.st1.length*-1) 
			eval("this.go(o).style."+this.gt()+"=0;");
		setTimeout("news_scroll_settimeout("+o+",'"+objName+"')",2000);
		}	
	else
		setTimeout("news_scroll_settimeout("+o+",'"+objName+"')",1);
}

function news_scroll_settimeout(o,objName)
{
	obj = eval(objName); 
	if(obj.st1.length>1)	{	//½ºÅ©·ÑÇÒ ¹®ÀÚ¹è¿­ÀÌ  2°³ ÀÌ»óÀÏ °æ¿ì¿¡¸¸ ½ºÅ©·Ñ µÇµµ·Ï ÇÏ´Â if Á¶°Ç¹®.
		obj.chog(o,objName); 	
	}

}

