function PutujiciText(idBox, texty, mezera, prodleva, pocatecni_posun_zprav)
{
	this.Proxy = function(self, pfunc) { return function() { pfunc.apply(self); } }
	this.box = $("#"+idBox);
	this.mezera = (mezera == null || mezera < 0) ? 20 : mezera;
	this.delay = (prodleva == null || prodleva <= 0) ? 20 : prodleva;
	this.pocatecni_posun_zprav = (pocatecni_posun_zprav == null) ? 0 : pocatecni_posun_zprav;
	this.obal = null;
	
	this.Move = function()
	{
		this.obal.custom_x --;
		if(this.obal.custom_x < -this.obal.custom_width)
			this.obal.custom_x = this.box.custom_width;
		this.obal.css("left", this.obal.custom_x+"px");
	}
	
	this.Init = function()
	{
	
		this.box.css("overflow", "hidden");
		this.box.css("white-space", "nowrap");
		if(texty.length == 1)
			texty[1] = "";
		id = idBox+"_obal";	
		this.box.append("<span id='"+id+"' style='position:relative;left:"+this.pocatecni_posun_zprav+"px;'></span>");
		this.obal = $("#" + id);
		for(i = 0; i < texty.length; i++)
			this.obal.append('<span style="position:relative;margin-right:'+this.mezera+'px;">'+texty[i]+'</span>');
		this.box.custom_width = this.box.width();
		this.obal.custom_x = this.pocatecni_posun_zprav;
		this.obal.custom_width = this.obal.width();
		window.setInterval( this.Proxy(this, function(){this.Move();}), this.delay);
	}
	
	this.Init();
}
