<!--

  // メールアドレスチェック
  function CheckMailAddress(theTextBox) {
  
    var len;
    var ret;
    var i;
    var cnt;
    var addr = new Array(2);
    var UsrNam;
    var DmnNam;
    var word = new Array;
    var RE1;
    var RE2;
    var RE3;
    var RE4;
    var RE5;
    var j;
    var chr;
    var ChrCod;
    
    // 未入力チェック
    if (theTextBox.value == '') {
      theTextBox.focus();
      theTextBox.select();
      return false;
    }
    
    // @チェック
    len = theTextBox.value.length;
    i = 0;
    cnt = 0;
    
    while (i < len) {
    
      ret = theTextBox.value.indexOf('@',i);
      
      if (ret != -1) {
        cnt += 1;
        i = ret + 1;
      } else if (cnt == 1) {
        break;
      }
      
      if (cnt == 0 || cnt > 1 ){
        theTextBox.focus();
        theTextBox.select();
        return false;
      }
      
    }
    
    addr = theTextBox.value.split('@')
    UsrNam = addr[0];
    DmnNam = addr[1];
    
    // ドメイン名チェック
    if (DmnNam == '' || DmnNam.length >= 255) {
      theTextBox.focus();
      theTextBox.select();
      return false;
      
    } else if (DmnNam.indexOf('.') == -1) {
      theTextBox.focus();
      theTextBox.select();
      return false;
      
    } else {
      word = DmnNam.split('.');
      
      // ワードチェック
      for (i = 0; i < word.length; i++) {
      
        if (word[i] == '' || word[i].length >= 64) {
          theTextBox.focus();
          theTextBox.select();
          return false;
          
        } else {
          RE1 = new RegExp('[^A-Z]')
          RE2 = new RegExp('[^a-z]')
          RE3 = new RegExp('[^-]')
          RE4 = new RegExp('[^0-9]')
          RE5 = new RegExp('[-]')
          
          len = word[i].length
          j = 0
          
          while (j < len) {
          
            chr = word[i].substring(j,j + 1);
            
            // 'A〜Z','a〜z','-','0〜9'以外の文字が使用されていないかチェック
            if (RE1.test(chr)) {
              if (RE2.test(chr)) {
                if (RE3.test(chr)) {
                  if (RE4.test(chr)) {
                    theTextBox.focus();
                    theTextBox.select();
                    return false;
                  }
                }
              }
            }
            
            // '-'が先頭または末尾に使用されていないかチェック
            if ((j == 0 || j == len - 1) && RE5.test(chr)) {
              theTextBox.focus();
              theTextBox.select();
              return false;
            }
            
            j += 1;
            
          }
          
        }
        
      }
      
    }
    
    // ユーザー名チェック
    if (UsrNam == ''){
      theTextBox.focus();
      theTextBox.select();
      return false;
      
    } else {
      len = UsrNam.length;
      
      for (i = 0; i < len; i++) {
      
        ChrCod = UsrNam.charCodeAt(i)
      
        if (ChrCod < 0 || 127 < ChrCod) {
          theTextBox.focus();
          theTextBox.select();
          return false;
        }
        
      }
      
    }
    
    return true;
    
  }
  
	//--------------------------------------------------------------------------------------------

	//未入力チェック
	function CheckEmpty(Obj, MsgStr){
	
		if(Obj.value == ''){
		
			alert(MsgStr + 'が未入力です。');
			Obj.focus();

			return false;

		}

		return true;
	
	}
	
	//--------------------------------------------------------------------------------------------  
  
//-->
