// byteを数える
function CountByte(param1){
  p1_len = param1.length;
  byte_count = 0;

  for(_i=0; _i<p1_len; _i++){
    Chr=escape(param1.charAt(_i));
    if (Chr.length<4) // 半角は %nn なので３文字
      byte_count++;
    else
      byte_count+=2;
  }
  return byte_count;
}
