function Calendar(options) {
  this.inputElement = options.inputElement;
  var that = this;

  insertToDOM();

  function createRootElement() {
    var rootElement = document.createElement('div');

    var headerTable = document.createElement('table');
    var headerTableTr = document.createElement('tr');
    var headerTableTd1 = document.createElement('td'),
        headerTableTd2 = document.createElement('td'),
        headerTableTd3 = document.createElement('td');

    var todayObject = Calendar.utils.getToday();
    headerTableTd1.className = 'rangeIndicator';
    headerTableTd1.innerHTML = todayObject.year + '年' + todayObject.month + '月';

    headerTableTd2.innerHTML = '&uarr;';
    headerTableTd3.innerHTML = '&darr;';

    headerTableTr.appendChild(headerTableTd1);
    headerTableTr.appendChild(headerTableTd2);
    headerTableTr.appendChild(headerTableTd3);

    headerTable.appendChild(headerTableTr);

    var dateTable = document.createElement('table'),
        dateTableThead = document.createElement('tr');

    dateTableThead.innerHTML = '<td>一</td><td>二</td><td>三</td><td>四</td><td>五</td><td>六</td><td>日</td>';

    dateTable.appendChild(dateTableThead);



    rootElement.appendChild(headerTable);
    rootElement.appendChild(dateTable);
    return rootElement;
  }

  function insertToDOM() {
    var rootElement = createRootElement();
    Calendar.utils.insertAfter(rootElement, that.inputElement);
  }
}

Calendar.utils = {
  insertAfter: function(newElement, targetElement) {
    targetElement.parentNode.insertBefore(newElement, targetElement.nextSibling);
  },
  getToday: function() {
    var today = new Date();
    return {
      year: today.getFullYear(),
      month: today.getMonth() + 1,
      day: today.getDate()
    }
  }
};
@@ -149,44 +149,59 @@
 var 
-rootElement = document.create
+tag = Calendar.utils.tag;%0A    var root
 Element
+ = tag
 ('di
@@ -228,38 +228,19 @@
 Table = 
-document.createElement
+tag
 ('table'
@@ -266,38 +266,19 @@
 bleTr = 
-document.createElement
+tag
 ('tr');%0A
@@ -302,38 +302,19 @@
 leTd1 = 
-document.createElement
+tag
 ('td'),%0A
@@ -338,38 +338,19 @@
 leTd2 = 
-document.createElement
+tag
 ('td'),%0A
@@ -374,38 +374,19 @@
 leTd3 = 
-document.createElement
+tag
 ('td');%0A
@@ -856,38 +856,19 @@
 Table = 
-document.createElement
+tag
 ('table'
@@ -899,30 +899,11 @@
 d = 
-document.createElement
+tag
 ('tr
@@ -1637,14 +1637,90 @@
 )%0A    %7D%0A
+  %7D,%0A  tag: function(tagName) %7B%0A    return document.createElement(tagName);%0A
   %7D%0A%7D;

Update calendar.js