<!--

/* 画面遷移用 */

function gotoURL(pg_name) {
	document.myform.action = pg_name + '.php';
	document.myform.submit();
}

function gotoWriter(id) {
	document.myform.action = 'writer.php';
	document.myform.writer_id.value = id;
	document.myform.submit();
}

function gotoBook(id) {
	document.myform.action = 'book.php';
	document.myform.book_id.value = id;
	document.myform.submit();
}

function movePage(page) {
	document.myform.page.value = page;
	document.myform.submit();
}

function moveAboutPage(page) {
	document.myform.about_page.value = page;
	document.myform.submit();
}

function gotoSearch(id) {
	document.myform.action = 'result.php';
	document.myform.genre_id.value = id;
	document.myform.submit();
}

/* メニュー制御用 */

function ajaxRequest(url, pars, setResponse){

	new Ajax.Request(url, {
		method: 'get',
		parameters: pars,
		onComplete: setResponse
	});

}

function setMenu(objReq){

	$('content_menu_box').innerHTML = objReq.responseText;

}

function selectMenu(id) {
	var api_url = 'api/make_menu.php';
	var pars = 'code=' + id;
	ajaxRequest(api_url, pars, setMenu);
}

function nonselectMenu(id) {
	var api_url = 'api/make_menu.php';
	var pars = 'code=';
	ajaxRequest(api_url, pars, setMenu);
}

//-->
