var scroll_messages=new Array()
scroll_messages[scroll_messages.length]='<span class="scroller_header">March 11, 2010</span><br>Finance posts updated lists of properties which may be included in the 2010 Annual Property Lien Sale.<br><a href="../../html/property/property_bill_taxlien.shtml">Read More</a><br><a target="blank" href="../../html/pdf/10pdf/2010_taxlien.pdf">Download Press Release</a>';
scroll_messages[scroll_messages.length]='<span class="scroller_header">March 4, 2010</span><br>Finance Commissioner David M. Frankel testifies before the New York City Council Finance Committee on the Mayor\'s Preliminary Budget for FY2011.<br><a target="blank" href="../../html/pdf/10pdf/fy11_prelim_budget_testimony030410.pdf">Download Testimony</a>';
scroll_messages[scroll_messages.length]='<span class="scroller_header">March 2, 2010</span><br>Mayor Bloomberg and Information Technology and Telecommunications Commissioner Post start overhaul of data infrastructure at more than 40 city agencies.<br><a target="blank" href="../../html/pdf/10pdf/doitt_tech_review.pdf">Download Press Release</a>';
scroll_messages[scroll_messages.length]='<span class="scroller_header">February 26, 2010</span><br>Finance posts the 2010 Annual Report on Tax Expenditures.<br><a target="blank" href="../../html/pdf/10pdf/ter_2010_final.pdf">Download Report</a>';
scroll_messages[scroll_messages.length]='<span class="scroller_header">January 26, 2010</span><br>Owners of income-producing properties may be required to file annual Real Property Income and Expense (RPIE) statements.<br><a href="../../html/property/property_info_rpie.shtml">Read More</a>';
scroll_messages[scroll_messages.length]='<span class="scroller_header">January 15, 2010</span><br>The Tentative Assessment Roll for Fiscal Year 2011 is available. For a free download of the entire roll, a statistical summary and a link to view assessments of individual properties, <a href="../../html/property/property_val_valuation.shtml">Click here.</a>';

var scrollerdelay='7000' //delay between msg scrolls. 3000=3 seconds.
var scrollspeed=50;
var scrollerwidth='354px'
var scrollerheight='105px'

///////Do not edit pass this line///////////////////////
// some new variables
var scroll_running = 0;
var scroll_stopped = 0;
var scroll_stopCompleted = 0;
var scroll_scrollnext = 1;
var scroll_topLayer;
var scroll_bottomLayer;
var scroll_i=2;
if(scroll_messages.length<3){
	scroll_i=0;
}

function scroll_move1(whichdiv){
	scroll_tdiv=eval(whichdiv)
	if (parseInt(scroll_tdiv.style.top)>0&&parseInt(scroll_tdiv.style.top)<=5){
		scroll_tdiv.style.top=0+"px"
		if (scroll_stopped == 1) {scroll_switchButton(1); return;}
		setTimeout("scroll_move1(scroll_tdiv)",scrollerdelay)
		setTimeout("scroll_move2(scroll_second_obj)",scrollerdelay)
		return
	}
	if (parseInt(scroll_tdiv.style.top)>=scroll_tdiv.offsetHeight*-1){
		if (scroll_stopped == 1 && parseInt(scroll_tdiv.style.top) == 0) {scroll_switchButton(1); return;}
		if (scroll_stopped == 1 && parseInt(scroll_tdiv.style.top) == parseInt(scrollerheight)) {scroll_switchButton(1); return;}
		scroll_tdiv.style.top=parseInt(scroll_tdiv.style.top)-5+"px"
		setTimeout("scroll_move1(scroll_tdiv)",scrollspeed)
	}
	else{
		scroll_tdiv.style.top=parseInt(scrollerheight)
		scroll_tdiv.innerHTML=scroll_messages[scroll_i]
		scroll_itemStatus();
		if (scroll_i==scroll_messages.length-1)
			scroll_i=0
		else
			scroll_i++
	}
}

