var MSIE = navigator.userAgent.indexOf("MSIE");
var noClear;
if (MSIE != -1) {
  MSIE += 5;
  var c = navigator.userAgent.charAt(MSIE);
  MSIE = (c < "0" || c > "9")? 0:
      parseInt(navigator.userAgent.substring(MSIE, navigator.userAgent.length));
  noClear = (MSIE < 4);
} else {
  MSIE = noClear = 0;
}
function ClearButton(name)
{
  if (noClear) return;
  var obj = "document.forms[0].elements['"+name+"']";
  document.writeln('<input type="button" class="b2" ',
                    'onclick="', obj, ".value = ''; ", obj, '.focus()" ',
                    'onkeypress="', obj, ".value = ''; ", obj, '.focus()" ',
                    'value="クリア">');
}

