function pausescroller(content, divId, content2, divId2, delay){
	this.content=content //message array content
	this.content2=content2 //message array content2
	this.tickerid=divId //ID of ticker div to display information
	this.tickerid2=divId2 //ID of ticker div to display information
	//fades layer in and out
	this.ie5  = (document.all && document.getElementById)
	this.ns6 = (!document.all && document.getElementById)
    ///alert('ie: ' + this.ie5+ ' ns6 '+this.ns6)
    this.is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1

	this.opac = 0
	this.opac2 = 100
	this.flgCycleUp = true
	
	this.delay=delay //Delay between msg change, in miliseconds.
	this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
	this.hiddendivpointer=1 //index of message array for hidden div
	this.hiddendivpointer2=1 //index of message array for hidden div
	document.getElementById(divId).innerHTML = '<div class="innerDiv" style="position: absolute;" id="'+divId+'1">'+content[1]+'</div><div class="innerDiv" style="position: absolute; visibility: hidden" id="'+divId+'2">'+content[0]+'</div>'
	document.getElementById(divId2).innerHTML = '<div class="innerDiv" style="position: absolute;" id="'+divId2+'1">'+content2[1]+'</div><div class="innerDiv" style="position: absolute; visibility: hidden" id="'+divId2+'2">'+content2[0]+'</div>'
	var scrollerinstance=this
	if (window.addEventListener) //run onload in DOM2 browsers
	window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
	else if (window.attachEvent) //run onload in IE5.5+
	window.attachEvent("onload", function(){scrollerinstance.initialize()})
	else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
	setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------
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))

	//**For Second Instance
	this.tickerdiv2=document.getElementById(this.tickerid2)
	this.visiblediv2=document.getElementById(this.tickerid2+"1")
	this.hiddendiv2=document.getElementById(this.tickerid2+"2")
	//***this.visibledivtop2=parseInt(pausescroller.getCSSpadding(this.tickerdiv2))
	
	
	//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
	//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"

	//**For Second Instance
	//this.visiblediv2.style.width=this.hiddendiv2.style.width=this.tickerdiv2.offsetWidth-(this.visibledivtop2*2)+"px"
	this.getinline(this.visiblediv2, this.hiddendiv2)
	this.hiddendiv2.style.visibility="visible"
	
	var scrollerinstance=this
	document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
	document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
	if (window.attachEvent) //Clean up loose references in IE
	window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
	
	setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------//
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------//

/*pausescroller.prototype.animateup=function(){
	var scrollerinstance=this
	var intSpeed = 7
	if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+intSpeed)){
		this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-intSpeed+"px"
		this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-intSpeed+"px"
	
		//**For Second Instance
		this.visiblediv2.style.top=parseInt(this.visiblediv2.style.top)-intSpeed+"px"
		this.hiddendiv2.style.top=parseInt(this.hiddendiv2.style.top)-intSpeed+"px"
	
		setTimeout(function(){scrollerinstance.animateup()}, 50)
	}
	else{
		this.getinline(this.hiddendiv, this.visiblediv)
		this.getinline(this.hiddendiv2, this.visiblediv2)
		
		this.swapdivs()
		setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
	}
}*/

