function flashtext(content, divId, divClass, delay, fadeornot){
	this.content=content
	this.tickerid=divId //id of master ticker div. Message is contained inside first child of flashtext div
	this.delay=delay //delay between msg change, in miliseconds.
	this.mouseoverBol=0 //boolean to indicate whether mouse is currently over ticker (and pause it if it is)
	this.pointer=1
	this.opacitystring=(typeof fadeornot!="undefined")? "width: 100%; filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); -moz-opacity: 1" : ""
	if (this.opacitystring!="") this.delay+=500 //add 1/2 sec to account for fade effect, if enabled
	this.opacitysetting=0.2 //Opacity value when reset
	document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">'+content[0]+' </div></div>')
	var instanceOfFlashText=this
	setTimeout(function(){instanceOfFlashText.initialize()}, delay)
	}

	flashtext.prototype.initialize=function(){
	var instanceOfFlashText=this
	this.contentdiv=document.getElementById(this.tickerid).firstChild //div of inner content that holds the messages
	document.getElementById(this.tickerid).onmouseover=function(){instanceOfFlashText.mouseoverBol=1}
	document.getElementById(this.tickerid).onmouseout=function(){instanceOfFlashText.mouseoverBol=0}
	this.rotatemsg()
	}

	flashtext.prototype.rotatemsg=function(){
	var instanceOfFlashText=this
	if (this.mouseoverBol==1) //pause on mouseover
	setTimeout(function(){instanceOfFlashText.rotatemsg()}, 100)
	else{
	this.fadetransition("reset") //reset opacity on fade effect
	this.contentdiv.innerHTML=this.content[this.pointer]
	this.fadetimer1=setInterval(function(){instanceOfFlashText.fadetransition('up', 'fadetimer1')}, 100) //fade effect
	this.pointer=(this.pointer<this.content.length-1)? this.pointer+1 : 0
	setTimeout(function(){instanceOfFlashText.rotatemsg()}, this.delay) //update container
	}
	}
	flashtext.prototype.fadetransition=function(fadetype, timerid){
	var contentdiv=this.contentdiv
	if (fadetype=="reset")
		this.opacitysetting=0.2
	if (contentdiv.filters && contentdiv.filters[0]){
		if (typeof contentdiv.filters[0].opacity=="number") //IE6+
			contentdiv.filters[0].opacity=this.opacitysetting*100
		else //IE 5.5
			contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"
	}
	else if (typeof contentdiv.style.MozOpacity!="undefined" && this.opacitystring!=""){
		contentdiv.style.MozOpacity=this.opacitysetting
		}
	else
		this.opacitysetting=1
	if (fadetype=="up")
		this.opacitysetting+=0.2
	if (fadetype=="up" && this.opacitysetting>=1)
		clearInterval(this[timerid])
	}
