function Com_Chk_Moji(p_value,p_koumoku,p_null,p_min,p_max,p_kigou,p_kana,p_space,p_hanzen,p_http){var ret={result:true,errPt:0,val:null,afterVal:""};var strBuffer=comTrim(p_value);var strBuffer2=null;var httpStr="http://";var alertTxt;ret.val=[strBuffer];if(p_http){if(strBuffer==httpStr){strBuffer="";}}if(strBuffer.length==0){if(!p_null){ret.afterVal="";return ret;}else{mtdAlert(p_koumoku,"cmn",-1);ret.result=false;}}if(ret.result){if(p_kana)strBuffer=Com_Chg_KanaZen(strBuffer);if(p_space)strBuffer=Com_Chg_SpaceZen(strBuffer);ret.val=[strBuffer];if(p_max!=0){var strLen=Com_Get_Length(strBuffer);if(strLen>p_max){if(p_hanzen==1)alertTxt=[ "”¼Šp"+p_max,strLen ];else{var nowLen=Math.round(strLen/2);alertTxt=[ "‘SŠp"+eval(p_max / 2),nowLen ];}mtdAlert(p_koumoku,"cmn",-4,alertTxt);ret.result=false;}else if(strLen<p_min){if(p_hanzen==1)alertTxt=[ "”¼Šp"+p_min,strLen ];else{var nowLen=Math.round(strLen/2);alertTxt=[ "‘SŠp"+eval(p_min / 2),nowLen ];}mtdAlert(p_koumoku,"cmn",-5,alertTxt);ret.result=false;}}}if(ret.result){switch(p_kigou){case 1:strBuffer=strBuffer.replace(/\'/g,"''");break;case 2:strBuffer=strBuffer.replace(/\"/g,'""');break;default:break;}}if(!ret.result)return ret;else{ret.afterVal=strBuffer;return ret;}}function Com_Chk_Eisuji(pValue,pKoumoku,pNull,pMin,pMax,pType){var ret={result:true,errPt:0,val:null,afterVal:""};var strBuffer=comTrim(pValue);if(strBuffer.length==0){if(pNull){mtdAlert(pKoumoku,"cmn",-1);ret.result=false;}else{ret.val=[strBuffer];return ret;}}if(ret.result){strBuffer=Com_Chg_Alpha(strBuffer,1);strBuffer=Com_Chg_HanZenNumVal(strBuffer,1,1);switch(pType){case 0:if(!Com_Chk_AlphaNumber(strBuffer)){mtdAlert(pKoumoku,"str",-1);ret.result=false;}break;case 1:if(!comChkIdPassword(strBuffer)){mtdAlert(pKoumoku,"str",-2);ret.result=false;}break;case 2:if(!comChkMail(strBuffer)){mtdAlert(pKoumoku,"str",-3);ret.result=false;}break;}}if(ret.result){if(pMax!=0){var strLen=strBuffer.length;if((pMin==pMax)&&(strLen!=pMax)){mtdAlert(pKoumoku,"cmn",-7,pMax);ret.result=false;}else if(strLen>pMax){mtdAlert(pKoumoku,"cmn",-4,[ pMax,strLen ]);ret.result=false;}else if(strLen<pMin){mtdAlert(pKoumoku,"cmn",-5,[ pMin,strLen ]);ret.result=false;}}}ret.val=[strBuffer];ret.afterVal=strBuffer;return ret;}
