function $id(a) {
  return document.getElementById(a);
}
function fTrim(a) {
  return a.replace(/(^\s*)|(\s*$)/g, "").replace(/(^　*)|(　*$)/g, "");
}
function fParseMNum(a) {
  var b = fTrim(a);
  return /^0?(13|14|15|18)\d{9}$/.test(b);
}

function fEventListen(b, c, d, a) {
  a = !!a;
  if (b.addEventListener) {
    b.addEventListener(c, d, a);
  } else {
    if (b.attachEvent) {
      b.attachEvent("on" + c, d);
    }
  }
}
function fEventUnlisten(b, c, d, a) {
  a = !!a;
  if (b.removeEventListener) {
    b.removeEventListener(c, d, a);
  } else {
    if (b.detachEvent) {
      b.detachEvent("on" + c, d);
    }
  }
}
function fResize() {
  var c = document.body.offsetHeight,
  b = document.documentElement.clientHeight,
  a;
  if (c > b) {
    a = c;
  } else {
    a = b;
  }
  $id("mask").style.height = a + "px";
}
