function VLD_input(obj) { var error = new Array(); var focus_ele = new Array(); if(GET_byte(obj.text_1.value) > 60) {error.push("会社名פʸͤĶƤޤ"); focus_ele.push('text_1');} if(VLD_kara(obj.text_2.value)) {error.push("氏名פ̤ϤǤ"); focus_ele.push('text_2');} if(GET_byte(obj.text_2.value) > 40) {error.push("氏名פʸͤĶƤޤ"); focus_ele.push('text_2');} if(VLD_kara(obj.text_3.value)) {error.push("ふりがなפ̤ϤǤ"); focus_ele.push('text_3');} if(GET_byte(obj.text_3.value) > 40) {error.push("ふりがなפʸͤĶƤޤ"); focus_ele.push('text_3');} if(obj.zip1_1.value == "" || obj.zip2_1.value == "") {error.push("郵便番号פ̤Ϥޤ"); focus_ele.push('zip1_1');} else if(!VLD_num_zenhan(obj.zip1_1.value) || !VLD_num_zenhan(obj.zip2_1.value)) {error.push("郵便番号פ˿ʳʸƤޤ"); focus_ele.push('zip1_1');} else if(GET_byte(CNV_han_num(obj.zip1_1.value)) != 3 || GET_byte(CNV_han_num(obj.zip2_1.value)) != 4) {error.push("郵便番号פη۾Ǥ"); focus_ele.push('zip1_1');} if(obj.todofuken_1.selectedIndex == 0) {error.push("都道府県פ̤Ǥ"); focus_ele.push('todofuken_1');} if(VLD_kara(obj.text_4.value)) {error.push("住所פ̤ϤǤ"); focus_ele.push('text_4');} if(GET_byte(obj.text_4.value) > 100) {error.push("住所פʸͤĶƤޤ"); focus_ele.push('text_4');} else if(!VLD_num_zenhan(obj.tel1_1.value) || !VLD_num_zenhan(obj.tel2_1.value) || !VLD_num_zenhan(obj.tel3_1.value)) {error.push("TELפ˿ʳʸƤޤ"); focus_ele.push('tel1_1');} else if(GET_byte(CNV_han_num(obj.tel1_1.value)) > 6 || GET_byte(CNV_han_num(obj.tel2_1.value)) > 6 || GET_byte(CNV_han_num(obj.tel3_1.value)) > 6) {error.push("TELפ16ʸϤƤ"); focus_ele.push('tel1_1');} else if(!VLD_num_zenhan(obj.fax1_1.value) || !VLD_num_zenhan(obj.fax2_1.value) || !VLD_num_zenhan(obj.fax3_1.value)) {error.push("FAXפ˿ʳʸƤޤ"); focus_ele.push('fax1_1');} else if(GET_byte(CNV_han_num(obj.fax1_1.value)) > 6 || GET_byte(CNV_han_num(obj.fax2_1.value)) > 6 || GET_byte(CNV_han_num(obj.fax3_1.value)) > 6) {error.push("FAXפ16ʸϤƤ"); focus_ele.push('fax1_1');} if(VLD_kara(obj.email_1.value)) {error.push("Eメールアドレスפ̤ϤǤ"); focus_ele.push('email_1');} else if(!VLD_email(obj.email_1.value)) {error.push("Eメールアドレスפν񼰤۾Ǥ"); focus_ele.push('email_1');} if(GET_byte(obj.email_1.value) > 50) {error.push("EメールアドレスפʸͤĶƤޤ"); focus_ele.push('email_1');} else if(!VLD_url(obj.url_1.value)) {error.push("URLפν񼰤۾Ǥ"); focus_ele.push('url_1');} if(GET_byte(obj.url_1.value) > 80) {error.push("URLפʸͤĶƤޤ"); focus_ele.push('url_1');} if(!GET_check_num(obj.radio_1)) {error.push("移転先レンタルサーバーの手配פ̤Ǥ"); focus_ele.push('radio_1');} if(VLD_kara(obj.text_5.value)) {error.push("移転元レンタルサーバーの会社名及びプラン名פ̤ϤǤ"); focus_ele.push('text_5');} if(GET_byte(obj.text_5.value) > 120) {error.push("移転元レンタルサーバーの会社名及びプラン名פʸͤĶƤޤ"); focus_ele.push('text_5');} if(GET_byte(obj.text_6.value) > 120) {error.push("移転先レンタルサーバーの会社名及びプラン名פʸͤĶƤޤ"); focus_ele.push('text_6');} if(GET_byte(obj.textarea_1.value) > 800) {error.push("レンタルサーバーの移転をする理由פʸͤĶƤޤ"); focus_ele.push('textarea_1');} if(!GET_check_num(obj.elements['checkbox_1[]'])) {error.push("移転をするファイル及びデータの種類פ̤Ǥ"); focus_ele.push('checkbox_1[]');} if(GET_byte(obj.text_7.value) > 80) {error.push("その他での移転ファイル及びデータの種類פʸͤĶƤޤ"); focus_ele.push('text_7');} if(GET_byte(obj.textarea_2.value) > 1600) {error.push("その他ご要望等がありましたら下記よりお願いします。פʸͤĶƤޤ"); focus_ele.push('textarea_2');} if(error.length){ alert("顼\n\n" + error.join("\n")); if(obj.elements[focus_ele[0]].type){ // 饸ܥʳ obj.elements[focus_ele[0]].focus(); }else{ // 饸ܥ obj.elements[focus_ele[0]][0].focus(); } return false; } } /** ***************************************************************************************************** * Хȿ * * @update 2006-12-8 * * @param string str оʸ * @return int Хȿ ***************************************************************************************************** */ function GET_byte(str) { var byte = 0; for(i=0; i= 0){c = han.charAt(n);} str += c; } return str; } /** ***************************************************************************************************** * ᡼륢ɥ쥹å * * @update 2006-5-4 * * @param string str оʸ * @return bool ***************************************************************************************************** */ function VLD_email(str) { if(!str.match(/^\S+@\S+\.\S+$/)){return false;} if(str.match(/[!"#$%&'\(\)=\\|,:;^\[\]\{\}`*?+><]/)){return false;} return true; } /** ***************************************************************************************************** * URLå * * @update 2006-5-4 * * @param string str оʸ * @return bool ***************************************************************************************************** */ function VLD_url(str) { if(!str.match(/(http|https):\/\/.+/)){return false;} return true; } /** ***************************************************************************************************** * 饸ܥ󡦥åܥåΥå * * @update 2007-9-2 * * @param object ctrl_obj ȥ륪֥ * @return int å ***************************************************************************************************** */ function GET_check_num(ctrl_obj) { var i; var num = 0; for(i=0; i