function scroll_move2(whichdiv){
	scroll_tdiv2=eval(whichdiv)
	if (parseInt(scroll_tdiv2.style.top)>0&&parseInt(scroll_tdiv2.style.top)<=5){
		scroll_tdiv2.style.top=0+"px"
		if (scroll_stopped == 1) {scroll_switchButton(1); return;}
		setTimeout("scroll_move2(scroll_tdiv2)",scrollerdelay)
		setTimeout("scroll_move1(scroll_first_obj)",scrollerdelay)
		return
	}
	if (parseInt(scroll_tdiv2.style.top)>=scroll_tdiv2.offsetHeight*-1){
		if (scroll_stopped == 1 && parseInt(scroll_tdiv2.style.top) == 0) {scroll_switchButton(1); return;}
		if (scroll_stopped == 1 && parseInt(scroll_tdiv2.style.top) == parseInt(scrollerheight)) {scroll_switchButton(1); return;}
		scroll_tdiv2.style.top=parseInt(scroll_tdiv2.style.top)-5+"px"
		setTimeout("scroll_move2(scroll_second_obj)",scrollspeed)
	}
	else{
		scroll_tdiv2.style.top=parseInt(scrollerheight)
		scroll_tdiv2.innerHTML=scroll_messages[scroll_i]
		scroll_itemStatus();
		if (scroll_i==scroll_messages.length-1)
			scroll_i=0
		else
			scroll_i++
	}
}

function startscroll(){
	// make sure function doesn't fun twice
	if (scroll_running != 0)
		return

	scroll_running++
	scroll_first_obj=document.getElementById("scroll_first")
	scroll_second_obj=document.getElementById("scroll_second")
	scroll_move1(scroll_first_obj)
	scroll_second_obj.style.top=scrollerheight
	scroll_second_obj.style.visibility='visible'
	scroll_switchButton(0);
	document.getElementById("scroll_itemStatus").innerHTML = '1 of ' + scroll_messages.length;
}

function scroll_itemStatus() {
	document.getElementById("scroll_itemStatus").innerHTML = (scroll_i==0?scroll_messages.length:scroll_i) + ' of ' + scroll_messages.length ;
}

function stopScroll() {
	scroll_stopped = 1;
	scroll_switchButton(2);
}

function restartScroll() {
	if (scroll_stopped == 0 ) {return;}
		scroll_stopped = 0;
	if (scroll_scrollnext == 0) {
		if (scroll_i==scroll_messages.length-1) {
			scroll_i=1;
		} else if (scroll_i==scroll_messages.length-2) {
			scroll_i=0;
		} else {
			scroll_i=scroll_i+2
		}
	}
	
	setTimeout("scroll_move1(scroll_first_obj)",scrollerdelay);
	setTimeout("scroll_move2(scroll_second_obj)",scrollerdelay);
	
	scroll_switchButton(0);
	scroll_scrollnext = 1;
	scroll_stopCompleted = 0;
}

function scroll_switchButton(what) {
	if (what==0) {
		document.getElementById("scroll_startstop").innerHTML = '<a href="javascript:stopScroll();" class="scroller_button">Stop</a>';
		document.getElementById("scroll_nextbutton").innerHTML = '<a href="javascript:nextScroll();"><img src="../../includes/site_images/module/next.gif" name="next" border="0" align="absmiddle" width="4" height="7" alt="Next" onMouseOver="scrollIconSwap(\'next\',this,0);" onMouseOut="scrollIconSwap(\'next\',this,1);"></a>';
		document.getElementById("scroll_backbutton").innerHTML = '<a href="javascript:backScroll();"><img src="../../includes/site_images/module/back.gif" name="back" border="0" align="absmiddle" width="4" height="7" alt="Back" onMouseOver="scrollIconSwap(\'back\',this,0);" onMouseOut="scrollIconSwap(\'back\',this,1);"></a>';
	} else if (what==1) {
		first2_top=parseInt(document.getElementById("scroll_first").style.top)
		second2_top=parseInt(document.getElementById("scroll_second").style.top)
		if ((first2_top != 0 && first2_top != parseInt(scrollerheight)) || (second2_top != 0 && second2_top != parseInt(scrollerheight))) {
			setTimeout("scroll_switchButton(1)",50)
			return;
		}
		document.getElementById("scroll_startstop").innerHTML = '<a href="javascript:restartScroll();" class="scroller_button">Play</a>';
		document.getElementById("scroll_nextbutton").innerHTML = '<a href="javascript:nextScroll();"><img src="../../includes/site_images/module/next.gif" name="next" border="0" align="absmiddle" width="4" height="7" alt="Next" onMouseOver="scrollIconSwap(\'next\',this,0);" onMouseOut="scrollIconSwap(\'next\',this,1);"></a>';
		document.getElementById("scroll_backbutton").innerHTML = '<a href="javascript:backScroll();"><img src="../../includes/site_images/module/back.gif" name="back" border="0" align="absmiddle" width="4" height="7" alt="Back" onMouseOver="scrollIconSwap(\'back\',this,0);" onMouseOut="scrollIconSwap(\'back\',this,1);"></a>';
		scroll_stopCompleted = 1;
	} else if (what==2) {
		document.getElementById("scroll_startstop").innerHTML = '<span class="scroller_button">Wait</span>';
		document.getElementById("scroll_nextbutton").innerHTML = '<img src="../../includes/site_images/module/next.gif" name="next" border="0" align="absmiddle" width="4" height="7" alt="Next">';
		document.getElementById("scroll_backbutton").innerHTML = '<img src="../../includes/site_images/module/back.gif" name="back" border="0" align="absmiddle" width="4" height="7" alt="Back">';
	}
}

