<!--
//ブラウザを判別(IE限定)
an = navigator.appName;
userAgent = navigator.userAgent;
ver = navigator.appVersion;
if(an.indexOf("Microsoft") < 0) 
{
	alert("このページは現在、Internet Explorerでしか動作しません。");
	history.back();
} else {
	//myLast = ver.indexOf("MSIE",2);
	//myVersion = ver.substr(22,3);
	//if (myVersion == 7.0) {
		//alert('Internet Explorer Version 7.0 は現在、未対応です。');
		//history.back();
	//}
}


//カレンダー(先月)
function Prev_Month(m_cd,cd) {
	if (document.form1.SEL_SCATE.value.length == 1) {
		ScateCd = '0' + document.form1.SEL_SCATE.value;
	} else {
		ScateCd = document.form1.SEL_SCATE.value;
	}

	document.form1.numcd.value = cd + document.form1.SEL_LCATE.value + ScateCd;
	document.form1.m_cd.value = m_cd;
	
	//document.form1.action="main.asp?numcd=" + cd;
	document.form1.action="main.asp";
	document.form1.method="post";
	document.form1.submit();
}

//カレンダー(翌月)
function Next_Month(m_cd,cd) {
	if (document.form1.SEL_SCATE.value.length == 1) {
		ScateCd = '0' + document.form1.SEL_SCATE.value;
	} else {
		ScateCd = document.form1.SEL_SCATE.value;
	}
	
	//alert(cd + document.form1.SEL_LCATE.value + ScateCd);
	document.form1.numcd.value = cd + document.form1.SEL_LCATE.value + ScateCd;
	document.form1.m_cd.value = m_cd;
	
	//document.form1.action="main.asp?numcd=" + cd;
	document.form1.action="main.asp";
	document.form1.method="post";
	document.form1.submit();
}

//日付検索
function daykensaku(cd,yyyy,mm,dd) {
	if (document.form1.SEL_SCATE.value.length == 1) {
		ScateCd = '0' + document.form1.SEL_SCATE.value;
	} else {
		ScateCd = document.form1.SEL_SCATE.value;
	}
	document.form1.numcd.value = cd + document.form1.SEL_LCATE.value + ScateCd;
	getyear = yyyy + "/" + mm +"/" +dd;
	document.form1.m_cd.value = 'hold';
	//document.form1.action="main.asp?numcd=" + cd + "&nowdate=" + getyear;
	document.form1.action="main.asp?nowdate=" + getyear;
	document.form1.method="post";
	document.form1.submit();
}

//ログイン処理
function loginbtn() {
if (document.form1.u_id.value=="") {
	if (document.form1.pass.value=="") {
			alert('担当者の方はログインIDとパスワードを入力して下さい。');
			return false;
		} else {
			alert('ログインIDを入力して下さい。');
			return false;
		}
	} else {
		if (document.form1.pass.value=="") {
			alert('パスワードを入力して下さい。');
			return false;
		}
	}

	if ((document.form1.u_id.value.match(/^[0-9a-z]/g)) && (document.form1.pass.value.match(/^[0-9a-z]/g))) {
		document.form1.action="loginchk.asp";
		document.form1.method="post";
		document.form1.submit();
	} else {
		alert('入力した文字に大文字や記号が使われています。入力し直して下さい。');
	}
}

//大カテゴリ検索
function ChgLcate(cd) {
	document.form1.numcd.value = cd + document.form1.SEL_LCATE.value + '00';
	document.form1.action="main.asp";
	document.form1.method="post";
	document.form1.submit();
}

//小カテゴリ検索
function ChgScate(cd) {
	if (document.form1.SEL_SCATE.value.length == 1) {
		ScateCd = '0' + document.form1.SEL_SCATE.value;
	} else {
		ScateCd = document.form1.SEL_SCATE.value;
	}
	document.form1.numcd.value = cd + document.form1.SEL_LCATE.value + ScateCd;
	document.form1.action="main.asp";
	document.form1.method="post";
	document.form1.submit();
}

function pickup(cd,moji) {
	if (moji == 'kiji') {
		document.form1.action="main.asp?KijiNo=" + cd + "&key=pickup";
		document.form1.method="post";
		document.form1.submit();
	}
	if ( moji == 'comm') {
		document.form1.action="main.asp?KijiNo=" + cd + "&key=pickup&comment=yes";
		document.form1.method="post";
		document.form1.submit();
	}
}

//文字列のバイト長を返す
function getLength(str) {
	var i,cnt = 0;
	for(i=0; i<str.length; i++) {
		if (escape(str.charAt(i)) != "%0D" && escape(str.charAt(i)) != "%0A") {
			if (escape(str.charAt(i)).length >= 4 ) {
				cnt+=2}
			else {
				cnt++
			}
		}
	}
	return cnt;
}


function sendcomment(cd) {
	if (document.form1.CommName.value=="") {
		alert('名前が入力されていません。');
		return false;
	} else {
		if (getLength(document.form1.CommName.value) > 30) {
			alert('名前は全角15文字以内で入力して下さい。');
			return false;
		}
	}
	
	if (document.form1.Comment.value == "" ) {
		alert('コメントが記入されていません。');
		return false;
	} else {
		if (getLength(document.form1.Comment.value) > 600) {
			alert('コメントは300文字以内で入力して下さい。');
			return false;
		}
	}
	document.form1.action="main.asp?KijiNo=" + cd + "&key=sendcomm";
	document.form1.method="post";
	document.form1.submit();
}

-->

