function erase(){var textarea=document.getElementsByTagName("textarea");for(i=0;i<textarea.length;i++){if(textarea[i].value==textarea[i].defaultValue){textarea[i].className+=" default"}
textarea[i].onfocus=function(){if(this.value==this.defaultValue){this.value="";this.className=this.className.replace("default","");}}
textarea[i].onblur=function(){if(this.value==""){this.value=this.defaultValue;this.className+=" default"}}}}
Event.observe(window,'load',erase,false);var errtxt=new Array();errtxt[1]='入力して下さい。';errtxt[2]='全角文字で入力してください';errtxt[3]='全角カタカナで入力してください';errtxt[4]='ひらがなで入力してください';errtxt[5]='半角カナを含めないで入力してください'
errtxt[6]='半角数字で入力して下さい。';errtxt[7]='スペースや記号を含めずに半角数字を入力して下さい。';errtxt[8]='スペースや記号を含めずに半角アルファベットを入力して下さい。';errtxt[9]='スペースや記号を含めずに半角のアルファベットか数字を入力して下さい。';errtxt[10]='日付を入力して下さい。';errtxt[11]='xxx@yyy.jpのような形式で入力して下さい。';errtxt[12]='メールアドレスが一致しません。';errtxt[13]='http(s)://から入力して下さい。';errtxt[14]='yyyy/mm/dd の形式で入力して下さい。 例）2000/03/28';errtxt[15]='選択して下さい。';errtxt[16]='選択して下さい。';Validation.addAllThese([['required',errtxt[1],function(v){return!Validation.get('IsEmpty').test(v);}],['validate-zenkaku',errtxt[2],function(v){return Validation.get('IsEmpty').test(v)||!/[^ -~｡-ﾟ]*/.test(v)}],['validate-zenkaku-katakana',errtxt[3],function(v){return Validation.get('IsEmpty').test(v)||/^[ァ-ヶー　\s]+$/.test(v)}],['validate-hira',errtxt[4],function(v){return Validation.get('IsEmpty').test(v)||/^[ぁ-ん]+$/.test(v)}],['validate-not-han',errtxt[5],function(v){return Validation.get('IsEmpty').test(v)||!/[ｧ-ﾝﾞﾟ]+$/.test(v)}],['validate-number',errtxt[6],function(v){return Validation.get('IsEmpty').test(v)||(!isNaN(v)&&!/^\s+$/.test(v));}],['validate-digits',errtxt[7],function(v){return Validation.get('IsEmpty').test(v)||!/[^\d]/.test(v);}],['validate-alpha',errtxt[8],function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-Z]+$/.test(v)}],['validate-alphanum',errtxt[9],function(v){return Validation.get('IsEmpty').test(v)||!/\W/.test(v)}],['validate-date',errtxt[10],function(v){var test=new Date(v);return Validation.get('IsEmpty').test(v)||!isNaN(test);}],['validate-email',errtxt[11],function(v){return Validation.get('IsEmpty').test(v)||/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(v)}],['validate-email-confirm',errtxt[12],function(v){var nextId="f"&(v.id.substr(1)+1);return Validation.get('IsEmpty').test(v)||/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(v)}],['validate-url',errtxt[13],function(v){return Validation.get('IsEmpty').test(v)||/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)}],['validate-date-au',errtxt[14],function(v){if(Validation.get('IsEmpty').test(v))return true;var regex=/^(\d{4})\/(\d{2})\/(\d{2})$/;if(!regex.test(v))return false;var d=new Date(v.replace(regex,'$3/$2/$1'));return(parseInt(RegExp.$3,10)==d.getFullYear())&&(parseInt(RegExp.$2,10)==(1+d.getMonth()))&&(parseInt(RegExp.$1,10)==d.getDate());}],['validate-selection',errtxt[15],function(v,elm){return elm.options?elm.selectedIndex>0:!Validation.get('IsEmpty').test(v);}],['validate-one-required',errtxt[16],function(v,elm){var p=elm.parentNode;var options=p.getElementsByTagName('INPUT');return $A(options).any(function(elm){return $F(elm);});}]]);