pausescroller.prototype.animateup=function(){
	var scrollerinstance=this
	var intFadeSpeed = 4
    if(this.flgCycleUp == true){
        this.opac+=intFadeSpeed
		this.opac2-=intFadeSpeed
        if(this.ie5) 
		{
			this.visiblediv.style.filter = 'alpha(opacity='+this.opac+')';
			this.hiddendiv.style.filter = 'alpha(opacity='+this.opac2+')';

			this.visiblediv2.style.filter = 'alpha(opacity='+this.opac+')';
			this.hiddendiv2.style.filter = 'alpha(opacity='+this.opac2+')';
		}
        if(this.ns6)
		{
            if(this.is_firefox)
            {
                this.visiblediv.style.MozOpacity = this.opac/100
                this.hiddendiv.style.MozOpacity = this.opac2/100

                this.visiblediv2.style.MozOpacity = this.opac/100
                this.hiddendiv2.style.MozOpacity = this.opac2/100
            }
            else
            { 
                this.visiblediv.style.opacity = this.opac/100
                this.hiddendiv.style.opacity = this.opac2/100

                this.visiblediv2.style.opacity = this.opac/100
                this.hiddendiv2.style.opacity = this.opac2/100
            }			
		}
    }
	if(this.flgCycleUp == false){
        this.opac-=intFadeSpeed
		this.opac2+=intFadeSpeed
        if(this.ie5)
		{
			this.visiblediv.style.filter = 'alpha(opacity='+this.opac+')';
			this.hiddendiv.style.filter = 'alpha(opacity='+this.opac2+')';

			this.visiblediv2.style.filter = 'alpha(opacity='+this.opac+')';
			this.hiddendiv2.style.filter = 'alpha(opacity='+this.opac2+')';
		}
        if(this.ns6) 
		{
            if(this.is_firefox)
            {
                this.visiblediv.style.MozOpacity = this.opac/100
                this.hiddendiv.style.MozOpacity = this.opac2/100

                this.visiblediv2.style.MozOpacity = this.opac/100
                this.hiddendiv2.style.MozOpacity = this.opac2/100
            }
            else
            { 
                this.visiblediv.style.opacity = this.opac/100
                this.hiddendiv.style.opacity = this.opac2/100

                this.visiblediv2.style.opacity = this.opac/100
                this.hiddendiv2.style.opacity = this.opac2/100
            }            
		}
    }

	if(this.opac > 100 || this.opac < 0) 
	{
		if(this.opac > 100) this.flgCycleUp = false
		if(this.opac < 0) this.flgCycleUp = true
		//this.swapdivs()
		//alert(this.opac)
		setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
	}
	else
		setTimeout(function(){scrollerinstance.animateup()}, 100)
	
}


// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
	var tempcontainer=this.visiblediv
	this.visiblediv=this.hiddendiv
	this.hiddendiv=tempcontainer
	
	//**For Second Instance
	var tempcontainer2=this.visiblediv2
	this.visiblediv2=this.hiddendiv2
	this.hiddendiv2=tempcontainer2
}


// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
	var scrollerinstance=this
	if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
		setTimeout(function(){scrollerinstance.setmessage()}, 100)
	else{
		var i=this.hiddendivpointer
		var ceiling=this.content.length
		this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
		if(this.flgCycleUp == false)	this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
		if(this.flgCycleUp == true) 	this.visiblediv.innerHTML=this.content[this.hiddendivpointer]
		
		//**For Second Instance
		var j=this.hiddendivpointer2
		var ceiling2=this.content2.length
		this.hiddendivpointer2=(j+1>ceiling2-1)? 0 : j+1
		if(this.flgCycleUp == false)	this.hiddendiv2.innerHTML=this.content2[this.hiddendivpointer2]
		if(this.flgCycleUp == true)		this.visiblediv2.innerHTML=this.content2[this.hiddendivpointer2]

		this.animateup()
	}
}

//**Common functions to both instances

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
	if (tickerobj.currentStyle)
		return tickerobj.currentStyle["paddingTop"]
	else if (window.getComputedStyle) //if DOM2
		return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
	else
		return 0
}

pausescroller.prototype.getinline=function(div1, div2){
	//div1.style.top=this.visibledivtop+"px"
	//div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
	//div1.style.top=this.visibledivtop+"px"
	if(this.ie5) div1.style.filter = 'alpha(opacity=0)';
	if(this.ie5) div2.style.filter = 'alpha(opacity=100)';
	
    if(this.is_firefox)
    {
        if(this.ns6) div1.style.MozOpacity = 0
        if(this.ns6) div2.style.MozOpacity = 1    
    }
    else
    { 
        if(this.ns6) div1.style.opacity = 0
        if(this.ns6) div2.style.opacity = 1    
    }            

}
