function pausescroller(ScrollerID,content,delay,direction,step,speed){
	this.direction = direction;
	this.saveStep = this.step = step ? step:1;
	this.speed = speed?speed:10;
	if(content.length==1){
		content[1] = content[0];
	}
	this.content = content;
	this.tickerid = ScrollerID;
	this.delay = delay;
	this.hiddendivpointer = 1;
	document.write('<div id="'+ScrollerID+'" style="width:100%;height:100%;position:relative;overflow:hidden"><div style="position:absolute" id="'+ScrollerID+'1">'+content[0]+'</div><div style="position:absolute;visibility:hidden" id="'+ScrollerID+'2">'+content[1]+'</div></div>')
	var scrollerinstance = this;
	if(window.addEventListener){
		window.addEventListener("load",function(){scrollerinstance.initialize()},false);
	}else if(window.attachEvent){
		window.attachEvent("onload",function(){scrollerinstance.initialize()});
	}else if(document.getElementById){
		setTimeout(function(){scrollerinstance.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");
	if(this.direction){
		this.visiblediv.style.height = this.hiddendiv.style.height = this.tickerdiv.offsetHeight+"px";
	}else{
		this.visiblediv.style.width = this.hiddendiv.style.width = this.tickerdiv.offsetWidth+"px";
	}
	this.getinline(this.visiblediv,this.hiddendiv);
	this.hiddendiv.style.visibility = "visible";
	var scrollerinstance = this;
	this.tickerdiv.onmouseover=function(){scrollerinstance.step=0;};
	this.tickerdiv.onmouseout=function(){scrollerinstance.step=scrollerinstance.saveStep;};
	if(window.attachEvent){
		window.attachEvent("onunload",function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null});
	}
	setTimeout(function(){scrollerinstance.animateup()},this.delay);
}
pausescroller.prototype.animateup=function(){
	var scrollerinstance = this
	if(this.direction && parseInt(this.hiddendiv.style.left)>this.step){
		this.visiblediv.style.left = parseInt(this.visiblediv.style.left)-this.step+"px";
		this.hiddendiv.style.left = parseInt(this.hiddendiv.style.left)-this.step+"px";
		setTimeout(function(){scrollerinstance.animateup()},this.speed);
	}else if(!this.direction && parseInt(this.hiddendiv.style.top)>this.step){
		this.visiblediv.style.top = parseInt(this.visiblediv.style.top)-this.step+"px";
		this.hiddendiv.style.top = parseInt(this.hiddendiv.style.top)-this.step+"px";
		setTimeout(function(){scrollerinstance.animateup()},this.speed);
	}else{
		this.getinline(this.hiddendiv,this.visiblediv);
		this.swapdivs();
		setTimeout(function(){scrollerinstance.setmessage()},this.delay);
	}
}
pausescroller.prototype.swapdivs=function(){
	var tempcontainer = this.visiblediv;
	this.visiblediv = this.hiddendiv;
	this.hiddendiv = tempcontainer;
}
pausescroller.prototype.getinline=function(div1,div2){
	if(this.direction){
		div1.style.left = "0px";
		div2.style.left = Math.max(div1.parentNode.offsetWidth,div1.offsetWidth)+"px";
	}else{
		div1.style.top = "0px";
		div2.style.top = Math.max(div1.parentNode.offsetHeight,div1.offsetHeight)+"px";
	}
}
pausescroller.prototype.setmessage=function(){
	var scrollerinstance = this;
	var i = this.hiddendivpointer;
	var ceiling = this.content.length;
	this.hiddendivpointer = (i+1>ceiling-1)? 0 : i+1;
	this.hiddendiv.innerHTML = this.content[this.hiddendivpointer];
	this.animateup();
}
