function select_news(div){
	replace_news(div,"","_selected");
}

function deselect_news(div){
	replace_news(div,"_selected","");
}

function replace_news(div,from,to){
	for (i=0;i<div.childNodes.length;i++) {
		if(replace_news_class_name(div.childNodes[i],from,to)) {return;}
	}
}

function replace_news_class_name(childDiv,from,to){

	basic_replace(childDiv,"news_frame_top",from,to);
	basic_replace(childDiv,"news_frame_bottom",from,to);
	if(basic_replace(childDiv,"news_background",from,to)) { replace_news(childDiv,from,to); }
	if(childDiv.className == "news_contents") { replace_news(childDiv,from,to); }
	if(basic_replace(childDiv,"news_headline",from,to)) { return true; }

	return false;
}

function basic_replace(childDiv,className,from,to){
	if(childDiv.className == className+from) { 
		childDiv.className = className+to;
		return true;
	}
	return false;
}