function startNewsRotate(position)
{
	var newsArray = new Array('<strong>October 10</strong>: <a href="http://ct375.com/events.php?month=October" target="_blank">Meet Prudence\'s Neighbors</a>','<strong>September 25</strong>: <a href="http://ct375.com/events.php?month=September" target="_blank">CT 375th Anniversary Tours & Activities </a>','<strong>September 18</strong>: <a href="http://ct375.com/events.php?month=September" target="_blank">Visions of Iron</a>','<strong>September 11</strong>: <a href="http://ct375.com/events.php?month=September" target="_blank"> Faulkner\'s Island Lighthouse Exhibit</a>','<strong>July 4</strong>: <a href="http://ct375.com/events.php?month=July" target="_blank">Celebrate Independence Day at Sloane-Stanley Museum</a>','<strong>July 2</strong>: <a href="http://ct375.com/events.php?month=July" target="_blank">Happy Birthday Connecticut on the Brad Davis Show</a>','<strong>May 14 - August 15</strong>: <a href="http://www.ct.gov/governorrell/cwp/view.asp?A=3872&Q=457380" target="_blank">Public Viewing of Charter Oak Painting</a>'); 
	var curr_element = 0;
	var nxt_element;
    try{ 
    	$("#news_area_1").fadeOut('slow', function(){
        		$("#news_area_1").html(newsArray[position]);
                $("#news_area_1").fadeIn('slow');
        	});
    }
    catch(e){}
    position = ++position > (newsArray.length-1) ? 0 : position;
    var r = setTimeout("startNewsRotate(" + position + ")",8000);
}

var status = 0;

function cancel_scroll()
{
	status = 0;
}

function animate_controller(side)
{
	if(status && side == 'left')
    	animate_left();
    if(status && side == 'right')
    	animate_right();
}

function animate_left()
{
		/*if(parseInt($("#scroller").css("marginLeft")) < -1000)
        	$("#scroller").css({"marginLeft" : "1000px"});*/ //marquee style needs work
        if(parseInt($("#scroller").css("marginLeft")) > -200)
        {
			status = 1;
			$("#scroller").animate({ 
        		marginLeft: "-=1.5px"
			},10, function(){animate_controller('left')});
         }
         
        //$("#pos_status").html("Left Margin: " + $("#scroller").css("marginLeft")); 
}

function animate_right()
{
		/*if(parseInt($("#scroller").css("marginLeft")) > 1000)
        	$("#scroller").css({"marginLeft" : "-1700px"});*/ // this marquees needs work
		if(parseInt($("#scroller").css("marginLeft")) < 0)
        {
        	status = 1;
			$("#scroller").animate({ 
        	marginLeft: "+=1.5px"
			},10, function(){animate_controller('right')});
         }
        //$("#pos_status").html("Left Margin: " + $("#scroller").css("marginLeft")); 
}