/***********************************************
* Pausing updown message scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//configure the below five variables to change the style of the scroller
var scrollerdelay='4000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth='575px'
var scrollerheight='15px'
//var scrollerbgcolor='#093'  /*default green*/
var scrollerbgcolor='#FF0000' /*red*/
//var scrollerbgcolor='#F07800'  /*orange*/
//var scrollerbgcolor='#f2ab01'  /*yellow*///
//set below to '' if you don't wish to use a background image
var scrollerbackground=''
var messageIdx=0
//configure the below variable to change the contents of the scroller
var messages=new Array()
//messages[0]="<span class='messagebar_title'></span> <span class='messagebar_text'><a href='/whats_new/bb_specialmessage.aspx' style='color:#FFFFFF'>Click here</a> for an update on a service issue affecting some Insight customers</span>"


//**BEGIN DEFAULT MESSAGE**
//"<span class='messagebar_title'></span> <span class='messagebar_text'>Learn more about <a href='http://www.insight-com.com/products-broadband.asp' target='_blank' style='color:#FFFFFF'>Insight Broadband</a> and <a href='http://www.insight-com.com/broadbandplus.asp' target='_blank' style='color:#FFFFFF'>Insight Broadband Plus</a>.</span>"
//**END DEFAULT MESSAGE**
messages[0]="<span class='messagebar_title'></span> <span class='messagebar_text'><a href='http://www.insight-com.com/special-message.asp' target='_blank' style='color:#FFFFFF'>Click here </a>to read a special message for our NFL fans.</span>"
//messages[2]="<span class='messagebar_title'></span> <span class='messagebar_text'><a href='http://www.insightbb.com/privacy/default.aspx' target='_blank' style='color:#FFFFFF'>Click here</a> to view the updated Insight Broadband High-Speed Internet Service Privacy Policy.</span>"
//messages[3]=

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById


function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top='0px'
setTimeout("move1(tlayer)",scrollerdelay)
setTimeout("move2(document.main.document.second)",scrollerdelay)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5+'px'
setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)+'px'
tlayer.document.write(messages[messageIdx])
tlayer.document.close()
messageIdx = (messageIdx+1) % messages.length 
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top='0px'
setTimeout("move2(tlayer2)",scrollerdelay)
setTimeout("move1(document.main.document.first)",scrollerdelay)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5+'px'
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)+'px'
tlayer2.document.write(messages[messageIdx])
tlayer2.document.close()
messageIdx = (messageIdx+1) % messages.length 
}
}

function move3(whichlayer){
tlayer=eval(whichlayer)
if (parseInt(tlayer.style.top)>0&&parseInt(tlayer.style.top)<=5){
tlayer.style.top='0px'
setTimeout("move3(tlayer)",scrollerdelay)
setTimeout("move4(second2_obj)",scrollerdelay)
return
}
if (parseInt(tlayer.style.top)>=tlayer.offsetHeight*-1){
tlayer.style.top=parseInt(tlayer.style.top)-5+'px'
setTimeout("move3(tlayer)",50)
}
else{
tlayer.style.top=parseInt(scrollerheight)+'px'
tlayer.innerHTML=messages[messageIdx]
messageIdx = (messageIdx+1) % messages.length 
}
}

function move4(whichlayer){
tlayer2=eval(whichlayer)
if (parseInt(tlayer2.style.top)>0&&parseInt(tlayer2.style.top)<=5){
tlayer2.style.top='0px'
setTimeout("move4(tlayer2)",scrollerdelay)
setTimeout("move3(first2_obj)",scrollerdelay)
return
}
if (parseInt(tlayer2.style.top)>=tlayer2.offsetHeight*-1){
tlayer2.style.top=parseInt(tlayer2.style.top)-5+'px'
setTimeout("move4(second2_obj)",50)
}
else{
tlayer2.style.top=parseInt(scrollerheight)+'px'
tlayer2.innerHTML=messages[messageIdx]
messageIdx = (messageIdx+1) % messages.length 
}
}

function startscroll(){
	//Per TMS #1917 - Turn off scrolling - twb 8/22/2005
	//Per TMS #3784 - Turn on scrolling - AL 11/29/2006 
	if (1==1){
		//alert("startscroll");
		if (ie||dom){
		first2_obj=ie? first2 : document.getElementById("first2")
		second2_obj=ie? second2 : document.getElementById("second2")
		move3(first2_obj)
		second2_obj.style.top=scrollerheight
		second2_obj.style.visibility='visible'
		}
		else if (document.layers){
		document.main.visibility='show'
		move1(document.main.document.first)
		document.main.document.second.top=parseInt(scrollerheight)+5
		document.main.document.second.visibility='show'
		}
	}
}

window.onload=startscroll
//startscroll();




