function openNewsLayer(timeid, counter, bool) {
	if(bool == null) {
		bool = true;
	}
	if(timeid == null) {
		timeid = 0;
		if(counter == null) {
			counter = 1;
		}
	} else {
		if(counter == null) {
			counter = 1;
		}
	}
	$('main').setAttribute('openlayer', 'medialayer');
	closeMenu();
	lineNewsLayer(timeid, counter);
	$('main-topmenu').setAttribute('lock', 1);
	$('medialayer').setAttribute('x', 5);
	$('medialayer').setAttribute('lock', 1);
	if(bool) {
		$('medialayer').morph('margin-left: 5px;', {delay: 0.8, duration : 1.0});
	}
}

function lineNewsLayer(timeid, counter) {
	new Ajax.Request(
		'/news/news.php?timeid='+timeid+'&counter='+counter, {
			method: "get",
			parameters: "cache=" + (new Date()).getTime(),
			onSuccess : function(httpObj) {
				setMediaLayer(httpObj.responseText);
			},
			onFailure : function(httpObj) {
				setMediaLayer('');
				Modalbox.show('<p class="center">Sorry, cannot load news informations.</p>', { title: "Caution!!" });
			}
		}
	);
}
