function marquee(prefix, html, _width, _height, _speed){
	this.prefix = prefix;
	this.scroller = "";
	this.scrollerHeight = _height+"px";
	this.scrollerWidth = _width+"px";
	this.stopScroll = 1;
	this.html = html;
	this._speed = _speed;
	
	this.tableName = "table_"+this.prefix;
	this.div1 = "div1_"+this.prefix;
	
	
	this.build = function()
	{
    	this.scroller='<table border="0" cellpadding="0" cellspacing="0" style="width:' +this.scrollerWidth + ';height:'+this.scrollerHeight+';">';
    	this.scroller+='<tr valign="middle"><td><div style="';
   		this.scroller+='width:'+this.scrollerWidth+'; position:relative; overflow:hidden">';
    	this.scroller+='<div id="'+this.div1+'" style="position:relative; left:0; z-index:1; ">';
    	this.scroller+='<table border="0" cellspacing="0" cellpadding="0" name="table" id="'+this.tableName+'"';
    	this.scroller+='><tr>';
    	
    	y=0;
    	
	    while (y<4)
	    {
	        this.scroller+='<td nowrap style="white-space: nowrap; "';
	        if(this.stopScroll==1){
	        	//this.scroller+=' onMouseOver="stopScroller();" onMouseOut="setWidth()"';
	        }
	        this.scroller+='><p style="white-space: nowrap; ">';
	        this.scroller+=this.html;         
	        this.scroller+='</p><\/td>';
	    	y++
	    }
	    
    	this.scroller+='<\/tr><\/table><\/div><\/div><\/td><\/tr><\/table>';  
  		document.writeln(this.scroller);
 
 		this.set_width();
	}
	
	this.set_width = function(){
		/*tableObj=$(this.tableName); 
		obj=$(this.div1);   
		objWidth=tableObj.offsetWidth;
		HalfWidth=Math.floor(objWidth/2);
		newWidth = (HalfWidth*2)+2;
		obj.style.width=newWidth*/
		newWidth = $(this.tableName).offsetWidth;
		setTimeout(move.bind(this), this._speed, newWidth);
		
	}

}

function move(_w)
{
	obj = $(this.div1);
	maxLeft = (0-(_w/2)+2)/2
	l = (parseInt(obj.style.left) <= maxLeft)?0:parseInt(obj.style.left)-1;
  	obj.style.left=l+"px";
  	setTimeout(move.bind(this), this._speed, _w);
}