	function ticker(id, timeOut, bgColor, textColor, clipWidth, clipHeight){
		this.id			= id;
		this.timeout 	= timeOut;
		this.bgColor	= bgColor;
		this.textColor	= textColor;
		this.clipWidth	= clipWidth;
		this.clipHeight	= clipHeight;
		this.active		= 0;
		this.count		= 0;
		
		this.texts		= new Array();
		this.hrefs		= new Array();
		
		this.append		= fnAppend;
		this.ini		= fnIni;
		this.animate	= fnAnimate;
		this.draw		= fnDraw;
		
		return this
	}
	
	function fnAppend(text){
		this.texts[this.count] = text;
		this.count++;
	}
	

	function fnIni(){
		if(this.count>0){
			var style = new String();
			style += "<style type=\"text/css\">\n"
			style += "div.ticker" + this.id + "{padding:0px; margin:0px; position:relative; overflow:hidden; width:" + this.clipWidth + "px; height:" + this.clipHeight + "px; background-color:" + this.bgColor + "; color:" + this.textColor + ";}\n"
			style += "div.tickerclip" + this.id + "{position:absolute;  overflow:hidden; padding-left:2px;  height:" + this.clipHeight + "px; top:0px; left:0px;width:" + this.clipWidth + "px;}\n";
			style += "div.tickertext" + this.id + "{position:absolute; vertical-align:middle; line-height:" + this.clipHeight + "px;}\n";
			style += "</style>\n";
			
			var href = new String();
				href += "<div class=\"tickerclip" + this.id + "\"><div class=\"tickertext" + this.id + "\" id=\"ticker" + this.id + "\">" + this.texts[0] + "</div></div>"; 
		
			var div = new String();
			div += "<div class=\"ticker" + this.id + "\">\n" + href + "\n</div>\n";
			document.write(style+div);
		}
	}
	
	function fnAnimate(){
		var oText	= document.getElementById("ticker" + this.id);
		var isEnd	= (oText.offsetLeft + oText.offsetWidth < 0);
		if(isEnd){
			oText.style.left = this.clipWidth;
			this.draw();
		}else{
			oText.style.left = oText.offsetLeft - 5 
		}
	}
	
	function fnDraw(){
		if(this.count>0){
			this.active ++
			if(this.active==this.count){
				this.active = 0
			};
			var oText		= document.getElementById("ticker" + this.id);
			oText.innerHTML	= this.texts[this.active]
		}
		return
	}
	
//stary
		function showMap(which){
			document.location.replace("default.asp?ds="+which)
		};