function scrollIconSwap(iconImg, what, which) {
	var imgPath = "../../includes/site_images/module/";
	if (which == 0) {
		what.src = imgPath + iconImg + "_over.gif";
	} else {
		what.src = imgPath + iconImg + ".gif";
	}
}

function nextScroll() {
	if (scroll_stopped == 0) {	stopScroll(); }
	if (scroll_stopCompleted == 0) {
		setTimeout("nextScroll()",scrollspeed)
		return;
	}
	if (parseInt(document.getElementById("scroll_first").style.top)==0) {
		scroll_topLayer = document.getElementById("scroll_first");
		scroll_bottomLayer = document.getElementById("scroll_second");
	} else {
		scroll_bottomLayer = document.getElementById("scroll_first");
		scroll_topLayer = document.getElementById("scroll_second");
	}
	if (scroll_scrollnext == 0) {
		if (scroll_i==scroll_messages.length-1) {
			scroll_i=1;
		} else if (scroll_i==scroll_messages.length-2) {
			scroll_i=0;
		} else {
			scroll_i=scroll_i+2
		}
	}
	eval(scroll_topLayer).innerHTML = (scroll_i==0?scroll_messages[scroll_messages.length-1]:scroll_messages[scroll_i-1]);
	eval(scroll_bottomLayer).innerHTML = scroll_messages[scroll_i];
	scroll_itemStatus();
	scroll_scrollnext = 1;
	if (scroll_i==scroll_messages.length-1) {
		scroll_i=0;
	} else {
		scroll_i++;
	}
}

function backScroll() {
	if (scroll_stopped == 0) {	stopScroll(); }
	if (scroll_stopCompleted == 0) {
		setTimeout("backScroll()",scrollspeed)
		return;
	}
	if (parseInt(document.getElementById("scroll_first").style.top)==0) {
		scroll_topLayer = document.getElementById("scroll_first");
		scroll_bottomLayer = document.getElementById("scroll_second");
	} else {
		scroll_bottomLayer = document.getElementById("scroll_first");
		scroll_topLayer = document.getElementById("scroll_second");
	}
	if (scroll_scrollnext == 1) {
		if (scroll_i==0) {
			scroll_i=scroll_messages.length-2;
		} else if (scroll_i==1) {
			scroll_i=scroll_messages.length-1;
		} else {
			scroll_i=scroll_i-2
		}
	}
	eval(scroll_topLayer).innerHTML = (scroll_i==0?scroll_messages[scroll_messages.length-1]:scroll_messages[scroll_i-1]);
	eval(scroll_bottomLayer).innerHTML = scroll_messages[scroll_i];
	scroll_itemStatus();
	scroll_scrollnext = 0;
	if (scroll_i==0) {
		scroll_i=scroll_messages.length-1;
	} else {
		scroll_i--;
	}
}

document.writeln('<div id="main" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="scroll_first" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(scroll_messages[0])
document.writeln('</div>')
document.writeln('<div id="scroll_second" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
if(scroll_messages.length==1){
	document.write(scroll_messages[0])
}else{
	document.write(scroll_messages[1])
}
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')

window.onload=startscroll;