//サブミット前のチェックをする
function SendCheck(objForm){
	var msg = new Array;
	
	var name = objForm.name.value;
	if(Trim(name) == ''){
		msg[msg.length] = 'お名前を入力して下さい';
	}
	
	var inquiry = objForm.inquiry.value;
	if(Trim(inquiry) == '' || Trim(inquiry) == 'お問合せの詳細な内容を御記入下さい'){
		msg[msg.length] = 'お問い合わせ内容を入力して下さい。';
	}
	var checkString = objForm.mail.value;
	var at = false;
	var dot = false;
	var newstr = "";
	if(Trim(checkString) == ''){
		msg[msg.length] = 'メールアドレスを入力して下さい。';
	}else{
		if (checkString.indexOf("@") != -1) {
			at = true;
		} else if (checkString.indexOf(".") != -1) {
			dot = true;
		}
		for (var i = 0; i < checkString.length; i++) {
			ch = checkString.substring(i, i + 1)
			if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
				|| (ch == "@") || (ch == ".") || (ch == "_")
				|| (ch == "-") || (ch >= "0" && ch <= "9")) {
				newstr += ch;
				if (ch == "@") {
					at=true;
				}
				if (ch == ".") {
					dot=true;
				}
			}
		}
		if ((at != true) && (dot != true)) {
			msg[msg.length] = '入力されたメールアドレス形式が違うようです。';
		}
	}
	if(msg[0] == undefined){
		objForm.action = '?act=send';
		objForm.method = 'post';
		objForm.submit();
	}else{
		errView(msg);
	}
}

