function startNewsRotate(position)
{
	var newsArray = new Array('<strong>December 3, 4, and 5</strong>: <a href="http://www.ct.gov/governorrell/cwp/view.asp?a=1724&Q=276308" target="_blank">Govenors Residence Open House</a>','<strong>November 3 & 4</strong>: <a href="http://ct375.com/events.php?month=November" target="_blank">CT 375! Something to Sing About</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")); 
}
