var news_width_clip = 0;
var news_height_clip_news = 0;
var news_pos_y = 0;

var news_content_height;
var news_timer_scroll;

function news_scrolling_setup(news_width_clip_load, news_height_clip_news_load){
	news_width_clip = news_width_clip_load;
	news_height_clip_news = news_height_clip_news_load;
	news_scrolling_start();
}
function news_scrolling_start(){
	if(document.getElementById('news_container').offsetHeight > news_height_clip_news){
		clearInterval(news_timer_scroll);
		news_timer_scroll = setInterval('news_scrolling_up()', 50);
		news_content_height = document.getElementById('news_container').offsetHeight;
	}
}

function news_scrolling_up(){
	news_pos_y = news_pos_y - 1;
	document.getElementById('news_container').style.top = news_pos_y ;
	if ( (news_pos_y + (news_content_height + 10) ) == 0 ){
		clearInterval(news_timer_scroll);
		news_scrolling_reset();
	}
}

function news_scrolling_pause(){
	clearInterval(news_timer_scroll);
}

function news_scrolling_reset(){
	news_pos_y = 0;
	document.getElementById('news_container').style.top = "0";
	clearInterval(news_timer_scroll);
	setTimeout("news_scrolling_start()", 2000);
}