//キーワード整形
function PastSearchConst() {
  var w_Keyword = document.frmpastsearch.cirestriction_txt.value;
  var w_Condition;
  var i;
  if (document.frmpastsearch.condition.length) {
    for (i = 0; i < document.frmpastsearch.condition.length; i++) {
      if (document.frmpastsearch.condition[i].checked) {
        w_Condition = document.frmpastsearch.condition[i].value;
      }
    }
  } else {
    w_Condition = document.frmpastsearch.condition.value;
  }
  w_Keyword = w_Keyword.replace(/^[ 　]*/gim, "");
  w_Keyword = w_Keyword.replace(/[ 　]*$/gim, "");
  w_Keyword = w_Keyword.replace(/[　]/gim, " ");
  w_Keyword = w_Keyword.replace(/ {2,}/gim, " ");
  w_Keyword = w_Keyword.replace(/[ ]/gim, "\" " + w_Condition + " \"");
  document.frmpastsearch.cirestriction.value = "\"" + w_Keyword + "\"";
  return true;
}

