function isNull(str, err) {
 //必須チェックサブルーチン
 //strが未入力ならerrを表示する
   str1 = str;
   wkflg = 0;
   wkdata = str1;
	for (i = 0; i < wkdata.length; i++) {
		if (wkdata.charAt(i) != " ") {
   			wkflg = 1
		}
	}
	if (wkflg == 0) {
   		alert(err);
   		return(false);
	}
   	return(true);
}
function isNumber(str, err) {
}
function isChar(str, err) {
}
function isCharOrNumber(str, err) {
}
function isAscii(str, err) {
}

/* ****************************************************************************
	関数名 getLength()

		作成日 : 1998/3/26 (S.Yano)
		引数   : 1番目      -> チェックする文字列
		戻り値 : iLength    -> 1番目の引数のByte数
		注意   : Netscape Navigatorでは、string.lengthでByte数を取得できるが、
				 Internet Explorerでは、string.lengthで文字数の取得になってしまいます。

**************************************************************************** */
function getLength() {
	var iLength = 0;
	var i;
	if (getLength.arguments.length != 1) {
		alert("getLengthへの引数の数が間違っています");
	}
	// Netscape Navigatorの場合
	if (navigator.appName.indexOf("Netscape") >= 0) {
		iLength = getLength.arguments[0].length;
		return iLength;
	}
	// Microsoft Internet Explorerの場合
	if (navigator.appName.lastIndexOf("Explorer") >= 0) {
		if (getLength.arguments[0] == "") {
			return iLength;
		}
		for (i = 0; i < getLength.arguments[0].length; i++) {
			sBuffer = getLength.arguments[0].substring(i, i+1);
			if ((sBuffer >= " " && sBuffer <= "~") || (sBuffer >= "ｦ" && sBuffer <= "ﾟ")) {
				iLength++;
			}
			else {
				iLength += 2;
			}
		}
		return iLength;
	}
}

