function detailCheckChange() {
	var f = document.Form;
	f['Form:doDetailChange'].click();
}

function sortByJrcCode() {
	var f = document.Form;
	f['Form:doSortByJrcCode'].click();
}

function sortByJasracCode() {
	var f = document.Form;
	f['Form:doSortByJasracCode'].click();
}

function sortByOpusName() {
	var f = document.Form;
	f['Form:doSortByOpusName'].click();
}

function sortByArtist() {
	var f = document.Form;
	f['Form:doSortByArtist'].click();
}

function sortByFirstInfo() {
	var f = document.Form;
	f['Form:doSortByFirstInfo'].click();
}

function sortByMngInfo() {
	var f = document.Form;
	f['Form:doSortByMngInfo'].click();
}

function downloadArtist() {
	var f = document.Form;
	f['Form:doDownloadArtist'].click();
}

function downloadWriter() {
	var f = document.Form;
	f['Form:doDownloadWriter'].click();
}

function inputValueCheck() {
	var val = document.getElementById("find_searchString").value;
	if (val==" ") return false;
	if (val=="　") return false;
	if (val=="・") return false;
	if (val=="･") return false;
	return true;
}

function setInputBoxColor() {
	if ($F("find_jrcCode")) {
		$("find_jrcCode").style.backgroundColor = "#f8f4da";
	} else {
		$("find_jrcCode").style.backgroundColor = "";
	}
	if ($F("find_jasracCode")) {
		$("find_jasracCode").style.backgroundColor = "#f8f4da";
	} else {
		$("find_jasracCode").style.backgroundColor = "";
	}
	if ($F("find_opusName")) {
		$("find_opusName").style.backgroundColor = "#f8f4da";
	} else {
		$("find_opusName").style.backgroundColor = "";
	}
	if ($F("find_artistName")) {
		$("find_artistName").style.backgroundColor = "#f8f4da";
	} else {
		$("find_artistName").style.backgroundColor = "";
	}
	if ($F("find_writerName")) {
		$("find_writerName").style.backgroundColor = "#f8f4da";
	} else {
		$("find_writerName").style.backgroundColor = "";
	}
}

function showCondition() {
	$("conditionDiv").style.display = "";
}

function hideCondition() {
	$("conditionDiv").style.display = "none";
}

function clearCondition() {
	$("find_artistName").value = "";
	$("find_catalogNo1").value = "";
	$("find_catalogNo2").value = "";
	$("find_jasracCode").value = "";
	$("find_jrcCode").value = "";
	$("find_opusName").value = "";
	$("find_writerName").value = "";
	$("find_mngStartTermY").selectedIndex = 0;
	$("find_mngStartTermM").selectedIndex = 0;
	$("find_artistName").style.backgroundColor = "";
	$("find_catalogNo1").style.backgroundColor = "";
	$("find_catalogNo2").style.backgroundColor = "";
	$("find_jasracCode").style.backgroundColor = "";
	$("find_jrcCode").style.backgroundColor = "";
	$("find_opusName").style.backgroundColor = "";
	$("find_writerName").style.backgroundColor = "";
	$("find_jrcCode").focus();
}

function openerRefreshByArtist(artistName) {
	window.opener.document.getElementById("link_artistName").value = artistName;
	var f = window.opener.document.Form;
	f['Form:doLinkByArtist'].click();
	window.close();
}

function openerRefreshByCatalog(catalogNo) {
	window.opener.document.getElementById("link_catalogNo").value = catalogNo;
	var f = window.opener.document.Form;
	f['Form:doLinkByCatalogNo'].click();
	window.close();
}

function openerRefreshByPub(pubName) {
	window.opener.document.getElementById("link_pubName").value = pubName;
	var f = window.opener.document.Form;
	f['Form:doLinkByPubName'].click();
	window.close();
}

function openerRefreshByWriter(writerName) {
	window.opener.document.getElementById("link_writerName").value = writerName;
	var f = window.opener.document.Form;
	f['Form:doLinkByWriterName'].click();
	window.close();
}

function checkResponse() {
	$("responseTitle").style.backgroundColor = "";
	$("responseNotes").style.backgroundColor = "";
	var msg = new Array();
	if (!$F("responseTitle")) {
		msg.push("・タイトルを入力して下さい。");
		$("responseTitle").style.backgroundColor = "#FF9999";
	}
	if (!$F("responseNotes")) {
		msg.push("・返信内容を入力して下さい。");
		$("responseNotes").style.backgroundColor = "#FF9999";
	}
	if (msg.length>0) {
		alert("以下のエラーがあります。\n\n"+msg.join("\n"));
		return false;
	}
	if (!confirm("この内容で返信します。よろしいですか？")) {
		return false;
	}
	return true;
}

function checkRequest() {
	$("companyName").style.backgroundColor = "";
	$("senderName").style.backgroundColor = "";
	$("mailAddress").style.backgroundColor = "";
	$("requestKbn").style.backgroundColor = "";
	$("requestNotes").style.backgroundColor = "";
	var msg = new Array();
	if (!$F("companyName")) {
		msg.push("・御社名を入力して下さい。");
		$("companyName").style.backgroundColor = "#FF9999";
	}
	if (!$F("senderName")) {
		msg.push("・ご担当の方のお名前を入力して下さい。");
		$("senderName").style.backgroundColor = "#FF9999";
	}
	if (!$F("mailAddress")) {
		msg.push("・メールアドレスを入力して下さい。");
		$("mailAddress").style.backgroundColor = "#FF9999";
	}
	if (!$F("requestKbn")) {
		msg.push("・お問い合わせの区分を選択して下さい。");
		$("requestKbn").style.backgroundColor = "#FF9999";
	}
	if (!$F("requestNotes")) {
		msg.push("・お問い合わせ内容を入力して下さい。");
		$("requestNotes").style.backgroundColor = "#FF9999";
	}
	if (msg.length>0) {
		alert("以下のエラーがあります。\n\n"+msg.join("\n"));
		return false;
	}
	return true;
}

function linkByArtist(arg) {
	$("link_artistName").value = arg;
	var f = document.Form;
	f['Form:doLinkByArtist'].click();
}

function linkByCatalogNo(arg) {
	$("link_catalogNo").value = arg;
	var f = document.Form;
	f['Form:doLinkByCatalogNo'].click();
}

