// プログラム移動
function goPage(pgAct) {
	document.fList.action = pgAct;
	document.fList.submit(true);
}

// コードを伴ったプログラム移動
function goPageWithWork(pgAct, tmp) {
	document.fList.action = pgAct;
	document.fList.work.value = tmp;
	document.fList.submit(true);
}

// コードを伴ったプログラム移動
function changeSort(pgAct, tmp) {
	document.fList.action = pgAct;
	document.fList.SortBy.value = tmp;
	document.fList.submit(true);
}

// コードを伴ったプログラム移動
function changeOrderSort(pgAct, tmp) {
	document.fList.action = pgAct;
	document.fList.order_SortBy.value = tmp;
	document.fList.submit(true);
}

// コードを伴ったプログラム移動
function doLogin(pgAct) {
	document.fList.action = pgAct;
	document.fList.vFormLogin.value = 't';
	document.fList.submit(true);
}


// コードを伴ったプログラム移動
function doLoginConvene(pgAct, tmp) {
	document.fList.action = pgAct;
	document.fList.wLoginConveneCD.value = tmp;
	document.fList.submit(true);
}

function goPageWithWorkAndAlert(pgAct, tmp, tmp2) {
	var flg=0;
	if (document.fList.elements['CancelOrderCD[]'].length) {
		for(i=0;i<document.fList.elements['CancelOrderCD[]'].length;i++){
			if(document.fList.elements['CancelOrderCD[]'][i].checked == true) {
				flg=1;
			}
		}
	} else {
		if(document.fList.elements['CancelOrderCD[]'].checked == true) {
			flg=1;
		}
	}
	if(flg==0) {
		alert('チェックしてください');
	} else {
		if(confirm(tmp2 + 'します。よろしいですか？') == true){
			document.fList.work.value = tmp;
			document.fList.action = pgAct;
			document.fList.submit(true)
		}
	}
}

function goPageWithWorkAndAlertCart(pgAct, tmp, tmp2) {
	var flg=0;
	if (document.fList.elements['CartOrderCD[]'].length) {
		for(i=0;i<document.fList.elements['CartOrderCD[]'].length;i++){
			if(document.fList.elements['CartOrderCD[]'][i].checked == true) {
				flg=1;
			}
		}
	} else {
		if(document.fList.elements['CartOrderCD[]'].checked == true) {
			flg=1;
		}
	}
	if(flg==0) {
		alert('チェックしてください');
	} else {
		if(confirm(tmp2 + 'します。よろしいですか？') == true){
			document.fList.work.value = tmp;
			document.fList.action = pgAct;
			document.fList.submit(true)
		}
	}
}

function goUserPage(tmp) {
	document.f_list.action = 'entry.php';
	document.f_list.EditFlg.value = 't';
	document.f_list.work.value = tmp;
	document.f_list.submit(true)
}

function changeCal(pgAct, tmp) {
	document.fList.action = pgAct;
	document.fList.sSearchMonth.value = tmp;
	document.fList.submit(true)
}

// コードを伴ったプログラム移動
function goPageWithApplicationCD(pgAct, CD) {
	document.fList.action = pgAct;
	document.fList.editApplicationCD.value = CD;
	document.fList.submit(true);
}

// コードを伴ったプログラム移動
function goPageWithApplicationCDAlert(pgAct, CD,tmp) {
	if(confirm('削除します。よろしいですか？') == true) {
		document.fList.action = pgAct;
		document.fList.editApplicationCD.value = CD;
		document.fList.work.value = tmp;
		document.fList.submit(true);
	}
}
// コードを伴ったプログラム移動
function goPageWithConveneCDAndWork(pgAct, CD, tmp) {
	document.fList.action = pgAct;
	document.fList.cvcd.value = CD;
	document.fList.work.value = tmp;
	document.fList.submit(true);
}

function searchContents(pgAct) {
	document.form1.action = pgAct;
	document.form1.submit(true)
}
// コードを伴ったプログラム移動
function goPageWithConveneCDAndWorkAlert(pgAct, CD,tmp) {
	if(confirm('申し込みを完了します。よろしいですか？') == true) {
		document.fList.action = pgAct;
		document.fList.cvcd.value = CD;
		document.fList.work.value = tmp;
		document.fList.submit(true);
	}
}
