<!-- JavaScript
function chgImgImageSubmit(fileName,imgObj){imgObj.src = fileName;}function back(num){num = num * (-1);history.go(num);}function m_send(){with (document.forms[0]){window.status = "データ送信しました。(処理中！！)";btnLock("chk2");btnLock("chk3");submit();return true;}}function initBgColor(){$("name").style.backgroundColor = "#fff";$("email").style.backgroundColor = "#fff";$("tel").style.backgroundColor = "#fff";$("zip").style.backgroundColor = "#fff";$("honbun").style.backgroundColor = "#fff";}function kakunin(){initBgColor();with (document.forms[0]){if(chkForm() == "F"){return false;}window.status = "データ送信しました。(処理中！！)";submit();return true;}}function btnLock(ivalue){$(ivalue).disabled = true;}function chgColor(ivalue){$(ivalue).style.backgroundColor = "pink";}function chkForm(){var sts;var c_fg;sts = "以下の項目の確認をお願いいたします。\n";c_fg = 0;with (document.forms[0]){if (chkNull(name.value) == "F"){sts = sts + "\nお名前を入力してください。" ;chgColor("name");if( c_fg == 0) name.focus();c_fg++;}if (chkNull(email.value) == "F"){sts = sts + "\nメールアドレスを入力して下さい。" ;chgColor("email");if( c_fg == 0) email.focus();c_fg++;}else {if (chkMailadd(email.value) == "F"){chgColor("email");sts = sts + "\nメールアドレスに誤りがあるようです。" ;if( c_fg == 0) email.focus();c_fg++;}}if (chkNull(tel.value) == "F"){sts = sts + "\nお電話番号を入力して下さい。" ;
chgColor("tel");if( c_fg == 0) tel.focus();c_fg++;}else if(chkTelno(tel.value) == "F"){chgColor("tel");sts = sts + "\nお電話番号は、半角数値とハイフンのみです。" ;if( c_fg == 0) tel.focus();c_fg++;}if (chkNull(honbun.value) == "F"){chgColor("honbun");sts = sts + "\nお問合せを入力して下さい。" ;if( c_fg == 0) honbun.focus();c_fg++;}else {if (chkNullZen() == "F"){sts = sts + "\nお問合せが空白のようです。" ;chgColor("honbun");if( c_fg == 0) honbun.focus();c_fg++;}else {if (chkLength() == "F"){if( c_fg == 0) honbun.focus();c_fg++;}}}} if( c_fg != 0 ) {alert(sts); return "F";}}function chkZipSend(){var sts;var c_fg;sts = "以下の項目の確認をお願いいたします。\n";c_fg = 0;with (document.forms[0]){
if (chkNull(zip.value) == "F"){sts = sts + "\n郵便番号は３桁以上入力してください。";chgColor("zip");if( c_fg == 0) zip.focus();c_fg++;}else{if(chkTelno(zip.value) == "F"){sts = sts + "\n郵便番号は、半角数値とハイフンのみです。" ;chgColor("zip");if( c_fg == 0) zip.focus();c_fg++;}if(chkZipLen(zip.value) == "F"){sts = sts + "\n郵便番号は３桁以上入力してください。" ;chgColor("zip");if( c_fg == 0) zip.focus();c_fg++;}}}if( c_fg != 0 ) {alert(sts);return "F";}}function zip_init() {$("cityData").update("");$("townData").update("");$("add1").selectedIndex = 0;document.forms[0].add.value = "";}function zip_list() {var imput_zip = "";var ur = "";zip_init();with (document.forms[0]){if(chkZipSend() == "F"){return false;}imput_zip = zip.value;ur = "./selectzip.php?zip=" + imput_zip;window.self.propertyName = "mainview";subview = window.open(ur,"sub","width=300,height=300,scrollbars=1,status=0,resizable=1,toolbar=0,menubar=0,location=0");}}function formSend(){with (document.forms[0]){if(chkForm() == "F"){return false;}window.status = "データ送信しました。(処理中！！)";submit();return true;}}function chkNull(ivalue){if (ivalue.length == 0) {return "F";}else {return ivalue;}}function chkSeisu(ivalue){var newString = "";for (i = 0; i < ivalue.length; i++) {ch = ivalue.substring(i, i+1);if (ch >= "0" && ch <= "9") {newString += ch;}}if (ivalue != newString) {return "F";}else{return ivalue;}}function chkMailadd(ivalue){var newString = "";var cnt1 = 0;var cnt2 = 0;for (i = 0; i < ivalue.length; i++) {ch = ivalue.substring(i, i+1);if (ch == "@"){cnt1 = cnt1 + 1;}if (ch == "."){cnt2 = cnt2 + 1;}}if ((cnt1 != 1)||(cnt2 == 0)) {return "F";}else {return ivalue;}}function chkNullZen() {var temp = "";var cnt = 0;var c = "";temp = document.forms[0].honbun.value;for (i=0; i<temp.length; i++) {c = temp.substr(i, 1);if ((c == "　")||(c == " ")){cnt = cnt + 1;}}if (cnt == temp.length){return "F";}}function chkLength() {
var len;len = document.forms[0].honbun.value.length;if(len > 2001){alert("2000文字以上は送信できません。\n(現在"+len+"文字です)");return "F";}}function chkZipLen(ivalue) {var len;len = document.forms[0].zip.value.length;if(len < 3){return "F";}else {return ivalue;}}function chkTelno(ivalue){var newString = "";for (i = 0; i < ivalue.length; i++) {
ch = ivalue.substring(i, i+1);if ((ch >= "0" && ch <= "9") || (ch == "-")) {newString += ch;}}if (ivalue != newString) {return "F";}else {return ivalue;}}
// -->

