protected void createEmptyTemplate(Node o) {
        Table t = (Table) o; // for convenience
        t.appendChild(writeDaysOfWeekHeader()); 
        t.appendChild(new Thead().appendText(key));

        Calendar cal = Calendar.getInstance();
        cal.set(Integer.parseInt(key.substring(0, 4)),
                Integer.parseInt(key.substring(4, 6)) - 1, 1);
        int totaldays = cal.getActualMaximum(Calendar.DAY_OF_MONTH); // gets
                                                                     // last day
                                                                     // of month
        int firstday = cal.get(Calendar.DAY_OF_WEEK); // gets first day of month
        int j = firstday;

        Tr tr = new Tr();
        while (j > 1) { // block off previous month days
            tr.appendChild(blockTd("gray"));
            j -= 1;
        }
        for (int i = 1; i <= totaldays; i++) {
            //end of week, start new row
            if ((((i + firstday - 2) % 7) == 0) && (tr.children.size() != 0)) {
                t.appendChild(tr);
                tr = new Tr();
            }
            tr.appendChild(blockTd("white").appendText("" + i));
        }
        //block off next month days
        while (((totaldays + firstday - 1) % 7) != 0) {
            tr.appendChild(blockTd("gray"));
            totaldays += 1;
        }
        t.appendChild(tr);
    }