/**
 * @author Matthew Foster
 * @date   December 27th 2007
 */
	var LabeledCalendar = Class.create();
	
	Object.extend(Object.extend(LabeledCalendar.prototype, CalendarSelect.prototype),
					{	
            DOW : ["Mo","Di","Mi","Do","Fr","Sa","So"],
            								
						initialize : function(){
							
							CalendarSelect.prototype.initialize.apply(this, arguments);
							
							this.injectHeader(this.createDow());
							this.injectHeader(this.createHeader());
							
						
						},
						createHeader : function(){
							
							var headerRow = $C("tr", { className : "header"});
							var headerCell = $C("th", {  innerHTML : this.range.MONTH_MAP[this.range.getDate().getMonth()] + ", " + this.range.getDate().getFullYear() });
							headerRow.appendChild(headerCell);							
							headerCell.setAttribute("colSpan", this.options.weekLength);

							return headerRow;					
										
						},
						createDow : function(){
							
							
							var row = $C("tr", { className : "dow"});
							this.DOW.each(function(itr){
											row.appendChild($C("td", { innerHTML : itr }));
										});
							return row;					
										
						},
						injectHeader : function(header){
							
							try{
								this.tbody.insertBefore(header, this.tbody.firstChild);								
							}
							catch(e){
								try{
									this.table.insertBefore(header, this.table.firstChild);								
								}
								catch(e2){
									this.table.appendChild(header);
								}							
							}						
						}
					}
				);
		