var bw = new checkBrowser();		
var TICKER_STEP = 1;
var TICKER_INTERVAL = 30;
    
function checkBrowser()
{
    this.ver=navigator.appVersion;
    this.dom=document.getElementById?1:0;
	    
    this.ie6=(this.ver.indexOf("MSIE 6") > -1 && this.dom)?1:0;
    this.ie5=(this.ver.indexOf("MSIE 5") > -1 && this.dom)?1:0;
    this.ie4=(document.all && !this.dom)?1:0;
    this.ie45=this.ie4||this.ie5?1:0;
				
    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns5=(!this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.ns45=this.ns4||this.ns5?1:0;
	
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ns6);

    return this;
}


function tick(pos){
    if(bw.ns45){
	if(pos < (-1) * parseInt(document.ticker.document.slider.clip.width)){
	    pos = parseInt(document.ticker.clip.width);
	}
	else{
    	    pos -= TICKER_STEP;
	}
	document.ticker.document.slider.left = pos;
    }
    
    if(bw.ie45){
	if(pos < (-1) * parseInt(slider.offsetWidth))
	{
	    pos = parseInt(ticker.offsetWidth);
	}
	else{
	    pos -= TICKER_STEP;
	}
	slider.style.left = pos;
    }
    
    if(bw.ie6 || bw.ns6){
	if(pos < (-1) * parseInt(document.getElementById('slider').offsetWidth))
	{
    	    pos = parseInt(document.getElementById('ticker').offsetWidth);
	}
	else{
	    pos -= TICKER_STEP;
	}
	document.getElementById('slider').style.left = pos;
    }
	setTimeout('tick(' + pos + ')', TICKER_INTERVAL);
}    
    
function init(){
    tick(0);
}

function pasek(text){
    self.status = text;
}
