// 初期処理
function init(){
	document.frm_search.tpl_s_title.focus();
}
// 詳細検索の実行処理
function execDtlSearch(type){
	// 連打対策
	currenttime = new Date();
	if (document.prevtime != undefined && currenttime - document.prevtime < 500){
		document.prevtime = currenttime;
		return;
	};
	document.prevtime = currenttime;

	switch (type) {
	case "BIBLIST":
		action_str = "./BIBibList.php";
		break;
	case "CLEAR":
		document.frm_search.tpl_action.value = "CLEAR";
		action_str = "./BIDtlSearch.php";
		break;
	default:
		return;
	}
	document.frm_search.action = action_str;
	document.frm_search.target = "_top";
	document.frm_search.method = "post";
	document.frm_search.submit();
}
// NDC分類選択時の処理(詳細検索用)
function submitNdc(code, next, level){
	// 連打対策
	currenttime = new Date();
	if (document.prevtime != undefined && currenttime - document.prevtime < 500){
		document.prevtime = currenttime;
		return;
	};
	document.prevtime = currenttime;

	// NDC分類をセット
	document.frm_search.tpl_s_ndc.value = code;

	// 次階層なし、桁数が2より大きい、桁数が設定値以上は、何もせず
	if( next == 0 || code.length > 2 || code.length >= level ){
    // 以外は、詳細検索へ
	}else{
		document.frm_search.action = "./BIDtlSearch.php";
		document.frm_search.target = "_top";
		document.frm_search.method = "post";
		document.frm_search.submit();
	}
}

