/* LINE 49 SETS HOW FAST IT SCROLLS // set pause time on inc_newsbar.php */
function pausescroller(d,a,c,b){
	this.content=d;
	this.tickerid=a;
	this.delay=b;
	this.mouseoverBol=0;
	this.hiddendivpointer=1;
	document.write('<div id="'+a+'" class="'+c+'" style="text-align : center; position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; padding-top:15px; width: 100%" id="'+a+'1">'+d[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; padding-top:15px; visibility: hidden" id="'+a+'2">'+d[1]+"</div></div>");
	var e=this;
	
	if(window.addEventListener){
		window.addEventListener("load",function(){e.initialize()},false)
	}else{
		if(window.attachEvent){
			window.attachEvent("onload",function(){e.initialize()})
		}else{
			if(document.getElementById){
				setTimeout(function(){e.initialize()},500)
			}
		}
	}
}

pausescroller.prototype.initialize=function(){
	this.tickerdiv=document.getElementById(this.tickerid);
	this.visiblediv=document.getElementById(this.tickerid+"1");
	this.hiddendiv=document.getElementById(this.tickerid+"2");
	this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv));
	this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px";
	this.getinline(this.visiblediv,this.hiddendiv);
	this.hiddendiv.style.visibility="visible";
	var a=this;
	document.getElementById(this.tickerid).onmouseover=function(){a.mouseoverBol=1};
	document.getElementById(this.tickerid).onmouseout=function(){a.mouseoverBol=0};
	
	if(window.attachEvent){
		window.attachEvent("onunload",function(){a.tickerdiv.onmouseover=a.tickerdiv.onmouseout=null})
	}
	
	setTimeout(function(){a.animateup()},this.delay)
};

pausescroller.prototype.animateup=function(){
	var a=this;
	
	if(parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
		this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px";
		this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px";
		setTimeout(function(){a.animateup()},100)
	}else{
		this.getinline(this.hiddendiv,this.visiblediv);this.swapdivs();
		setTimeout(function(){a.setmessage()},this.delay)
	}
};

pausescroller.prototype.swapdivs=function(){
	var a=this.visiblediv;
	this.visiblediv=this.hiddendiv;
	this.hiddendiv=a
};

pausescroller.prototype.getinline=function(b,a){
	b.style.top=this.visibledivtop+"px";
	a.style.top=Math.max(b.parentNode.offsetHeight,b.offsetHeight)+"px"
};

pausescroller.prototype.setmessage=function(){
	var c=this;
	
	if(this.mouseoverBol==1){
		setTimeout(function(){c.setmessage()},100)
	}else{
		var a=this.hiddendivpointer;
		var b=this.content.length;
		this.hiddendivpointer=(a+1>b-1)?0:a+1;
		this.hiddendiv.innerHTML=this.content[this.hiddendivpointer];
		this.animateup()
	}
};

pausescroller.getCSSpadding=function(a){
	if(a.currentStyle){
		return a.currentStyle.paddingTop
	}else{
		if(window.getComputedStyle){
			return window.getComputedStyle(a,"").getPropertyValue("padding-top")
		}else{
			return 0
		}
	}
};