SIM0500.js 2.03 KB
//文字コードはEUCで保存すること
function chk_up(){

	sYM = document.frm.yyyy.value+(("00"+ document.frm.mon.value).substr(("00"+document.frm.mon.value).length-2,2));
	if(document.frm.hidKaishi.value > sYM){
			alert("開始期間は"+(document.frm.hidKaishi.value).substr(0,4)+"年"+parseInt((document.frm.hidKaishi.value).substr(4,2))+"月以降を選択してください");
			return false;
	}

	for(i=0;i<(document.frm.elements["shikin[1][]"].length);i++){
		txtName = "shikin[1][]";
		val = document.frm.elements[txtName][i].value;
    if (val.match(/[^0-9]/g) && val != "") {
			alert("不正な金額が入力されています");
			return false;
		}
		txtName = "shikin[2][]";
		val = document.frm.elements[txtName][i].value;
    if (val.match(/[^0-9]/g) && val != "") {
			alert("不正な金額が入力されています");
			return false;
		}
	}

	document.frm.target = "_self";
	document.frm.action = "SIM0500.php";
	document.frm.method="POST";
	document.frm.submit();
}
function mycheck(val){
	if(val != ""){
		if (val.search(/^(\\|\$)?(0|-?[1-9]\d*)$/)	!=	-1 ){
			return true;
		}else{
			return false;
		}
	}else{
		return true;
	}
}
function show_print(){

	window.open("","SIM_Print","status=no,menubar=no,favorites=no,scrollbars=yes,resizable=yes");
	document.frm.target = "SIM_Print";
	document.frm.action = "SIM0500.php?mode=p";
	document.frm.method="POST";
	document.frm.submit();
}

function csv_dl(){
	document.frm.action = "SIM0600.php";
	document.frm.method="POST";
	document.frm.submit();
}

function lnk_input(auth,sMode,bSeq,dSeq,cSeq){

	document.frm.sMode.value = sMode;
	document.frm.bSeq.value = bSeq;
	document.frm.dSeq.value = dSeq;

	if(auth == 1 || auth == 99){
		document.frm.action="SIM0210.php?chgmode=f&bSeq="+bSeq+"&dSeq="+dSeq+"&cSeq="+cSeq;
	}else{
		document.frm.action="SIM0200.php?chgmode=f";
	}
	document.frm.method="POST";
	document.frm.submit();
}

function MoverStyle(n){
	var lay;
	lay = document.getElementById("Td"+n);
	lay.style.background = "#B7E7F7";
}

function MoutStyle(n){
	var lay;
	lay = document.getElementById("Td"+n);
	lay.style.background = "#F7F7F7";
}