// Your messages. Add as many as you like
var message=new Array()
message[0]="VISA & MC PROCESSING STARTING AT 1.79% WITH NO SETUP FEE"
message[1]="Insurance Connection Online to State Farm Insurance Company™!"
//message[2]="More to go"
// the URLs of your messages
var messageurl=new Array()
messageurl[0]="http://www.winrent.com/flyers.asp?f=0"
messageurl[1]="http://www.winrent.com/flyers.asp?f=1"
//messageurl[2]="http://moretogo"
var messagetarget=new Array()
messagetarget[0]=""
messagetarget[1]=""
//Opening in new window
//messagetarget[0]="_blank"
//messagetarget[1]="_blank"
// font-color
var messagecolor= new Array()
messagecolor[0]="red"
messagecolor[1]="blue"
//messagecolor[2]="Yellow"
// distance of the scroller to the left margin of the browser-window (pixels)
var scrollerleft=510
// distance of the scroller to the top margin of the browser-window (pixels)
var scrollertop=300
// width of the scroller (pixels)
var scrollerwidth=200
// height of the scroller (pixels)
var scrollerheight=40
// speed 1: lower means faster
var pause=20
// speed 2: higher means faster
var step=2
// font-size
var fntsize=20
// font-family
var fntfamily="Arial"
// font-weight: 1 means bold, 0 means normal
var fntweight=1
// do not edit the variables below
var fadeimgwidth=60
var fadeimgleftcontent,fadeimgrightcontent
var clipleft,clipright,cliptop,clipbottom
var clipleft1,clipright1,cliptop1,clipbottom1
var i_message=0
var timer
var textwidth
var textcontent=new Array()
textcontent[0]=""
textcontent[1]=""

if (fntweight==1) {
	fntweight="700"
}else {
	fntweight="100"
}

function init() {
	gettextcontent(0)
	gettextcontent(1)
	if (document.all) {
		text.innerHTML=textcontent[0]
		text1.innerHTML=textcontent[1]
		textwidth=text.offsetWidth
		document.all.text.style.posTop=scrollertop-20
		document.all.text.style.posLeft= scrollerleft+scrollerwidth
		document.all.text1.style.posTop=scrollertop+20
		document.all.text1.style.posLeft= scrollerleft+scrollerwidth
		clipleft=0
		clipright=0
		cliptop=0
		clipbottom=scrollerheight
		clipleft1=0
		clipright1=0
		cliptop1=0
		clipbottom1=scrollerheight
		
		document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
		document.all.text1.style.clip="rect("+cliptop1+" "+clipright1+" "+clipbottom1+" "+clipleft1+")"
		scrolltext(0)
		scrolltext(1)
	}
}

function scrolltext(i) {
	if (document.all) {
	if (i==1){
		if (document.all.text1.style.posLeft>=scrollerleft-textwidth) 
		{
			document.all.text1.style.posLeft-=step
			clipright1+=step
			if (clipright1>scrollerwidth)
			{
				clipleft1+=step
			}
			document.all.text1.style.clip="rect("+cliptop1+" "+clipright1+" "+clipbottom1+" "+clipleft1+")"
			var timer=setTimeout("scrolltext(1)",pause)
		}
		else {
			changetext(1)
		}
	}
	else
	{
		if (document.all.text.style.posLeft>=scrollerleft-textwidth) 
		{
			document.all.text.style.posLeft-=step
			clipright+=step
			if (clipright>scrollerwidth)
			{
				clipleft+=step
			}
			document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			var timer=setTimeout("scrolltext(0)",pause)
		}
		else {
			changetext(0)
		}
	}
	}
}

function changetext(i) {
	gettextcontent(i)
	if (document.all) {
		if (i==1) {
			text1.innerHTML=textcontent[1]
			textwidth=text.offsetWidth
			document.all.text1.style.posLeft= scrollerleft+scrollerwidth
			clipleft1=0
			clipright1=0
			document.all.text.style.clip="rect("+cliptop1+" "+clipright1+" "+clipbottom1+" "+clipleft1+")"
			scrolltext(1)
		}
		else
		{
			text.innerHTML=textcontent[0]
			textwidth=text.offsetWidth
			document.all.text.style.posLeft= scrollerleft+scrollerwidth
			clipleft=0
			clipright=0
			document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			scrolltext(0)
		}
	}
}

function gettextcontent(i) {
	textcontent[i]="<span style='position: relative; font-size: "+fntsize+"pt; font-family: "+fntfamily+"; font-weight: "+fntweight+"'>"
	textcontent[i]+="<a href="+messageurl[i]+" target="+messagetarget[i]+">"
	textcontent[i]+="<nobr><font color="+messagecolor[i]+" >"+message[i]+"</font></nobr> </a></span>"
}
