function submitUsrDel(f) {
	if (confirm("Do you wish to cancel your membership?")) {
		f.submit();
	}
}

//スカウト公開設定
function submitScoutEntry(f, num) {
	str = "";
	if (num) {
		//if (f.scout_entry[0].checked) {
			//Enter scout service をチェックした場合
			str = "Please click \"OK\" if you wish to display your resume to registered companies.\n (Your personal information will be withheld.) ";
		//} else {
		//	return;
		//}
	} else {
		//if (f.scout_entry.checked) {
			//Cancel scout service をチェックした場合
			str = "Click \"OK\" if you wish to cancel the Scout service";
		//} else {
		//	return;
		//}
	}

	if (confirm(str)) {
		f.submit();
	}
}

//スカウトに公開されるプロフィールをプレビューするwindow
function previewEntryResume(url) {
	window.open(url, 'pEntryResume', 'width=760,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes');
}

//スカウトメールの詳細ページへ
function goMailDetail4User(frm, scout_id, action_url) {
	if (action_url != "") {
		frm.action = action_url;
	}
	frm.scout_id.value = scout_id;
	frm.submit();
}

function goMailResent4User(frm, scout_resent_type, action_url) {
	if (scout_resent_type == 1) {
		//辞退
		if (confirm('Please click "OK" to turn down this offer')) {
			frm.action = action_url;
			frm.scout_resent_type.value = scout_resent_type;
			frm.submit();
		}
	} else {
		//応募画面へ
		frm.scout_resent_type.value = scout_resent_type;
		frm.submit();
	}
}

function sendScoutReply(frm) {
		if (confirm('Your disclosed information will be made public to the company.')) {
			frm.submit();
		}
}

//MessageList検索する
function searchMessage(frm)
{
	frm.searchFlg.value = 1;
	frm.submit();
}

//MessageListで削除する
function submitMessageDelete(frm, name)
{

	flg = false;

	if (!frm[name])
	{
		flg = false;
	}
	else
	{
		//１つだと配列にならない
		if (frm[name].checked)
		{
			flg = true;
		}
	}

	//無限ループ
	i = 0;
	for(;;)
	{

		if (!frm[name])
		{
			break;
		}

		//オブジェクトが存在しない
		if (!frm[name][i])
		{
			break;
		}

		if (frm[name][i].checked)
		{
			flg = true;
			break;
		}

		i++;

	}

	//チェックの存在をチェック
	if (flg) {

		//削除前に確認
		if (confirm("Click \"OK\" if you wish to delete the checked message"))
		{
			frm.submit();
		}
	}
	else
	{
		//チェックがない
		alert("checked message is nothing");
	}
}

//チェックボックスを全てチェックする
function allcheck(frm, name, bool)
{
	if (!frm[name])
	{
		return;
	}
	else
	{
		//１つだと配列にならない
		frm[name].checked = bool;
	}

	//無限ループ
	i = 0;
	for(;;)
	{

		//オブジェクトが存在しない
		if (!frm[name][i])
		{
			break;
		}
		frm[name][i].checked = bool;

		i++;

	}
}
