﻿// PathInfoをエンコードするための関数
function EncodePathInfo(pathInfo) {
  var plain  = pathInfo.substring(0, pathInfo.indexOf(".aspx") + 6);
  var encode = pathInfo.substring(plain.length);
  encode = encodeURIComponent(encode);
  encode = encode.replace(".", "[00]");
  var matches = encode.match(/(%[0-9A-F]{2})/g);
  for (var i = 0; i<matches.length; i++) {
    encode = encode.replace(matches[i], matches[i].toLowerCase());
  }
  return plain + encode;
}