? calendar-multi-day.patch
Index: calendar-overlap.css
===================================================================
RCS file: calendar-overlap.css
diff -N calendar-overlap.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ calendar-overlap.css	2 Nov 2010 00:37:50 -0000
@@ -0,0 +1,803 @@
+/** Overlapping week items **/
+.calendar-calendar tr.holder {
+  height : 0px;
+   display: table-row !important;
+   display : none;
+}
+
+.calendar-calendar .week-view .full div.item-wrapper, 
+.calendar-calendar .day-view .full div.item-wrapper {
+  background-color: none;
+  border:0px;
+  float:none;
+  margin:0px;
+  width : 100%;
+  margin-top : -24px;
+}
+
+.calendar-calendar td .inner div, 
+.calendar-calendar td .inner div a {
+	 background : none;
+}
+
+.calendar-calendar .week-view .full div.single-day div.weekview,
+.calendar-calendar .day-view .full div.single-day div.dayview {
+  background : #FFD8C0;
+  width : auto;
+  padding : 0px 3px;
+  overflow : hidden;
+}
+
+.calendar-calendar .week-view .full div.single-day div.weekview,
+.calendar-calendar .day-view .full div.single-day div.dayview {
+	  border : 1px solid #E39364;
+}
+
+
+.calendar-calendar .week-view .header-body-divider,
+.calendar-calendar .week-view .single-day-footer,
+.calendar-calendar .day-view .single-day-footer,
+.calendar-calendar .day-view .header-body-divider {
+	background : #eeeeee;
+  border-left : 1px solid #CCCCCC;
+  border-right : 1px solid #CCCCCC;
+  font-size : 1px;
+  height : 4px;
+  line-height : 1px;
+}
+
+.calendar-calendar .week-view #multi-day-container,
+.calendar-calendar .week-view #single-day-container,
+.calendar-calendar .day-view #multi-day-container,
+.calendar-calendar .day-view #single-day-container {
+	position : relative;
+	background : #ffffff;
+	overflow-y : scroll;
+	overflow-x : hidden;
+  border-left : 1px solid #CCCCCC;
+  border-bottom : 1px solid #CCCCCC;
+}
+
+.calendar-calendar .week-view #multi-day-container,
+.calendar-calendar .day-view #multi-day-container {
+	  border-top : 1px solid #CCCCCC;
+}
+
+.calendar-calendar .week-view #week-header-container,
+.calendar-calendar .day-view #day-header-container {
+	width : 100%;
+	background : #ffffff;
+  border-bottom : 1px solid #CCCCCC;
+}
+
+.calendar-calendar .week-view #multi-day-container,
+.calendar-calendar .day-view #multi-day-container {
+	height : 57px;
+}
+
+.calendar-calendar .week-view #multi-day-container .expand {
+  height : 100%;
+}
+
+.calendar-calendar .week-view #multi-day-container table,
+.calendar-calendar .day-view #multi-day-container table {
+	height : 100%;
+}
+
+.calendar-calendar .week-view #multi-day-container table td,
+.calendar-calendar .day-view #multi-day-container table td {
+	border-top : 0px;
+  border-bottom : 0px;
+  vertical-align : top;
+}
+
+.calendar-calendar .week-view #single-day-container,
+.calendar-calendar .day-view #single-day-container {
+	border-top : 1px solid #CCCCCC;
+	height : 500px;
+}
+
+.calendar-calendar .week-view #single-day-container table td,
+.calendar-calendar .day-view #single-day-container table td {
+	padding : 0px;
+	border-top : 0px;
+	border-bottom : 0px;
+}
+
+.calendar-calendar .week-view #single-day-container table td.first,
+.calendar-calendar .day-view #single-day-container table td.first {
+  border-left : 0px;
+}
+
+.calendar-calendar .week-view #single-day-container table td.last,
+.calendar-calendar .day-view #single-day-container table td.last {
+	 border-right : 0px;
+}
+
+.calendar-calendar .week-view #single-day-container div.first,
+.calendar-calendar .day-view #single-day-container div.first {
+  border-top : 0px;
+}
+
+.calendar-calendar .week-view #single-day-container div.last,
+.calendar-calendar .day-view #single-day-container div.last {
+   border-bottom : 0px;
+}
+
+.calendar-calendar .week-view table.full {
+	table-layout : fixed;
+	width : 925px;
+	margin : 0px;
+}
+
+.calendar-calendar .day-view table.full {
+  table-layout : fixed;
+  width : 923px;
+  margin : 0px;
+}
+
+.calendar-calendar td.calendar-agenda-hour .calendar-hour,
+.calendar-calendar td.calendar-agenda-hour .calendar-ampm,
+.calendar-calendar .week-view .full div.calendar-agenda-hour span,
+.calendar-calendar .day-view .full div.calendar-agenda-hour span {
+  font-size : .8em;
+  font-weight : normal;
+  margin-right: 0px;
+}
+
+.calendar-calendar .week-view .full div.calendar-agenda-hour,
+.calendar-calendar .day-view .full div.calendar-agenda-hour,
+.calendar-calendar .week-view .full div.calendar-agenda-items,
+.calendar-calendar .day-view .full div.calendar-agenda-items  {
+  width : 100%;
+  height : 47px;
+  border-top : 1px solid #cccccc;
+}
+
+.calendar-calendar .week-view .full .calendar-agenda-hour div,
+.calendar-calendar .day-view .full .calendar-agenda-hour div {
+	margin-top : 10px;
+}
+
+.calendar-calendar .day-view .full td.calendar-time-holder,
+.calendar-calendar .week-view .full td.calendar-time-holder {
+	width : 50px;
+  padding : 0px;
+  border : 0px;
+}
+
+.calendar-calendar .week-view .full td.calendar-day-holder {
+	padding : 0px;
+  border : 0px;
+	width : 125px;
+}
+
+.calendar-calendar .day-view .full td.calendar-day-holder {
+  padding : 0px;
+  border : 0px;
+  width : 873px;
+}
+
+.calendar-calendar .week-view .full div.single-day,
+.calendar-calendar .day-view .full div.single-day { 
+  padding : 0px;
+}
+
+.calendar-calendar .week-view .full div.single-day .inner,
+.calendar-calendar .day-view .full div.single-day .inner { 
+	position : absolute;
+  z-index : 1;
+}
+
+.calendar-calendar .week-view .full td.multi-day {
+	padding : 1px 2px 0px 2px;
+}
+
+.calendar-calendar .day-view .full td.multi-day div.dayview,
+.calendar-calendar .week-view .full td.multi-day div.weekview {
+	height : 22px !important;
+}
+
+.calendar-calendar .day-view .full td.multi-day .calendar.dayview .view-field,
+.calendar-calendar .week-view .full td.multi-day .calendar.weekview .view-field {
+  display : inline;
+}
+
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .continuation {
+  height : 22px;
+  padding-top: 0px;
+  margin-right : 3px;
+}
+
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .continues,
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .cutoff,
+.calendar-calendar .day-view .full td.multi-day .inner .dayview .continues,
+.calendar-calendar .day-view .full td.multi-day .inner .dayview .cutoff {
+	height : 22px;
+  padding-top: 0px;
+}
+
+.calendar-calendar .week-view div.single-day .view-item,
+.calendar-calendar .day-view div.single-day .view-item {
+  position : absolute;
+  width : 100%;
+  background : none;
+  text-align : left;
+  z-index : 1;
+}
+
+.calendar-calendar .week-view div.single-day .half-hour,
+.calendar-calendar .day-view div.single-day .half-hour {
+	font-size : 1px;
+	height : 23px;
+	width : 100%;
+	position :relative;
+	z-index : 0;
+	top : 0px;
+	border-bottom : 1px dotted #cccccc;
+}
+
+.calendar-calendar .week-view div.single-day .view-item .calendar,
+.calendar-calendar .day-view div.single-day .view-item .calendar {
+  margin : 0px;
+}
+
+.calendar-calendar .week-view div.single-day .view-item .contents,
+.calendar-calendar .day-view div.single-day .view-item .contents {
+  overflow : hidden;
+}
+
+.calendar-calendar div.single-day .o_0 .view-item {
+  top : 0px;
+}
+
+.calendar-calendar div.single-day .o_1 .view-item {
+  top : 12px;
+}
+
+.calendar-calendar div.single-day .o_2 .view-item {
+  top : 24px;
+}
+
+.calendar-calendar div.single-day .o_3 .view-item {
+  top : 36px;
+}
+
+.calendar-calendar div.single-day .o_4 .view-item {
+  top : 40px;
+}
+
+.calendar-calendar div.single-day .d_1 .view-item .calendar {
+  height : 10px;
+}
+
+
+.calendar-calendar div.single-day .d_2 .view-item .calendar {
+  height : 22px;
+}
+
+
+.calendar-calendar div.single-day .d_3 .view-item .calendar {
+  height : 34px;
+}
+
+
+.calendar-calendar div.single-day .d_4 .view-item .calendar {
+  height : 46px;
+}
+
+
+.calendar-calendar div.single-day .d_5 .view-item .calendar {
+  height : 58px;
+}
+
+
+.calendar-calendar div.single-day .d_6 .view-item .calendar {
+  height : 70px;
+}
+
+
+.calendar-calendar div.single-day .d_7 .view-item .calendar {
+  height : 82px;
+}
+
+
+.calendar-calendar div.single-day .d_8 .view-item .calendar {
+  height : 94px;
+}
+
+
+.calendar-calendar div.single-day .d_9 .view-item .calendar {
+  height : 106px;
+}
+
+
+.calendar-calendar div.single-day .d_10 .view-item .calendar {
+  height : 118px;
+}
+
+
+.calendar-calendar div.single-day .d_11 .view-item .calendar {
+  height : 130px;
+}
+
+
+.calendar-calendar div.single-day .d_12 .view-item .calendar {
+  height : 142px;
+}
+
+
+.calendar-calendar div.single-day .d_13 .view-item .calendar {
+  height : 154px;
+}
+
+
+.calendar-calendar div.single-day .d_14 .view-item .calendar {
+  height : 166px;
+}
+
+
+.calendar-calendar div.single-day .d_15 .view-item .calendar {
+  height : 178px;
+}
+
+
+
+.calendar-calendar div.single-day .d_16 .view-item .calendar {
+  height : 190px;
+}
+
+
+.calendar-calendar div.single-day .d_17 .view-item .calendar {
+  height : 202px;
+}
+
+.calendar-calendar div.single-day .d_18 .view-item .calendar {
+  height : 214px;
+}
+
+.calendar-calendar div.single-day .d_19 .view-item .calendar {
+  height : 226px;
+}
+
+.calendar-calendar div.single-day .d_20 .view-item .calendar {
+  height : 238px;
+}
+
+.calendar-calendar div.single-day .d_21 .view-item .calendar {
+  height : 250px;
+}
+
+.calendar-calendar div.single-day .d_22 .view-item .calendar {
+  height : 262px;
+}
+
+.calendar-calendar div.single-day .d_23 .view-item .calendar {
+  height : 274px;
+}
+
+.calendar-calendar div.single-day .d_24 .view-item .calendar {
+  height : 286px;
+}
+
+.calendar-calendar div.single-day .d_25 .view-item .calendar {
+  height : 298px;
+}
+
+.calendar-calendar div.single-day .d_26 .view-item .calendar {
+  height : 310px;
+}
+
+.calendar-calendar div.single-day .d_27 .view-item .calendar {
+  height : 322px;
+}
+
+.calendar-calendar div.single-day .d_28 .view-item .calendar {
+  height : 334px;
+}
+
+.calendar-calendar div.single-day .d_29 .view-item .calendar {
+  height : 346px;
+}
+
+.calendar-calendar div.single-day .d_30 .view-item .calendar {
+  height : 358px;
+}
+
+.calendar-calendar div.single-day .d_31 .view-item .calendar {
+  height : 370px;
+}
+
+.calendar-calendar div.single-day .d_32 .view-item .calendar {
+  height : 382px;
+}
+
+.calendar-calendar div.single-day .d_33 .view-item .calendar {
+  height : 394px;
+}
+
+.calendar-calendar div.single-day .d_34 .view-item .calendar {
+  height : 406px;
+}
+
+.calendar-calendar div.single-day .d_35 .view-item .calendar {
+  height : 418px;
+}
+
+.calendar-calendar div.single-day .d_36 .view-item .calendar {
+  height : 430px;
+}
+
+.calendar-calendar div.single-day .d_37 .view-item .calendar {
+  height : 442px;
+}
+
+.calendar-calendar div.single-day .d_38 .view-item .calendar {
+  height : 454px;
+}
+
+.calendar-calendar div.single-day .d_39 .view-item .calendar {
+  height : 466px;
+}
+
+.calendar-calendar div.single-day .d_40 .view-item .calendar {
+  height : 478px;
+}
+
+.calendar-calendar div.single-day .d_41 .view-item .calendar {
+  height : 490px;
+}
+
+.calendar-calendar div.single-day .d_42 .view-item .calendar {
+  height : 502px;
+}
+
+.calendar-calendar div.single-day .d_43 .view-item .calendar {
+  height : 514px;
+}
+
+.calendar-calendar div.single-day .d_44 .view-item .calendar {
+  height : 526px;
+}
+
+.calendar-calendar div.single-day .d_45 .view-item .calendar {
+  height : 538px;
+}
+
+.calendar-calendar div.single-day .d_46 .view-item .calendar {
+  height : 550px;
+}
+
+.calendar-calendar div.single-day .d_47 .view-item .calendar {
+  height : 562px;
+}
+
+.calendar-calendar div.single-day .d_48 .view-item .calendar {
+  height : 574px;
+}
+
+.calendar-calendar div.single-day .d_49 .view-item .calendar {
+  height : 586px;
+}
+
+.calendar-calendar div.single-day .d_50 .view-item .calendar {
+  height : 598px;
+}
+
+.calendar-calendar div.single-day .d_51 .view-item .calendar {
+  height : 610px;
+}
+
+.calendar-calendar div.single-day .d_52 .view-item .calendar {
+  height : 622px;
+}
+
+.calendar-calendar div.single-day .d_53 .view-item .calendar {
+  height : 634px;
+}
+
+.calendar-calendar div.single-day .d_54 .view-item .calendar {
+  height : 646px;
+}
+
+.calendar-calendar div.single-day .d_55 .view-item .calendar {
+  height : 658px;
+}
+
+.calendar-calendar div.single-day .d_56 .view-item .calendar {
+  height : 670px;
+}
+
+.calendar-calendar div.single-day .d_57 .view-item .calendar {
+  height : 682px;
+}
+
+.calendar-calendar div.single-day .d_58 .view-item .calendar {
+  height : 694px;
+}
+
+.calendar-calendar div.single-day .d_59 .view-item .calendar {
+  height : 706px;
+}
+
+.calendar-calendar div.single-day .d_60 .view-item .calendar {
+  height : 718px;
+}
+
+.calendar-calendar div.single-day .d_61 .view-item .calendar {
+  height : 730px;
+}
+
+.calendar-calendar div.single-day .d_62 .view-item .calendar {
+  height : 742px;
+}
+
+.calendar-calendar div.single-day .d_63 .view-item .calendar {
+  height : 754px;
+}
+
+.calendar-calendar div.single-day .d_64 .view-item .calendar {
+  height : 766px;
+}
+
+.calendar-calendar div.single-day .d_65 .view-item .calendar {
+  height : 778px;
+}
+
+.calendar-calendar div.single-day .d_66 .view-item .calendar {
+  height : 790px;
+}
+
+.calendar-calendar div.single-day .d_67 .view-item .calendar {
+  height : 802px;
+}
+
+.calendar-calendar div.single-day .d_68 .view-item .calendar {
+  height : 814px;
+}
+
+.calendar-calendar div.single-day .d_69 .view-item .calendar {
+  height : 826px;
+}
+
+.calendar-calendar div.single-day .d_70 .view-item .calendar {
+  height : 838px;
+}
+
+.calendar-calendar div.single-day .d_71 .view-item .calendar {
+  height : 850px;
+}
+
+.calendar-calendar div.single-day .d_72 .view-item .calendar {
+  height : 862px;
+}
+
+.calendar-calendar div.single-day .d_73 .view-item .calendar {
+  height : 874px;
+}
+
+.calendar-calendar div.single-day .d_74 .view-item .calendar {
+  height : 886px;
+}
+
+.calendar-calendar div.single-day .d_75 .view-item .calendar {
+  height : 898px;
+}
+
+.calendar-calendar div.single-day .d_76 .view-item .calendar {
+  height : 910px;
+}
+
+.calendar-calendar div.single-day .d_77 .view-item .calendar {
+  height : 922px;
+}
+
+.calendar-calendar div.single-day .d_78 .view-item .calendar {
+  height : 934px;
+}
+
+.calendar-calendar div.single-day .d_79 .view-item .calendar {
+  height : 946px;
+}
+
+.calendar-calendar div.single-day .d_80 .view-item .calendar {
+  height : 958px;
+}
+
+.calendar-calendar div.single-day .d_81 .view-item .calendar {
+  height : 970px;
+}
+
+.calendar-calendar div.single-day .d_82 .view-item .calendar {
+  height : 982px;
+}
+
+.calendar-calendar div.single-day .d_83 .view-item .calendar {
+  height : 994px;
+}
+
+.calendar-calendar div.single-day .d_84 .view-item .calendar {
+  height : 1006px;
+}
+
+.calendar-calendar div.single-day .d_85 .view-item .calendar {
+  height : 1018px;
+}
+
+.calendar-calendar div.single-day .d_86 .view-item .calendar {
+  height : 1030px;
+}
+
+.calendar-calendar div.single-day .d_87 .view-item .calendar {
+  height : 1042px;
+}
+
+.calendar-calendar div.single-day .d_88 .view-item .calendar {
+  height : 1054px;
+}
+
+.calendar-calendar div.single-day .d_89 .view-item .calendar {
+  height : 1066px;
+}
+
+.calendar-calendar div.single-day .d_90 .view-item .calendar {
+  height : 1078px;
+}
+
+.calendar-calendar div.single-day .d_91 .view-item .calendar {
+  height : 1090px;
+}
+
+.calendar-calendar div.single-day .d_92 .view-item .calendar {
+  height : 1102px;
+}
+
+.calendar-calendar div.single-day .d_93 .view-item .calendar {
+  height : 1114px;
+}
+
+.calendar-calendar div.single-day .d_94 .view-item .calendar {
+  height : 1128px;
+}
+
+.calendar-calendar div.single-day .d_95 .view-item .calendar {
+  height : 1140px;
+}
+
+.calendar-calendar div.single-day .d_96 .view-item .calendar {
+  height : 1152px;
+}
+
+.calendar-calendar .week-view div.single-day .i_0 .view-item .calendar {
+  margin-left : 0px;
+  width : 55px;
+}
+
+.calendar-calendar .week-view div.single-day .i_1 .view-item .calendar {
+  margin-left : 15px;
+  width : 102px;
+}
+
+.calendar-calendar .week-view div.single-day .i_2 .view-item .calendar {
+  margin-left : 23px;
+  width : 94px;
+}
+
+.calendar-calendar .week-view div.single-day .i_3 .view-item .calendar {
+  margin-left : 29px;
+  width : 88px;
+}
+
+.calendar-calendar .week-view div.single-day .i_4 .view-item .calendar {
+  margin-left : 40px;
+  width : 77px;
+}
+
+.calendar-calendar .week-view div.single-day .i_5 .view-item .calendar {
+  margin-left : 50px;
+  width : 67px;
+}
+
+.calendar-calendar .week-view div.single-day .i_6 .view-item .calendar {
+  margin-left : 60px;
+  width : 57px;
+}
+
+.calendar-calendar .week-view div.single-day .i_7 .view-item .calendar {
+  margin-left : 67px;
+  width : 50px;
+}
+
+.calendar-calendar .week-view div.single-day .i_8 .view-item .calendar {
+  margin-left : 75px;
+  width : 42px;
+}
+
+.calendar-calendar .week-view div.single-day .i_9 .view-item .calendar {
+  margin-left : 90px;
+  width : 27px;
+}
+
+.calendar-calendar .week-view div.single-day .i_0.md_0 .view-item .calendar {
+    width : 115px !important;
+    width : auto;
+}
+
+.calendar-calendar .week-view div.single-day .i_0.md_1 .view-item .calendar {
+    width : 75px !important;
+    width : auto;
+}
+
+.calendar-calendar .day-view div.single-day .i_0 .view-item .calendar {
+  margin-left : 2px;
+  width : 210px !important;
+  width : 838px;
+}
+
+.calendar-calendar .day-view div.single-day .i_1 .view-item .calendar {
+  margin-left : 90px;
+  width : 750px;
+}
+
+.calendar-calendar .day-view div.single-day .i_2 .view-item .calendar {
+  margin-left : 180px;
+  width : 660px;
+}
+
+.calendar-calendar .day-view div.single-day .i_3 .view-item .calendar {
+  margin-left : 270px;
+  width : 570px;
+}
+
+.calendar-calendar .day-view div.single-day .i_4 .view-item .calendar {
+  margin-left : 360px;
+  width : 480px;
+}
+
+.calendar-calendar .day-view div.single-day .i_5 .view-item .calendar {
+  margin-left : 450px;
+  width : 390px;
+}
+
+.calendar-calendar .day-view div.single-day .i_6 .view-item .calendar {
+  margin-left : 540px;
+  width : 300px;
+}
+
+.calendar-calendar .day-view div.single-day .i_7 .view-item .calendar {
+  margin-left : 630px;
+  width : 210px;
+}
+
+.calendar-calendar .day-view div.single-day .i_8 .view-item .calendar {
+  margin-left : 720px;
+  width : 120px;
+}
+
+.calendar-calendar .day-view div.single-day .i_9 .view-item .calendar {
+  margin-left : 810px;
+  width : 30px;
+}
+
+.calendar-calendar .day-view div.single-day .i_0.md_0 .view-item .calendar {
+    width : 838px !important;
+    width : auto;
+}
+
+.calendar-calendar .day-view div.single-day .i_0.md_1 .view-item .calendar {
+    width : 419px !important;
+    width : auto;
+}
+
+.calendar-calendar .day-view div.single-day .i_0.md_2 .view-item .calendar {
+    width : 350px !important;
+    width : auto;
+}
+
+.single-day-footer .grippie,
+.header-body-divider .grippie {
+  overflow: hidden;
+  background: #eee url(/misc/grippie.png) no-repeat center 2px;
+  cursor: s-resize;
+  height : 3px;
+}
Index: calendar.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/calendar.css,v
retrieving revision 1.30.2.23
diff -u -p -r1.30.2.23 calendar.css
--- calendar.css	14 Feb 2009 20:07:59 -0000	1.30.2.23
+++ calendar.css	2 Nov 2010 00:37:51 -0000
@@ -34,15 +34,11 @@
   background-color: white;
 }
 .calendar-calendar th {
-  color: #fff;
-  background-color: #ccc;
   text-align: center;
   margin:0;
 }
 .calendar-calendar th a {
   font-weight: bold;
-  color: #fff;
-  background-color: #ccc;
 }
 .calendar-calendar td {
   width: 12%; /* 14% is about 1/7 of total table width */
@@ -77,7 +73,6 @@
 
 /* IE6 does not support min-height, using Min-Height fast hack from http://www.dustindiaz.com/min-height-fast-hack */
 .calendar-calendar .inner {
-  min-height:5em;
   height:auto !important;
   height:5em;
   padding:0;
@@ -230,10 +225,9 @@ table.calendar-legend tr.even .stripe {
 
 /* formatting for the full day view */  
 .calendar-calendar td.calendar-agenda-hour {
-  font-family:serif;
   text-align:right;
   border:none;
-  border-top:1px #333 dotted;
+  border-top:1px solid #CCCCCC;
   padding-top:.25em;
   width:1%;
 }
@@ -248,7 +242,7 @@ table.calendar-legend tr.even .stripe {
   font-size:1em;
 }
 .calendar-calendar td.calendar-agenda-items {
-  border:1px #333 dotted;
+  border:1px solid #CCCCCC;
   text-align:left;
 }
 .calendar-calendar td.calendar-agenda-items div.calendar {
@@ -298,6 +292,7 @@ table.calendar-legend tr.even .stripe {
 .calendar-calendar div.date-nav a, 
 .calendar-calendar div.date-nav h3 {
   color:#777;
+  text-decoration:none;
 }
 .calendar-calendar th.days {
   background-color:#eee;
@@ -333,7 +328,7 @@ table.calendar-legend tr.even .stripe {
 .calendar-calendar td .inner div.calendar div a {
   border:none;
   background:#ffc;
-  padding:0 2px;
+  padding:0;
 }
 .calendar-calendar td .inner div.calendar div.calendar-more,
 .calendar-calendar td .inner div.calendar div.calendar-more a {
@@ -362,11 +357,491 @@ table.calendar-legend tr.even .stripe {
   background-color:#C3D6E4;
 }
 .calendar-calendar td .inner div.calendar div div.view-data-node-data-field-date-field-date-value {
-  border-bottom:1px solid #ccc;
 }
 
 /* The following are not used by default but are available for themes */
 .calendar-calendar td.past {}
 .calendar-calendar td.future {}
 .calendar-calendar td.has-events {}
-.calendar-calendar td.has-no-events {}
\ No newline at end of file
+.calendar-calendar td.has-no-events {}
+
+/* Multi day styles */
+.calendar-calendar tbody {
+  border-top : none;
+}
+
+.calendar-calendar .month-view .full .inner,
+.calendar-calendar .week-view .full .multi-day .inner {
+  height : auto;
+  min-height : auto;
+}
+.calendar-calendar .week-view .full .calendar-agenda-hour
+.calendar-calendar .month-view .full .single-day .inner .view-item {
+  float : left;
+  width : 100%;
+}
+
+.calendar-calendar .week-view .full .calendar-agenda-hour {
+  width : 6%;
+  min-width : 0px;
+  padding-right : 2px;
+}
+
+.calendar-calendar .week-view .full .days {
+  width : 13%;
+}
+
+.calendar-calendar .month-view .full div.calendar,
+.calendar-calendar .week-view .full div.calendar,
+.calendar-calendar .day-view div.calendar {
+  width : auto;
+}
+
+.calendar-calendar .month-view .full tr.date-box,
+.calendar-calendar .month-view .full tr.date-box td,
+.calendar-calendar .month-view .full tr.multi-day,
+.calendar-calendar .month-view .full tr.multi-day td {
+	  height : 19px;
+    max-height : 19px;
+}
+  
+.calendar-calendar .month-view .full tr.single-day .no-entry,
+.calendar-calendar .month-view .full tr.single-day .no-entry .inner {
+  height : 44px !important;
+  line-height : 44px;
+  font-size : 1px;
+}
+  
+.calendar-calendar .month-view .full tr.single-day .noentry-multi-day,
+.calendar-calendar .month-view .full tr.single-day .noentry-multi-day .inner {
+	height : 22px !important;
+  line-height : 22px;
+  font-size : 1px;
+}
+  
+.calendar-calendar .month-view .full td,
+.calendar-calendar .week-view .full td,
+.calendar-calendar .day-view  td {
+  vertical-align: top;
+  padding :1px 2px 0 2px
+}
+
+.calendar-calendar .month-view .full td.date-box { 
+  height : 1%;
+  border-bottom: 0px;
+  padding-bottom : 2px;
+}
+
+
+.calendar-calendar .month-view .full .week {
+  font-size : inherit;
+}
+
+.calendar-calendar .month-view .full .week a,
+.calendar-calendar .week-view .full .week a {
+  color:#4b85ac;
+}
+
+.calendar-calendar .month-view .full td .inner div.day,
+.calendar-calendar .month-view .full td .inner div.day a {
+   border :none;
+   background : none;
+   margin-bottom: 0px;
+}
+
+.calendar-calendar .month-view .full td.date-box .inner, 
+.calendar-calendar .week-view .full td.date-box .inner { 
+    min-height : inherit;
+}
+
+.calendar-calendar .month-view .full td.multi-day,
+.calendar-calendar .week-view .full td.multi-day { 
+  border-top: 0px;
+  border-bottom: 0px;
+}
+
+.calendar-calendar .week-view .full .first td.multi-day {
+  border-top : 1px solid #CCCCCC;
+}
+
+.calendar-calendar .month-view .full td.single-day { 
+  border-top: 0px;
+}
+
+.calendar-calendar .month-view .full td.multi-day .inner,
+.calendar-calendar .week-view .full td.multi-day .inner,
+.calendar-calendar .day-view .full td.multi-day .inner { 
+  min-height : inherit;
+  width : auto;
+  position : relative;
+}
+
+.calendar-calendar .month-view .full td.multi-day.no-entry {
+  min-height : 0px;
+}
+
+.calendar-calendar .month-view .full td.single-day .calendar-empty,
+.calendar-calendar .month-view .full td.single-day.empty,
+.calendar-calendar .month-view .full td.date-box.empty {
+  background : #F4F4F4;
+}
+
+.calendar-calendar .month-view .full td.single-day .inner div, 
+.calendar-calendar .month-view .full td.single-day .inner div a ,
+.calendar-calendar .month-view .full td.multi-day .inner div, 
+.calendar-calendar .month-view .full td.multi-day .inner div a ,
+.calendar-calendar .month-view .full td .inner div.calendar.monthview div, 
+.calendar-calendar .month-view .full td .inner div.calendar.monthview div a,
+.calendar-calendar .week-view .full td.single-day .inner div, 
+.calendar-calendar .week-view .full td.single-day .inner div a ,
+.calendar-calendar .week-view .full td.multi-day .inner div, 
+.calendar-calendar .week-view .full td.multi-day .inner div a ,
+.calendar-calendar .week-view .full td .inner div.calendar.weekview div, 
+.calendar-calendar .week-view .full td .inner div.calendar.weekview div a,
+.calendar-calendar .day-view .full td .inner div.view-item, 
+.calendar-calendar .day-view .full td .inner div.calendar div, 
+.calendar-calendar .day-view .full td .inner div.calendar div a {
+  background : none;
+}
+
+.calendar-calendar .day-view .full td .inner div.calendar div, 
+.calendar-calendar .day-view .full td .inner div.calendar div a {
+  margin : 0px 3px;
+}
+
+.calendar-calendar .day-view .full td .inner div.calendar div.stripe {
+  margin : 0px;
+} 
+
+.calendar-calendar .month-view .full tr td.today, 
+.calendar-calendar .month-view .full tr.odd td.today, 
+.calendar-calendar .month-view .full tr.even td.today {
+  background: none;
+  border-left :2px solid #7C7F12;
+  border-right :2px solid #7C7F12;
+}
+
+.calendar-calendar .month-view .full td.date-box.today {
+  border-width : 2px 2px 0px 2px;
+  border-style: solid;
+  border-color : #7C7F12;
+}
+
+.calendar-calendar .month-view .full tr td.single-day.today {
+  border-bottom :2px solid #7C7F12;
+}
+
+.calendar-calendar .month-view .full tr td.multi-day.starts-today {
+  border-left :2px solid #7C7F12;
+}
+
+.calendar-calendar .month-view .full tr td.multi-day.ends-today {
+  border-right :2px solid #7C7F12;
+}
+
+.calendar-calendar .month-view .full tr td.multi-day,
+.calendar-calendar .month-view .full tr td.single-day {
+  border-top : 0px;
+}
+
+.calendar-calendar .month-view .full tr td.multi-day,
+.calendar-calendar .month-view .full tr td.date-box {
+  border-bottom : 0px;
+}
+
+.calendar-calendar .month-view .full .inner .monthview,
+.calendar-calendar .week-view .full .inner .weekview,
+.calendar-calendar .day-view .full .inner .dayview {
+  -moz-border-radius : 5px;
+  border-radius : 5px;
+  width : auto;
+  float : none;
+  display : block;
+  margin : .25em auto;
+  position : relative;
+}
+
+
+.calendar-calendar .month-view .full td.single-day div.monthview,
+.calendar-calendar .week-view .full td.single-day div.weekview,
+.calendar-calendar .day-view .full td.single-day div.dayview {
+  background : #FFD8C0;
+  width : auto;
+  padding : 0px 3px;
+  overflow : hidden;
+}
+
+.calendar-calendar .month-view .full td.single-day .calendar-more div.monthview {
+  background : none;
+}
+
+.calendar-calendar .day-view td div.dayview {
+  padding : 0px;
+}
+
+.calendar-calendar .month-view .full td.multi-day div.monthview,
+.calendar-calendar .week-view .full td.multi-day div.weekview,
+.calendar-calendar .day-view .full td.multi-day div.dayview {
+  background : #74a5d7;
+  height : 1.9em;
+  overflow : hidden;
+  margin : 0px auto;
+  color : #ffffff;
+  position : relative;
+}
+
+.calendar-calendar .week-view .full td.multi-day div.weekview {
+  height : 3.5em;
+}
+
+.calendar-calendar .month-view .full td.multi-day .inner .view-field, 
+.calendar-calendar .month-view .full td.multi-day .inner .view-field a,
+.calendar-calendar .week-view .full td.multi-day .inner .view-field, 
+.calendar-calendar .week-view .full td.multi-day .inner .view-field a,
+.calendar-calendar .day-view .full td.multi-day .inner .view-field, 
+.calendar-calendar .day-view .full td.multi-day .inner .view-field a {
+    color : #ffffff;
+}
+
+.calendar-calendar .full td.multi-day .calendar .view-field,
+.calendar-calendar .full td.single-day .calendar .view-field {
+}
+
+.calendar-calendar .day-view .full td.multi-day div.dayview,
+.calendar-calendar .week-view .full td.multi-day div.weekview {
+  margin-bottom: 2px;
+}
+
+.calendar-calendar .month-view .full td.multi-day .calendar.monthview .view-field {
+  white-space: nowrap;
+  float : left;
+  margin-right : 3px;
+}
+
+.calendar-calendar .week-view .full td.multi-day .calendar.weekview .view-field {
+  white-space: nowrap;
+  display : inline;
+  margin-right : 3px;
+}
+
+.calendar-calendar .day-view .full td.multi-day .calendar.weekview .view-field {
+  display : block;
+}
+
+.calendar-calendar .month-view .full td.multi-day .calendar.monthview .contents,
+.calendar-calendar .week-view .full td.multi-day .calendar.weekview .contents {
+  position : absolute;
+  width : 3000px;
+  left: 5px;
+}
+
+.calendar-calendar .day-view td .stripe,
+.calendar-calendar .month-view .full td .stripe,
+.calendar-calendar .week-view .full td .stripe {
+  -moz-border-radius : 5px 5px 0px 0px;
+  border-radius : 5px 5px 0px 0px;
+  left: 0px;
+  top : 0px;
+  position:absolute;
+  width : 100%;
+  height :3px;
+  z-index : 2;
+}
+
+.calendar-calendar .full td.single-day .continuation,
+.calendar-calendar .full td.single-day .continues,
+.calendar-calendar .full td.single-day .cutoff {
+  display : none;
+}
+
+.calendar-calendar .month-view .full td.multi-day  .inner .monthview .continuation,
+.calendar-calendar .week-view .full td.multi-day  .inner .weekview .continuation {
+  float :left;
+  margin-right : 3px;
+  height : 1.9em;
+}
+
+.calendar-calendar .week-view .full td.multi-day  .inner .weekview .continuation {
+  height : 2.75em;
+  padding-top: 0.75em;
+  margin-right : 8px;
+}
+
+.calendar-calendar .month-view .full td.multi-day .inner .monthview .continues,
+.calendar-calendar .month-view .full td.multi-day .inner .monthview .cutoff,
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .continues,
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .cutoff {
+  position:absolute;
+  right : 0px !important;
+  right : -1px;
+  width : 10px;
+  text-align: left;
+  background : #74a5d7;
+  -moz-border-radius : 0px 5px 5px 0px;
+  border-radius : 0px 5px 5px 0px;
+  height : 1.9em;
+  padding-left: 6px;
+  z-index : 1;
+}
+
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .continues,
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .cutoff {
+  height : 2.75em;
+  padding-top: 0.75em;
+}
+
+.calendar-calendar .month-view .full td.multi-day .inner .monthview .cutoff,
+.calendar-calendar .week-view .full td.multi-day .inner .weekview .cutoff {
+  width : 8px;
+  padding-left: 0px;
+}
+
+.calendar-calendar .week-view .full td.multi-day {
+  padding : 2px;
+}
+
+.calendar-calendar .week-view td.single-day div.calendar {
+  width : 100%;
+  padding-left:0px;
+  padding-right : 0px;
+}
+
+.calendar-calendar .week-view .full tr.last td.multi-day {
+  border-bottom:1px solid #CCCCCC;
+}
+
+/* Restyle Header */
+.view-content .calendar-calendar {
+  position : relative;
+  margin-top : 5px;
+  float:left;
+  width: 100%;
+}
+
+.view-content .calendar-calendar .links {
+  display : block;
+}
+
+.view-content .calendar-calendar ul.links {
+  margin-bottom: 3px;
+}
+
+.view-content .calendar-calendar ul {
+  position : absolute;
+  top : 8px ;
+  line-height : inherit;
+  z-index : 1;
+}
+
+.view-content .calendar-calendar li {
+  float : left;
+  line-height : inherit ;
+  margin-left : 10px ;
+}
+
+.view-content .calendar-calendar li a {
+  text-decoration : underline ;
+  line-height : inherit ;
+}
+
+.view-content .calendar-calendar .date-nav {
+  background-color : transparent  ;
+  border : 0px  ;
+  height : 30px;
+  height : auto ;
+  min-height : 30px;
+}
+
+.view-content .calendar-calendar .date-prev a,
+.view-content .calendar-calendar .date-next a {
+	text-decoration : none ;
+  color : inherit ;
+  font-size : 12px;
+}
+
+.view-content .calendar-calendar .date-nav a:hover {
+  text-decoration : underline ;
+}
+
+.view-content .calendar-calendar .date-prev {
+  -moz-border-radius:5px 0 0 5px;
+  border-radius:5px 0 0 5px;
+  background:none repeat scroll 0 0 #dfdfdf;
+  float:none;
+  padding:5px 0;
+  position:absolute;
+  right:60px;
+  text-align:right;
+  top:0px;
+  width:auto;
+  z-index : 1;
+  font-size : 12px;
+}
+
+.view-content .calendar-calendar .date-prev span {
+  margin-left : 10px;
+  font-style : bold;
+}
+
+.view-content .calendar-calendar .date-heading {
+  position : relative;
+  width : 100%;
+  top : 0px;
+  text-align : center;
+  z-index : 0;
+  float : none;
+}
+
+.view-content .calendar-calendar .date-heading h3 {
+  line-height : 30px ;
+  font-size : 1.7em ;
+}
+
+.view-content .calendar-calendar .date-next {
+  -moz-border-radius:0px 5px 5px 0px;
+  border-radius:0px 5px 5px 0px;
+  background:none repeat scroll 0 0 #dfdfdf;
+  float:none;
+  padding:5px 0;
+  position:absolute;
+  right:0px;
+  text-align:right;
+  top:0px;
+  width:auto;
+  z-index : 1;
+  font-size : 12px;
+}
+
+.view-content .calendar-calendar .date-next span {
+  margin-right : 10px;
+  font-style : bold;
+}
+
+.view-content:after {
+    content: ".";
+    display: block;
+    height: 0;
+    clear: both;
+    visibility: hidden;
+}
+
+.attachment .calendar-calendar {
+  margin-top : 20px ;
+  clear : both;
+}
+
+.calendar-calendar th a,
+.attachment .calendar-calendar th {
+  background-color : transparent  ;
+  border : 0px  ;
+}
+
+.attachment .calendar-calendar th.calendar-agenda-hour {
+  color : #777777;
+  font-weight : bold;
+  text-align : right;
+}
+
+.view-calendar .feed-icon {
+  margin-top : 5px;
+}
Index: calendar.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/calendar.module,v
retrieving revision 1.121.2.38
diff -u -p -r1.121.2.38 calendar.module
--- calendar.module	17 Mar 2009 18:03:36 -0000	1.121.2.38
+++ calendar.module	2 Nov 2010 00:37:51 -0000
@@ -92,8 +92,16 @@ function calendar_theme() {
       ),
     'calendar_time_row_heading' => $base + array(
       'arguments' => array('start_time', 'next_start_time', 'curday_date'),
+      ),
+    'calendar_month_col' => $base + array(
+      'template' => 'calendar-month-col',
+      'arguments' => array('item' => NULL),
       ),  
-    );
+    'calendar_month_row' => $base + array(
+      'template' => 'calendar-month-row',
+      'arguments' => array('inner' => NULL, 'class' => NULL, 'iehint' => NULL),
+      ),  
+   );
 }
 
 /**
Index: includes/calendar.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/includes/calendar.inc,v
retrieving revision 1.1.2.40
diff -u -p -r1.1.2.40 calendar.inc
--- includes/calendar.inc	11 May 2009 22:24:27 -0000	1.1.2.40
+++ includes/calendar.inc	2 Nov 2010 00:37:53 -0000
@@ -18,79 +18,295 @@ function calendar_build_calendar($view, 
     $item_end = date_format($item->calendar_end_date, DATE_FORMAT_DATE);
     if (($item_start >= $view->date_info->min_date_date && $item_start <= $view->date_info->max_date_date)
      || ($item_end >= $view->date_info->min_date_date && $item_end <= $view->date_info->max_date_date)) {
-       $values[$item_start][date_format($item->calendar_start_date, 'H:i:s')][] = $item;
+       $values[$item_start][date_format($item->date_start, 'H:i:s')][] = $item;
     }
   }
   $items = $values;
   ksort($items);
-  
+ 
   $rows = array();
   $curday = drupal_clone($view->date_info->min_date);
-  
+ 
   switch ($view->date_info->granularity) {
     case 'year':
       $rows = array();
       $view->date_info->mini = TRUE;
       for ($i = 1; $i <= 12; $i++) {
-        $rows[$i] = calendar_build_month($curday, $view, $items);
+        $rows[$i] = calendar_build_mini_month($curday, $view, $items);
       }
       $view->date_info->mini = FALSE;
       break;
-
     case 'month':
-      $rows = calendar_build_month($curday, $view, $items);
+      $rows = ($view->date_info->mini) ? calendar_build_mini_month($curday, $view, $items) : calendar_build_month($curday, $view, $items);
       break;
-
     case 'day':
       $rows = calendar_build_day($curday, $view, $items);
       break;
-
     case 'week':
       $rows = calendar_build_week($curday, $view, $items);
-
       // Merge the day names in as the first row.
       $rows = array_merge(array(calendar_week_header($view)), $rows);
       break;
   }
   return $rows;
-  
+ 
+}
+/**
+ * Build one month.
+ */
+function calendar_build_mini_month(&$curday, $view, $items) {
+  $month = date_format($curday, 'n');
+  date_modify($curday, '-' . strval(date_format($curday, 'j')-1) . ' days');
+  $rows = array();
+  do {
+    $rows = array_merge($rows, calendar_build_mini_week($curday, $view, $items, TRUE));
+    $curday_date = date_format($curday, DATE_FORMAT_DATE);
+    $curday_month = date_format($curday, 'n');
+  } while ($curday_month == $month && $curday_date <= $view->date_info->max_date_date);
+  // Merge the day names in as the first row.
+  $rows = array_merge(array(calendar_week_header($view)), $rows);
+  return $rows;
 }
-
 /**
  * Build one month.
  */
 function calendar_build_month(&$curday, $view, $items) {
   $month = date_format($curday, 'n');
   date_modify($curday, '-' . strval(date_format($curday, 'j')-1) . ' days');
-
   $rows = array();
   do {
-    $rows = array_merge($rows, calendar_build_week($curday, $view, $items, TRUE));
+    $init_day = clone($curday);
+    $today = date_format(date_now(date_default_timezone_name()), DATE_FORMAT_DATE);
+    $month = date_format($curday, 'n');
+    $week = date_week($curday_date);
+    $first_day = variable_get('date_first_day', 0);
+    $week_rows = calendar_build_week($curday, $view, $items, TRUE);
+    $multiday_buckets = $week_rows['multiday_buckets'];
+    $singleday_buckets = $week_rows['singleday_buckets'];
+   
+    $total_rows = $week_rows['total_rows'];
+   
+    // Theme each row
+    $output = "";
+    $final_day = clone($curday);
+ 
+    $iehint = 0;
+    $max_multirow_cnt = 0;
+    $max_singlerow_cnt = 0;
+   
+    for ($i = 0; $i < $total_rows + 1; $i++) {
+      $inner = "";
+     
+      // If we're displaying the week number, add it as the
+      // first cell in the week.
+      if ($i == 0 && !empty($view->date_info->style_with_weekno) && !in_array($view->date_info->granularity, array('day', 'week'))) {
+        $url = $view->get_path() .'/'. $view->date_info->year .'-W'. $week;
+        if (!empty($view->date_info->display_types['week'])) {
+          $weekno = l($week, $url, array('query' => !empty($view->date_info->append) ? $view->date_info->append : ''));
+        }
+        else {
+          // Do not link week numbers, if Week views are disabled.
+          $weekno = $week;
+        }
+        $item = array(
+          'entry' => $weekno,
+          'colspan' => 1,
+          'rowspan' => $total_rows + 1,
+          'id' => $view->name . '-weekno-' . $curday_date, 
+          'class' => 'week'
+        );
+        $inner .= theme('calendar_month_col', $item);
+      }
+     
+      $curday = clone($init_day);
+ 
+      // move backwards to the first day of the week
+      $day_wday = date_format($curday, 'w');
+      date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
+     
+      for ( $wday = 0; $wday < 7; $wday++) {
+ 
+        $curday_date = date_format($curday, DATE_FORMAT_DATE);
+        $class = strtolower($weekdays[$wday]);
+        $item = NULL;
+        $in_month = !($curday_date < $view->date_info->min_date_date || $curday_date > $view->date_info->max_date_date || date_format($curday, 'n') != $month);
+       
+        // Add the datebox
+        if ($i == 0) {
+          $item = array(
+            'entry' => theme('calendar_datebox', $curday_date, $view),
+            'colspan' => 1,
+            'rowspan' => 1,
+            'class' => 'date-box',
+            'date' => $curday_date,
+            'id' => $view->name . '-' . $curday_date . '-date-box'
+          );
+          $item['class'] .= ($curday_date == $today && $in_month ? ' today' : '') .
+            ($curday_date < $today ? ' past' : '') .
+            ($curday_date > $today ? ' future' : '');
+        }
+        else {
+          $index = $i - 1;
+          $multi_count = count($multiday_buckets[$wday]);
+         
+          // Process multiday buckets first.  If there is a multiday-bucket item in this row...
+          if ($index < $multi_count) {
+           
+            // If this item is filled with either a blank or an entry...
+            if ($multiday_buckets[$wday][$index]['filled']) {
+             
+              // Add item and add class
+              $item = $multiday_buckets[$wday][$index];
+              $item['class'] =  'multi-day';
+              $item['date'] = $curday_date;
+             
+              // Is this an entry?
+              if (!$multiday_buckets[$wday][$index]['avail']) {
+               
+                // If the item either starts or ends on today,
+                // then add tags so we can style the borders
+                if ($curday_date == $today && $in_month) {
+                  $item['class'] .=  ' starts-today';
+                }
+               
+                // Calculate on which day of this week this item ends on..
+                $end_day = clone($curday);
+                $span = $item['colspan'] - 1;
+                date_modify($end_day, '+' . $span .' day');
+                $endday_date = date_format($end_day, DATE_FORMAT_DATE);
+               
+                // If it ends today, add class
+                if ($endday_date == $today && $in_month) {
+                  $item['class'] .=  ' ends-today';
+                }
+              }
+            }
+           
+            // If this is an acutal entry, add classes regarding the state of the
+            // item
+            if ($multiday_buckets[$wday][$index]['avail']) {
+              $item['class'] .= ' ' . $wday . ' ' . $index . ' no-entry ' . ($curday_date == $today && $in_month ? ' today' : '') .
+                ($curday_date < $today ? ' past' : '') .
+                ($curday_date > $today ? ' future' : '');
+            }
+           
+          // Else, process the single day bucket - we only do this once per day
+          }
+          elseif ($index == $multi_count) {
+           
+            $single_day_cnt = 0;
+            // If it's empty, add class
+            if (count($singleday_buckets[$wday]) == 0) {
+              $single_days = "&nbsp;";
+              if ($max_multirow_cnt == 0 ) {
+                $class = ($multi_count > 0 ) ? 'single-day no-entry noentry-multi-day' : 'single-day no-entry';
+              }
+              else {
+                $class = 'single-day';
+              }
+            }
+            else {
+              $single_days = "";
+              foreach ($singleday_buckets[$wday] as $day) {
+                foreach ($day as $event) {
+                  $single_day_cnt++;
+                  $single_days .= ($event['more_link']) ? '<div class="calendar-more">' . $event['entry'] . '</div>' : $event['entry'];
+                }
+              }
+              $class = 'single-day';
+            }
+           
+            $rowspan = $total_rows - $index;
+           
+            // Add item...
+            $item = array(
+              'entry' => $single_days,
+              'colspan' => 1,
+              'rowspan' => $rowspan,
+              'class' => $class,
+              'date' => $curday_date,
+              'id' => $view->name . '-' . $curday_date . '-' . $index
+            );
+           
+            // Hack for ie to help it properly space single day rows
+            if ($rowspan > 1 && $in_month && $single_day_cnt > 0) {
+              $max_multirow_cnt = max($max_multirow_cnt, $single_day_cnt);
+            }
+            else {
+              $max_singlerow_cnt = max($max_singlerow_cnt, $single_day_cnt);
+            }
+           
+            // If the singlerow is bigger than the multi-row, then null out
+            // ieheight - I'm estimating that a single row is twice the size of
+            // multi-row.  This is really the best that can be done with ie
+            if ($max_singlerow_cnt >= $max_multirow_cnt || $max_multirow_cnt <= $multi_count / 2 ) {
+              $iehint = 0;
+            }
+            elseif ($rowspan > 1 && $in_month && $single_day_cnt > 0) {
+              $iehint = max($iehint, $rowspan - 1); // How many rows to adjust for?
+            }
+           
+            // Set the class
+            $item['class'] .= ($curday_date == $today && $in_month ? ' today' : '') .
+              ($curday_date < $today ? ' past' : '') .
+              ($curday_date > $today ? ' future' : '');
+          }
+        }
+ 
+        // If there isn't an item, then add empty class
+        if ($item != NULL) {
+          if (!$in_month) {
+            $item['class'] .= ' empty';
+          }
+          // Style this entry - it will be a <td>.
+          $inner .= theme('calendar_month_col', $item);
+        }
+       
+        date_modify($curday, '+1 day');
+      }
+     
+      if ($i == 0) {
+        $output .= theme('calendar_month_row', $inner, 'date-box', $iehint);
+      }
+      elseif ($i == $total_rows) {
+        $output .= theme('calendar_month_row', $inner, 'single-day', $iehint);
+        $iehint = 0;
+        $max_singlerow_cnt = 0;
+        $max_multirow_cnt = 0;
+      }
+      else {
+        // Style all the columns into a row
+        $output .= theme('calendar_month_row', $inner, 'multi-day');
+      }
+    }
+    $curday = $final_day;
+   
+    // Add the row into the row array....
+    $rows[] = array('data' => $output);
+   
     $curday_date = date_format($curday, DATE_FORMAT_DATE);
     $curday_month = date_format($curday, 'n');
   } while ($curday_month == $month && $curday_date <= $view->date_info->max_date_date);
-
+ 
   // Merge the day names in as the first row.
   $rows = array_merge(array(calendar_week_header($view)), $rows);
   return $rows;
 }
-
 /**
  * Build one week row.
  */
-function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
+function calendar_build_mini_week(&$curday, $view, $items, $check_month = FALSE) {
   $curday_date = date_format($curday, DATE_FORMAT_DATE);
   $weekdays = calendar_untranslated_days($items, $view);
   $today = date_format(date_now(date_default_timezone_name()), DATE_FORMAT_DATE);
   $month = date_format($curday, 'n');
   $week = date_week($curday_date);
   $first_day = variable_get('date_first_day', 0);
-
   // move backwards to the first day of the week
   $day_wday = date_format($curday, 'w');
   date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
   $curday_date = date_format($curday, DATE_FORMAT_DATE);
-    
+   
   // If we're displaying the week number, add it as the
   // first cell in the week.
   if (!empty($view->date_info->style_with_weekno) && !in_array($view->date_info->granularity, array('day', 'week'))) {
@@ -98,27 +314,26 @@ function calendar_build_week(&$curday, $
     if (!empty($view->date_info->display_types['week'])) {
       $weekno = l($week, $url, array('query' => !empty($view->date_info->append) ? $view->date_info->append : ''));
     }
-    else { 
+    else {
       // Do not link week numbers, if Week views are disabled.
       $weekno = $week;
     }
     $rows[$week][] = array(
       'data' => $weekno,
-      'id' => $view->name . '-weekno-' . $curday_date,  
+      'id' => $view->name . '-weekno-' . $curday_date, 
       'class' => 'week');
   }
   for ($i = 0; $i < 7; $i++) {
-    $curday_date = date_format($curday, DATE_FORMAT_DATE); 
-    $class = strtolower($weekdays[$i] .
-    ($view->date_info->mini ? ' mini' : ''));
+    $curday_date = date_format($curday, DATE_FORMAT_DATE);
+    $class = strtolower($weekdays[$i] . ' mini');
     if ($check_month && ($curday_date < $view->date_info->min_date_date || $curday_date > $view->date_info->max_date_date || date_format($curday, 'n') != $month)) {
       $class .= ' empty';
       $content = array(
-        'date' => '', 
-        'datebox' => '', 
-        'empty' => theme('calendar_empty_day', $curday_date, $view), 
+        'date' => '',
+        'datebox' => '',
+        'empty' => theme('calendar_empty_day', $curday_date, $view),
         'link' => '',
-        'all_day' => array(), 
+        'all_day' => array(),
         'items' => array(),
         );
     }
@@ -129,7 +344,7 @@ function calendar_build_week(&$curday, $
         ($curday_date > $today ? ' future' : '') .
         (empty($items[$curday_date]) ? ' has-no-events' : ' has-events');
     }
-    
+   
     $rows[$week][] = array(
       'data' => $content,
       'class' => $class, 'id' => $view->name . '-' . $curday_date);
@@ -137,7 +352,213 @@ function calendar_build_week(&$curday, $
   }
   return $rows;
 }
-
+/**
+ * Build one week row.
+ */
+function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
+  $curday_date = date_format($curday, DATE_FORMAT_DATE);
+  $weekdays = calendar_untranslated_days($items, $view);
+  $month = date_format($curday, 'n');
+  $first_day = variable_get('date_first_day', 0);
+ 
+  // Set up buckets
+  $total_rows = 0;
+  $multiday_buckets = array( array(), array(), array(), array(), array(), array(), array());
+  $singleday_buckets = array( array(), array(), array(), array(), array(), array(), array());
+ 
+  // move backwards to the first day of the week
+  $day_wday = date_format($curday, 'w');
+  date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
+  $curday_date = date_format($curday, DATE_FORMAT_DATE);
+   
+  for ($i = 0; $i < 7; $i++) {
+    if ($check_month && ($curday_date < $view->date_info->min_date_date || $curday_date > $view->date_info->max_date_date || date_format($curday, 'n') != $month)) {
+      $class = strtolower($weekdays[$i]) .' empty';
+      $singleday_buckets[$i][][] = array(
+        'entry' => theme('calendar_empty_day', $curday_date, $view),
+        'item' => NULL
+      );
+    }
+    else {
+      calendar_build_week_day($curday, $view, $items, $i, $multiday_buckets, $singleday_buckets);
+    }
+    $total_rows = max(count($multiday_buckets[$i]) + 1, $total_rows);
+    date_modify($curday, '+1 day');
+    $curday_date = date_format($curday, DATE_FORMAT_DATE);
+  }
+ 
+  $rows = array(
+    'multiday_buckets' => $multiday_buckets,
+    'singleday_buckets' => $singleday_buckets,
+    'total_rows' => $total_rows);
+  return $rows;
+}
+/**
+ * Build the contents of a single day for the $rows results.
+ */
+function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_buckets, &$singleday_buckets) {
+  $curday_date = date_format($curday, DATE_FORMAT_DATE);
+  $max_events = !empty($view->date_info->style_max_items) ? $view->date_info->style_max_items : 0;
+  $hide = !empty($view->date_info->style_max_items_behavior) ? ($view->date_info->style_max_items_behavior == 'hide') : FALSE;
+  $multiday_theme = ($view->date_info->style_multiday_theme == '1');
+  $cur_cnt = 0;
+  $total_cnt = 0;
+  $types = array();
+ 
+  // If we are hiding, count before processing further
+  if ($max_events != CALENDAR_SHOW_ALL) {
+    foreach ($items as $date => $day) {
+      if ($date == $curday_date) {
+        foreach ($day as $time => $hour) {
+          foreach ($hour as $key => $item) {
+            $total_cnt++;
+            $types[$item->type] = $item;
+          }
+        }
+      }
+    }
+  }
+ 
+  // If we haven't already exceeded the max or we'll showing all, then process the items
+  if ($max_events == CALENDAR_SHOW_ALL || !$hide || $total_cnt <= $max_events) {
+    // Count currently filled items
+    foreach ($multiday_buckets[$wday] as $bucket) {
+      if (!$bucket['avail']) {
+        $cur_cnt++;
+      }
+    }
+   
+    foreach ($items as $date => $day) {
+      if ($date == $curday_date) {
+        $count = 0;
+        ksort($day);
+        foreach ($day as $time => $hour) {
+          foreach ($hour as $key => $item) {
+            $count++;
+           
+            // Can we add an item?
+            if ($max_events == CALENDAR_SHOW_ALL || $cur_cnt <= $max_events) {
+              $all_day = $item->calendar_start_date == $item->calendar_end_date;
+              $theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
+   
+              // Parse out date part
+              $start_ydate = date_format($item->date_start, DATE_FORMAT_DATE);
+              $end_ydate = date_format($item->date_end, DATE_FORMAT_DATE);
+              $cur_ydate = date_format($curday, DATE_FORMAT_DATE);
+             
+              $is_multi_day = ($start_ydate < $cur_ydate || $end_ydate > $cur_ydate);
+             
+              // Does this event span multi-days?
+              if ($multiday_theme && ($is_multi_day || $all_day)) {
+               
+                // If this the first day of the week, or is the start date of the multi-day event,
+                // then record this item, otherwise skip over
+                $day_no = date_format($curday, 'd');
+                if ($wday == 0 || $start_ydate == $cur_ydate || ($view->date_info->granularity == 'month' && $day_no == 1) || ($all_day && !$is_multi_day)) {
+                  $cur_cnt++;
+                 
+                  // Calculate the colspan for this event
+                  $start = date_make_date($cur_ydate);
+                  $end = date_make_date($end_ydate);
+                  $curday_obj = date_make_date($curday_date);
+                 
+                  // Calculate end of time period
+                  $last_day = date_make_date($view->date_info->max_date_date);
+ 
+                  // If the last day of this event exceeds the end of the current month or week,
+                  // truncate the remaining days
+                  $diff = date_difference($last_day, $curday_obj, 'days');
+                  $remaining_days = ($view->date_info->granularity == 'month') ? min(6 - $wday, $diff) : $diff - 1;                 
+                  // The bucket_cnt defines the colspan.  colspan = bucket_cnt + 1
+                  $days = date_difference($start, $end, 'days');
+                  $bucket_cnt = max(0, min($days, $remaining_days));
+                 
+                  // See if there is an avaiable slot to add an event.  This will allow
+                  // an event to precede a row filled up by a previous day event
+                  $avail = FALSE;
+                  $bucket_index = count($multiday_buckets[$wday]);
+                  for ($i = 0; $i < $bucket_index; $i++) {
+                    if ($multiday_buckets[$wday][$i]['avail']) {
+                      $bucket_index = $i;
+                      break;
+                    }
+                  }
+                 
+                  // Add continuation attributes
+                  $start_date = date_make_date($start_ydate);
+                  $item->continuation =  ($start_date < $curday_obj);
+                  $item->continues = ( $days > $bucket_cnt );
+                                 
+                  // Assign the item to the available bucket
+                  $multiday_buckets[$wday][$bucket_index] = array(
+                    'colspan' => $bucket_cnt + 1,
+                    'rowspan' => 1,
+                    'filled' => TRUE,
+                    'avail' => FALSE,
+                    'all_day' => $all_day,
+                    'item' => $item,
+                    'wday' => $wday,
+                    'entry' => theme($theme, $item, $view)
+                  );
+                 
+                  // Block out empty buckets for the next days in this event for this week
+                  for ($i = 0; $i < $bucket_cnt; $i++) {
+                    $bucket = &$multiday_buckets[$i + $wday + 1];
+                    $bucket_row_count = count($bucket);
+                    $row_diff = $bucket_index - $bucket_row_count;
+                   
+                    // Fill up the preceding buckets - these are available for future
+                    // events
+                    for ( $j = 0; $j < $row_diff; $j++) {
+                      $bucket[($bucket_row_count + $j) ] = array(
+                        'entry' => '&nbsp;',
+                        'colspan' => 1,
+                        'rowspan' => 1,
+                        'filled' => TRUE,
+                        'avail' => TRUE,
+                        'wday' => $wday,
+                        'item' => NULL
+                      );
+                    }
+                    $bucket[$bucket_index] = array(
+                      'filled' => FALSE,
+                      'avail' => FALSE
+                    );
+                  }
+                }
+              }
+              else {
+                $cur_cnt++;
+                // Assign to single day bucket
+                $singleday_buckets[$wday][$time][] = array(
+                  'entry' => theme($theme, $item, $view),
+                  'item' => $item,
+                  'colspan' => 1,
+                  'rowspan' => 1,
+                  'filled' => TRUE,
+                  'avail' => FALSE,
+                  'wday' => $wday,
+                );
+              }
+            }
+            else {
+              break;  // exceeded count
+            }
+          }
+        }
+      }
+    }
+  }
+   
+  // Add a more link if necessary
+  if ($max_events != CALENDAR_SHOW_ALL && $total_cnt > 0 && $cur_cnt < $total_cnt) {
+    $singleday_buckets[$wday][][] = array(
+      'entry' => theme('calendar_'. $view->date_info->calendar_type .'_multiple_node', $curday_date, $total_cnt, $view, $types),
+      'more_link' => TRUE,
+      'item' => NULL
+    );
+  }
+}
 /**
  * Build the contents of a single day for the $rows results.
  */
@@ -169,7 +590,7 @@ function calendar_build_day($curday, $vi
               $all_day[] = in_array($view->date_info->calendar_type, array('day', 'week')) ? $item : theme($theme, $item, $view);
             }
             else {
-              $key = date_format($item->calendar_start_date, 'H:i:s');
+              $key = date_format($item->date_start, 'H:i:s');
               $inner[$key][] = in_array($view->date_info->calendar_type, array('day', 'week')) ? $item : theme($theme, $item, $view);
             }
           }
@@ -189,10 +610,10 @@ function calendar_build_day($curday, $vi
     }
     $link = theme('calendar_'. $view->date_info->calendar_type .'_multiple_node', $curday_date, $count, $view, $types);
   }
-    
+   
   $content = array(
-    'date' => $curday_date, 
-    'datebox' => theme('calendar_datebox', $curday_date, $view, $items, $selected), 
+    'date' => $curday_date,
+    'datebox' => theme('calendar_datebox', $curday_date, $view, $items, $selected),
     'empty' => $empty,
     'link' => $link,
     'all_day' => $all_day,
@@ -200,7 +621,6 @@ function calendar_build_day($curday, $vi
     );
   return $content;
 }
-
 /**
  * Formats the weekday information into table header format
  *
@@ -210,7 +630,7 @@ function calendar_build_day($curday, $vi
 function calendar_week_header($view) {
   $len = isset($view->date_info->style_name_size) ? $view->date_info->style_name_size : (!empty($view->date_info->mini) ? 1 : 3);
   $with_week = !empty($view->date_info->style_with_weekno);
-  
+ 
   // create week header
   $untranslated_days = calendar_untranslated_days();
   if ($len == 99) {
@@ -228,7 +648,6 @@ function calendar_week_header($view) {
   }
   return $row;
 }
-
 /**
  * Array of untranslated day name abbreviations, forced to lowercase
  * and ordered appropriately for the site setting for the first day of week.
@@ -242,7 +661,6 @@ function calendar_untranslated_days() {
   }
   return $untranslated_days;
 }
-
 /**
  * Take the array of items and alter it to an array of
  * calendar nodes that the theme can handle.
@@ -266,19 +684,17 @@ function calendar_build_nodes(&$view, &$
   // Midnights are determined based on the same timezone as the View uses
   $display_timezone = date_timezone_get($view->date_info->min_date);
   $display_timezone_name = timezone_name_get($display_timezone);
-  
+ 
   // Translate the view min and max dates to UTC values
   // so we can compare UTC dates to the view range.
   $min_utc = drupal_clone($view->date_info->min_date);
   date_timezone_set($min_utc, timezone_open('UTC'));
   $max_utc = drupal_clone($view->date_info->max_date);
   date_timezone_set($max_utc, timezone_open('UTC'));
-  $min_zone_string = array(); // Will cache $min_utc-strings in various timezones 
+  $min_zone_string = array(); // Will cache $min_utc-strings in various timezones
   $max_zone_string = array();
-
   $view->date_info->nodes_per_page = 0;
   $type_names = node_get_types('names');
-
   $datefields = array();
   $fields = date_api_fields($view->base_table);
   if (!empty($view->filter['date_filter'])) {
@@ -293,7 +709,6 @@ function calendar_build_nodes(&$view, &$
       $datefields[] = $fields['name'][$name]['query_name'];
     }
   }
-
   $view_fields = date_api_views_fetch_fields('node', 'field');
   $field_names = (array) array_keys($fields['name']);
   $nodes = array();
@@ -311,14 +726,14 @@ function calendar_build_nodes(&$view, &$
     $local_tz     = date_get_timezone($field['tz_handling'], 'date');
     $field_name   = $field['field_name'];
     $rrule_field  = str_replace(array('_value2', '_value'), '_rrule', $alias);
-            
-    // Set a flag to tell us if individual multi-day dates need to be 
+           
+    // Set a flag to tell us if individual multi-day dates need to be
     // split into separate nodes.
     $split_dates = TRUE;
     if (strstr($view->current_display, '_ical')) {
       $split_dates = FALSE;
     }
-    
+   
     // If there is no field for this item, just default to the site format.
     if (!isset($view->field[$field_name])) {
       $format = variable_get('date_format_short', 'm/d/Y - H:i');
@@ -349,7 +764,7 @@ function calendar_build_nodes(&$view, &$
         }
       }
     }
-     
+    
     // If there are multiple date fields in this calendar we may get
     // duplicate items from the other date fields, so add a way to
     // make sure each individual date field only gets added to the
@@ -362,9 +777,9 @@ function calendar_build_nodes(&$view, &$
       if (substr($field['type'], 0, 3) == 'cck') {
         $real_field = str_replace(array('_value2', '_value'), '', $field_name);
       }
-      
+     
       $id = 'calendar:'. $item->{$view->base_field} .':'. $real_field .':'. $delta;
-      
+     
       // When creating iCal feeds for repeating dates we don't want all
       // the multiple values, send only the first value.
       if (strstr($view->current_display, '_ical') && !empty($rrule_field) && !empty($item->$rrule_field)) {
@@ -375,38 +790,38 @@ function calendar_build_nodes(&$view, &$
           continue;
         }
       }
-      
+     
       if (!in_array($id, $processed) && !empty($item->calendar_fields->$alias)) {
-        
+       
         // Create from and to date values for each item, adjusted to
         // the correct timezone.
         $values[0] = !empty($item->calendar_fields->$fromto[0]) ? $item->calendar_fields->$fromto[0] : $item->calendar_fields->$alias;
         $values[1] = !empty($item->calendar_fields->$fromto[1]) ? $item->calendar_fields->$fromto[1] : $item->calendar_fields->$alias;
-               
+              
         $db_tz   = date_get_timezone_db($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
         $to_zone = date_get_timezone($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
-        
-        // Now $display_timezone determines how $item is split into 
+       
+        // Now $display_timezone determines how $item is split into
         // one entry per day, while $to_zone determines how date is displayed.
         // For now, use the date fields's timezone for the day splitting.
         $display_timezone_name = $to_zone;
         $values_display = array();
-        
+       
         // Start date
         $date = date_make_date($values[0], $db_tz, $field['sql_type']);
         if ($db_tz != $to_zone) {
           date_timezone_set($date, timezone_open($to_zone));
         }
         $values[0] = date_format($date, DATE_FORMAT_DATETIME);
-            
+           
         if ($display_timezone_name != $to_zone) {
           date_timezone_set($date, $display_timezone);
           $values_display[0] = date_format($date, DATE_FORMAT_DATETIME);
-        } 
+        }
         else {
           $values_display[0] = $values[0];
         }
-            
+           
         // End date
         $date = date_make_date($values[1], $db_tz, $field['sql_type']);
         if ($db_tz != $to_zone) {
@@ -416,15 +831,14 @@ function calendar_build_nodes(&$view, &$
         if ($display_timezone_name != $to_zone) {
           date_timezone_set($date, $display_timezone);
           $values_display[1] = date_format($date, DATE_FORMAT_DATETIME);
-        } 
+        }
         else {
           $values_display[1] = $values[1];
         }
-               
+              
         // Now $values contain start and end date of a node,
         // expressed as strings in the display (local) timezone.
         // $values_utc does the same in UTC timezone.
-
         // Get calendar min and max day (not time) as strings in the
         // $display_timezone. Cache in $min_zone_string and $max_zone_string,
         // since many items or fields typically use the samee timezone.
@@ -436,13 +850,13 @@ function calendar_build_nodes(&$view, &$
           date_timezone_set($date, $display_timezone);
           $max_zone_string[$display_timezone_name] = date_format($date, DATE_FORMAT_DATE);
         }
-        
+       
         // Create a node for each date within the field's date range,
         // limited to the view's date range (regarding only day, not time).
         $now = max($min_zone_string[$display_timezone_name], substr($values_display[0], 0, 10));
         $to  = min($max_zone_string[$display_timezone_name], substr($values_display[1], 0, 10));
         $next = date_make_date($now, $display_timezone);
-        
+       
         if ($display_timezone_name != $to_zone) {
           // Make $start and $end (derived from $node) use the timezone $to_zone, just as $values[..] do
           date_timezone_set($next, timezone_open($to_zone));
@@ -450,13 +864,13 @@ function calendar_build_nodes(&$view, &$
         if (empty($to)) {
           $to = $now;
         }
-                  
+                 
         // $now and $next are midnight (in display timezone) on the first day where node will occur.
         // $to is midnight on the last day where node will occur.
         // All three were limited by the min-max date range of the view.
         while ($now <= $to) {
           $node = drupal_clone($item);
-          
+         
           // Make sure the pseudo node has the same properties a
           // regular node would have.
           if (isset($node->node_title) && !isset($node->title)) {
@@ -465,20 +879,18 @@ function calendar_build_nodes(&$view, &$
           if (isset($node->node_type) && !isset($node->type)) {
             $node->type = $node->node_type;
           }
-
           $exceptions = array('format_interval', 'time ago');
           $node->label = $label;
           $node->format = $format;
           $node->format_time = !in_array($node->format, $exceptions) ? date_limit_format($format, array('hour', 'minute', 'second')) : '';
           $node->url = calendar_get_node_link($node);
-                              
+                             
           //$node->$fromto[0] = $values[0];
           //$node->$fromto[1] = $values[1];
-          
+         
           // Flag which datefield this node is using, in case
           // there are multiple date fields in the view.
           $node->datefield = $alias;
-
           // If there are other datefields in the View, get rid
           // of them in this pseudo node. There should only be one
           // date in each calendar node.
@@ -496,14 +908,13 @@ function calendar_build_nodes(&$view, &$
               }
             }
           }
-
-          // If we don't deconstruct dates into individual date parts, 
+          // If we don't deconstruct dates into individual date parts,
           // use date values as-is.
           if (!$split_dates) {
             $node->calendar_start = $values[0];
             $node->calendar_end = $values[1];
           }
-          // Split dates get intersection of current day and the node 
+          // Split dates get intersection of current day and the node
           // value's duration (as strings in $to_zone timezone)
           else {
            // Get start and end of current day
@@ -514,29 +925,30 @@ function calendar_build_nodes(&$view, &$
             $node->calendar_start = $values[0] < $start ? $start : $values[0];
             $node->calendar_end = !empty($values[1]) ? ($values[1] > $end ? $end : $values[1]) : $node->calendar_start;
           }
+          $node->date_start = date_create($values[0], timezone_open($to_zone));
+          $node->date_end = date_create(!empty($values[1]) ? $values[1] : $values[0], timezone_open($to_zone));;
           
           // Make date objects
           $node->calendar_start_date = date_create($node->calendar_start, timezone_open($to_zone));
           $node->calendar_end_date = date_create($node->calendar_end, timezone_open($to_zone));
-          if (date_format($node->calendar_start_date, 'H:i:s') == '00:00:00' && 
-            date_format($node->calendar_end_date, 'H:i:s') == '23:59:59') {
+          if (date_format($node->date_end, 'H:i:s') == '00:00:00' &&
+            date_format($node->date_start, 'H:i:s') == '23:59:59') {
             $node->calendar_all_day = TRUE;
           }
           else {
             $node->calendar_all_day = FALSE;
           }
-          
+         
           // Flag all day values specifically set in date.
           $all_day_field = str_replace(array('_value2', '_value'), '_all_day', $node->datefield);
           if (!empty($all_day_field) && !empty($item->$all_day_field)) {
             $node->calendar_all_day = TRUE;
           }
-
-          // Change string timezones into 
+          // Change string timezones into
           // calendar_start and calendar_end are UTC dates as formatted strings
           $node->calendar_start = date_format($node->calendar_start_date, DATE_FORMAT_DATETIME);
           $node->calendar_end = date_format($node->calendar_end_date, DATE_FORMAT_DATETIME);
-          
+         
           unset($node->calendar_fields);
           if (isset($node) && (empty($node->calendar_start))) {
             // if no date for the node and no date in the item
@@ -547,7 +959,6 @@ function calendar_build_nodes(&$view, &$
             calendar_node_stripe($view, $node, $alias, $alias);
             calendar_node_taxonomy_stripe($view, $node, $alias, $alias);
             $node->date_id = $id .':'. $pos;
-
             $nodes[] = $node;
             unset($node);
           }
@@ -564,4 +975,4 @@ function calendar_build_nodes(&$view, &$
     }
   }
   return $nodes;
-}
+}
\ No newline at end of file
Index: includes/calendar.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/includes/calendar.views.inc,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 calendar.views.inc
--- includes/calendar.views.inc	23 Jan 2009 21:05:41 -0000	1.1.2.9
+++ includes/calendar.views.inc	2 Nov 2010 00:37:53 -0000
@@ -203,7 +203,9 @@ function calendar_views_plugins() {
         'additional themes' => array(
           'calendar_year' => 'style',
           'calendar_day' => 'style',
+          'calendar_day_overlap' => 'style',
           'calendar_week' => 'style',
+          'calendar_week_overlap' => 'style',
           'calendar_mini' => 'style',
           ),
         'uses row plugin' => FALSE,
Index: includes/calendar.views_default.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/includes/calendar.views_default.inc,v
retrieving revision 1.1.2.21
diff -u -p -r1.1.2.21 calendar.views_default.inc
--- includes/calendar.views_default.inc	21 Feb 2009 16:33:15 -0000	1.1.2.21
+++ includes/calendar.views_default.inc	2 Nov 2010 00:37:54 -0000
@@ -365,6 +365,7 @@ $handler->override_option('style_options
   'display_type' => 'month',
   'name_size' => '99',
   'with_weekno' => '1',
+  'multiday_theme' => '1',
   'date_fields' => NULL,
   'max_items' => 0,
 ));
@@ -384,6 +385,7 @@ $handler->override_option('style_plugin'
 $handler->override_option('style_options', array(
   'name_size' => '99',
   'with_weekno' => 0,
+  'theme_style' => '1',
   'max_items' => 0,
   'max_items_behavior' => 'more',
   'groupby_times' => 'hour',
@@ -406,6 +408,7 @@ $handler->override_option('style_plugin'
 $handler->override_option('style_options', array(
   'name_size' => '99',
   'with_weekno' => 0,
+  'theme_style' => '1',
   'max_items' => 0,
   'max_items_behavior' => 'more',
   'groupby_times' => 'hour',
Index: includes/calendar_plugin_display_attachment.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/includes/calendar_plugin_display_attachment.inc,v
retrieving revision 1.1.2.18
diff -u -p -r1.1.2.18 calendar_plugin_display_attachment.inc
--- includes/calendar_plugin_display_attachment.inc	22 Aug 2010 13:11:57 -0000	1.1.2.18
+++ includes/calendar_plugin_display_attachment.inc	2 Nov 2010 00:37:54 -0000
@@ -169,7 +169,7 @@ class calendar_plugin_display_attachment
   /**
    * Add custom option definitions.
    */
-  function option_definition () {
+  function option_definition() {
     $options = parent::option_definition();
     $options['calendar_type'] = array('default' => $this->calendar_type());
     return $options;
Index: includes/calendar_view_plugin_style.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/includes/calendar_view_plugin_style.inc,v
retrieving revision 1.1.2.19
diff -u -p -r1.1.2.19 calendar_view_plugin_style.inc
--- includes/calendar_view_plugin_style.inc	17 Feb 2009 18:09:35 -0000	1.1.2.19
+++ includes/calendar_view_plugin_style.inc	2 Nov 2010 00:37:54 -0000
@@ -15,6 +15,8 @@ class calendar_view_plugin_style extends
     $calendar_type = $this->display->handler->get_option('calendar_type');
     $view->date_info->style_name_size = $this->options['name_size'];
     $view->date_info->style_with_weekno = $this->options['with_weekno'];
+    $view->date_info->style_multiday_theme = $this->options['multiday_theme'];
+    $view->date_info->style_theme_style = $this->options['theme_style'];
     $view->date_info->style_max_items = $this->options['max_items'];
     $view->date_info->style_max_items_behavior = $this->options['max_items_behavior'];
     if (!empty($this->options['groupby_times_custom'])) {
@@ -39,6 +41,8 @@ class calendar_view_plugin_style extends
   function options(&$options) {
     $options['name_size'] = 3;
     $options['with_weekno'] = 0;
+    $options['multiday_theme'] = '1';
+    $options['theme_style'] = '1';
     $options['max_items'] = 0;
     $options['max_items_behavior'] = 'more';
     $options['groupby_times'] = 'hour';
@@ -58,13 +62,27 @@ class calendar_view_plugin_style extends
       '#options' => array(1 => t('First letter of name'), 2 => t('First two letters of name'), 3 => t('Abbreviated name'), 99 => t('Full name')),
       '#description' => t('The way day of week names should be displayed in a calendar.'),
       );
+    $form['multiday_theme'] = array(
+      '#title' => t('Multi-day style'),
+      '#default_value' => $this->options['multiday_theme'],
+      '#type' => in_array($calendar_type, array('month', 'week')) ? 'select' : 'value',
+      '#options' => array(0 => t('Display multi-day item as a single column'), 1 => t('Display multi-day item as a multiple column row')),
+      '#description' => t('If selected, items which span multiple days will displayed as a multi-column row.  If not selected, items will be displayed as an individual column.'),
+      );
+    $form['theme_style'] = array(
+      '#title' => t('Overlapping time style'),
+      '#default_value' => $this->options['theme_style'],
+      '#type' => in_array($calendar_type, array('day', 'week')) ? 'select' : 'value',
+      '#options' => array(0 => t('Do not display overlapping items'), 1 => t('Display overlapping items')),
+      '#description' => t('Select whether calendar items are displayed as overlapping items.'),
+      );
     $form['with_weekno'] = array(
       '#title' => t('Show week numbers'),
       '#default_value' => $this->options['with_weekno'],
       '#type' => in_array($calendar_type, array('month')) ? 'radios' : 'value',
       '#options' => array(0 => t('No'), 1 => t('Yes')),
       '#description' => t('Whether or not to show week numbers in the left column of calendar weeks and months.'),
-      );
+    );
     $form['max_items'] = array(
       '#title' => t('Maximum items'),
       '#type' => in_array($calendar_type, array('month')) ? 'select' : 'value',
@@ -125,15 +143,24 @@ class calendar_view_plugin_style extends
    * Render the calendar attachment style.
    */
   function render() {
+    $calendar_type = $this->display->handler->get_option('calendar_type');
     // Adjust the theme to match the currently selected default.
     // Only the month view needs the special 'mini' class,
     // which is used to retrieve a different, more compact, theme.
     if (!empty($this->view->date_info->mini) && $this->view->date_info->granularity == 'month') {
       $this->definition['theme'] = 'calendar_mini';
     }
+    elseif ( $calendar_type == 'week') {
+      $this->view->date_info->mini = FALSE;
+      $this->definition['theme'] = ($this->view->style_options['multiday_theme'] == '1' && $this->view->style_options['theme_style'] == '1') ? 'calendar_'. $this->view->date_info->granularity .'_overlap' : 'calendar_'. $this->view->date_info->granularity;
+    }
+    elseif ( $calendar_type == 'day') {
+      $this->view->date_info->mini = FALSE;
+      $this->definition['theme'] = ($this->view->style_options['theme_style'] == '1') ? 'calendar_'. $this->view->date_info->granularity .'_overlap' : 'calendar_'. $this->view->date_info->granularity;
+    }
     else {
       $this->view->date_info->mini = FALSE;
-      $this->definition['theme'] = 'calendar_'. $this->view->date_info->granularity;
+      $this->definition['theme'] ='calendar_'. $this->view->date_info->granularity;
     }
     $this->view->date_info->hide_admin_links = TRUE;
     return theme($this->theme_functions(), $this->view, $this->options, array());
Index: js/calendar_overlap.js
===================================================================
RCS file: js/calendar_overlap.js
diff -N js/calendar_overlap.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ js/calendar_overlap.js	2 Nov 2010 00:37:54 -0000
@@ -0,0 +1,87 @@
+// $Id$
+/*
+ *  Create the splitter, set the viewport size, and set the position of the scrollbar to the first item.
+ */
+Drupal.behaviors.calendarSetScroll = function (context) {
+
+  // Make multi-day resizable - stolen/borrowed from textarea.js
+  $('.header-body-divider:not(.header-body-divider-processed)').each(function() {
+    var divider = $(this).addClass('header-body-divider-processed');
+    var start_y = divider.offset().top;
+  
+    // Add the grippie icon 
+    $(this).prepend('<div class="grippie"></div>').mousedown(startDrag);
+  
+    function startDrag(e) {
+      start_y = divider.offset().top;
+      $(document).mousemove(performDrag).mouseup(endDrag);
+      return false;
+    }
+  
+    function performDrag(e) {
+      var offset = e.pageY - start_y;
+      var mwc = $('#multi-day-container');
+      var sdc = $('#single-day-container');
+      var mwc_height = mwc.height();
+      var sdc_height = sdc.height();
+      var max_height = mwc_height + sdc_height;
+	  mwc.height(Math.min(max_height,Math.max(0,mwc_height + offset)));
+      sdc.height(Math.min(max_height,Math.max(0,sdc_height - offset)));
+      start_y = divider.offset().top;
+      return false;
+    }
+  
+    function endDrag(e) {
+      $(document).unbind("mousemove", performDrag).unbind("mouseup", endDrag);
+    }
+   });
+ 
+  $('.single-day-footer:not(.single-day-footer-processed)').each(function() {
+    var divider = $(this).addClass('single-day-footer-processed');
+    var start_y = divider.offset().top;
+  
+    // Add the grippie icon 
+    $(this).prepend('<div class="grippie"></div>').mousedown(startDrag);
+  
+    function startDrag(e) {
+      start_y = divider.offset().top;
+      $(document).mousemove(performDrag).mouseup(endDrag);
+      return false;
+    }
+  
+    function performDrag(e) {
+      var offset = e.pageY - start_y;
+      var sdc = $('#single-day-container');
+      sdc.height(Math.max(0,sdc.height() + offset));
+      start_y = divider.offset().top;
+      return false;
+    }
+  
+    function endDrag(e) {
+      $(document).unbind("mousemove", performDrag).unbind("mouseup", endDrag);
+    }
+   });
+	 
+   // Size the window
+   calendar_resizeViewport();
+}
+
+// Scroll the viewport to the first item
+function calendar_scrollToFirst() {
+   if ($('div.first_item').size() > 0 ) {
+      var y = $('div.first_item').offset().top - $('#single-day-container').offset().top ;
+      $('#single-day-container').scrollTop(y);
+   }
+}
+
+// Size the single day view 
+function calendar_resizeViewport() {
+	
+  // Size of the browser window
+  var viewportHeight = window.innerHeight ? window.innerHeight : $(window).height();
+  var top = $('#single-day-container').offset().top;
+  
+  // Give it a 20 pixel margin at the bottom
+  $('#single-day-container').height(viewportHeight - top - 20);
+}
+  
\ No newline at end of file
Index: theme/calendar-day-node.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/calendar-day-node.tpl.php,v
retrieving revision 1.2.2.3
diff -u -p -r1.2.2.3 calendar-day-node.tpl.php
--- theme/calendar-day-node.tpl.php	13 Aug 2008 11:12:44 -0000	1.2.2.3
+++ theme/calendar-day-node.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -38,16 +38,20 @@
  * @see template_preprocess_calendar_day_node.
  */
 ?>
-<div class="view-item view-item-<?php print $view->name ?>">
-  <div class="calendar dayview" id="<?php print $node->date_id ?>">
-    <?php print theme('calendar_stripe_stripe', $node); ?>
-    <?php foreach ($fields as $field): ?>
-      <div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
-        <?php if ($field['label']): ?>
-          <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
-        <?php endif; ?>  
-        <?php print $field['data']; ?>
-      </div>  
-    <?php endforeach; ?>
-  </div>    
-</div>
+<div class="item  <?php print $node->class?>">
+  <div class="view-item view-item-<?php print $view->name ?>">
+    <div class="calendar dayview">
+      <?php print theme('calendar_stripe_stripe', $node); ?>
+      <div id="<?php print $node->date_id ?>" class="contents">
+      <?php foreach ($fields as $field): ?>
+        <div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
+          <?php if ($field['label']): ?>
+            <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
+          <?php endif; ?>  
+          <?php print $field['data']; ?>
+        </div>  
+      <?php endforeach; ?>
+      </div>
+    </div>    
+  </div>
+</div>
\ No newline at end of file
Index: theme/calendar-day-overlap.tpl.php
===================================================================
RCS file: theme/calendar-day-overlap.tpl.php
diff -N theme/calendar-day-overlap.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ theme/calendar-day-overlap.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -0,0 +1,135 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Template to display a view as a calendar day, grouped by time with overlapping items
+ * 
+ * @see template_preprocess_calendar_day.
+ *
+ * $rows: The rendered data for this day.
+ * $rows['date'] - the date for this day, formatted as YYYY-MM-DD.
+ * $rows['datebox'] - the formatted datebox for this day.
+ * $rows['empty'] - empty text for this day, if no items were found.
+ * $rows['all_day'] - an array of formatted all day items.
+ * $rows['items'] - an array of timed items for the day.
+ * $rows['items'][$time_period]['hour'] - the formatted hour for a time period.
+ * $rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period.
+ * $rows['items'][$time_period][$column]['values'] - An array of formatted 
+ *   items for a time period and field column.
+ * 
+ * $view: The view.
+ * $columns: an array of column names.
+ * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
+ * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
+ * 
+ * The width of the columns is dynamically set using <col></col> 
+ * based on the number of columns presented. The values passed in will
+ * work to set the 'hour' column to 10% and split the remaining columns 
+ * evenly over the remaining 90% of the table.
+ */
+//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
+?>
+<div class="calendar-calendar"><div class="day-view">
+<div id="multi-day-container">
+  <table class="full">
+    <tbody>
+      <tr class="holder">
+        <td class="calendar-time-holder"></td>
+        <td class="calendar-day-holder"></td>
+      </tr>
+      <tr>
+        <td class="<?php print $agenda_hour_class ?> first">
+           <span class="calendar-hour"><?php print date_t('All day', 'datetime') ?></span>
+        </td>
+        <td class="calendar-agenda-items multi-day last">
+          <?php foreach ($columns as $column): ?>
+          <div class="calendar">
+            <div class="inner">
+             <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : '&nbsp;';?>
+            </div>
+          </div>
+          <?php endforeach; ?>   
+        </td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+<div class="header-body-divider">&nbsp;</div>
+<div id="single-day-container">
+  <script>
+    try {
+  	  // Hide container while it renders...  Degrade w/o javascript support
+      $('#single-day-container').css('visibility','hidden');
+    }catch(e){ 
+      // swallow 
+    }
+  </script>
+  <table class="full">
+    <tbody>
+      <tr class="holder">
+        <td class="calendar-time-holder"></td>
+        <td class="calendar-day-holder"></td>
+      </tr>
+      <tr>
+        <td class="first">
+          <?php $is_first = TRUE; ?>
+          <?php foreach ($rows['items'] as $time_cnt => $hour): ?>
+            <?php 
+              if ($time_cnt == 0) {
+                $class = 'first ';
+              }
+              elseif ($time_cnt == count($start_times) - 1) {
+                $class = 'last ';
+              }
+              else {
+                $class = '';
+              } ?>
+            <div class="<?php print $class?>calendar-agenda-hour">
+              <span class="calendar-hour"><?php print $hour['hour']; ?></span>
+              <span class="calendar-ampm"><?php print $hour['ampm']; ?></span>
+            </div>
+          <?php endforeach; ?>   
+        </td>
+        <td class="last">
+          <?php foreach ($rows['items'] as $time_cnt => $hour): ?>
+            <?php 
+              if ($time_cnt == 0) {
+                $class = 'first ';
+              }
+              elseif ($time_cnt == count($start_times) - 1) {
+                $class = 'last ';
+              }
+              else {
+                $class = '';
+              } ?>
+          <div class="<?php print $class?>calendar-agenda-items single-day">
+            <div class="half-hour">&nbsp;</div>
+            <?php if ($is_first && isset($hour['values'][$column])) :?>
+            <div class="calendar item-wrapper first_item">
+            <?php $is_first = FALSE; ?>
+            <?php else : ?>
+            <div class="calendar item-wrapper">
+            <?php endif; ?>
+              <div class="inner">
+                <?php print isset($hour['values'][$column]) ? implode($hour['values'][$column]) : '&nbsp;'; ?>
+              </div>
+            </div>
+          </div>
+          <?php endforeach; ?>   
+        </td>
+      </tr>
+    </tbody>
+  </table>
+</div>
+<div class="single-day-footer">&nbsp;</div>
+</div></div>
+<script>
+try {
+  // Size and position the viewport inline so there are no delays
+  calendar_resizeViewport();
+  calendar_scrollToFirst();
+  $('#single-day-container').css('visibility','visible');
+}catch(e){ 
+  // swallow 
+}
+</script>
\ No newline at end of file
Index: theme/calendar-day.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/calendar-day.tpl.php,v
retrieving revision 1.7.2.9
diff -u -p -r1.7.2.9 calendar-day.tpl.php
--- theme/calendar-day.tpl.php	28 Jul 2009 21:50:50 -0000	1.7.2.9
+++ theme/calendar-day.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -31,7 +31,7 @@
 //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
 ?>
 <div class="calendar-calendar"><div class="day-view">
-<table>
+<table class="full">
   <col width="<?php print $first_column_width?>"></col>
   <thead>
     <?php foreach ($columns as $column): ?>
@@ -50,7 +50,7 @@
          <span class="calendar-hour"><?php print $by_hour_count > 0 ? date_t('All day', 'datetime') : ''; ?></span>
        </td>
       <?php foreach ($columns as $column): ?>
-       <td class="calendar-agenda-items">
+       <td class="calendar-agenda-items multi-day">
          <div class="calendar">
          <div class="inner">
            <?php print isset($rows['all_day'][$column]) ? implode($rows['all_day'][$column]) : '&nbsp;';?>
@@ -66,7 +66,7 @@
         <span class="calendar-ampm"><?php print $hour['ampm']; ?></span>
       </td>
       <?php foreach ($columns as $column): ?>
-        <td class="calendar-agenda-items">
+        <td class="calendar-agenda-items single-day">
           <div class="calendar">
           <div class="inner">
             <?php print isset($hour['values'][$column]) ? implode($hour['values'][$column]) : '&nbsp;'; ?>
Index: theme/calendar-month-col.tpl.php
===================================================================
RCS file: theme/calendar-month-col.tpl.php
diff -N theme/calendar-month-col.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ theme/calendar-month-col.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -0,0 +1,20 @@
+<?php
+// $Id$ 
+/**
+ * @file
+ * Template to display a column
+ * 
+ * - $item: The item to render within a td element.
+ */
+if ($item['id']) {
+  $id = 'id="' . $item['id'] . '" ';
+}
+else {
+  $id ='';
+}
+?>
+<td <?php print $id?>class="<?php print $item['class'] ?>" colspan="<?php print $item['colspan'] ?>" rowspan="<?php print $item['rowspan'] ?>" date="<?php print $item['date']?>">
+  <div class="inner">
+    <?php print $item['entry'] ?>
+  </div>
+</td>
Index: theme/calendar-month-node.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/calendar-month-node.tpl.php,v
retrieving revision 1.2.2.5
diff -u -p -r1.2.2.5 calendar-month-node.tpl.php
--- theme/calendar-month-node.tpl.php	19 Nov 2008 12:35:40 -0000	1.2.2.5
+++ theme/calendar-month-node.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -37,17 +37,28 @@
  * 
  * @see template_preprocess_calendar_month_node.
  */
+$index = 0;
 ?>
 <div class="view-item view-item-<?php print $view->name ?>">
-  <div class="calendar monthview" id="<?php print $node->date_id ?>">
+  <div class="calendar monthview">
     <?php print theme('calendar_stripe_stripe', $node); ?>
-    <?php foreach ($fields as $field): ?>
-      <div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
-        <?php if ($field['label']): ?>
-          <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
-        <?php endif; ?>  
-        <?php print $field['data']; ?>
-      </div>  
-    <?php endforeach; ?>
+    <div id="<?php print $node->date_id ?>" class="contents">
+      <?php foreach ($fields as $field): ?>
+        <?php if ($index++ == 0 && $node->continuation) : ?>
+        <div class="continuation">&laquo;</div>
+        <?php endif;?>
+        <div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
+          <?php if ($field['label']): ?>
+            <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
+          <?php endif; ?>  
+          <?php print $field['data']; ?>
+        </div>  
+      <?php endforeach; ?>
+    </div>  
+    <?php if ($node->continues) : ?>
+    <div class="continues">&raquo;</div>
+    <?php else : ?>
+    <div class="cutoff">&nbsp;</div>
+    <?php endif;?>
   </div>    
 </div>
Index: theme/calendar-month-row.tpl.php
===================================================================
RCS file: theme/calendar-month-row.tpl.php
diff -N theme/calendar-month-row.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ theme/calendar-month-row.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -0,0 +1,18 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Template to display a row
+ * 
+ * - $inner: The rendered string of the row's contents.
+ */
+$attrs = ($class) ? 'class="' . $class . '"': '';
+$attrs .= ($iehint > 0) ? ' iehint="' . $iehint . '"' : '';
+?>
+<?php if ($attrs != ''):?>
+<tr <?php print $attrs?>>
+<?php else:?>
+<tr>
+<?php endif;?>
+  <?php print $inner ?>
+</tr>
Index: theme/calendar-month.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/calendar-month.tpl.php,v
retrieving revision 1.6.2.3
diff -u -p -r1.6.2.3 calendar-month.tpl.php
--- theme/calendar-month.tpl.php	19 Jun 2008 22:55:56 -0000	1.6.2.3
+++ theme/calendar-month.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -21,7 +21,7 @@
 //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
 ?>
 <div class="calendar-calendar"><div class="month-view">
-<table>
+<table class="full">
   <thead>
     <tr>
       <?php foreach ($day_names as $cell): ?>
@@ -32,15 +32,26 @@
     </tr>
   </thead>
   <tbody>
-    <?php foreach ((array) $rows as $row): ?>
-      <tr>
-        <?php foreach ($row as $cell): ?>
-          <td id="<?php print $cell['id']; ?>" class="<?php print $cell['class']; ?>">
-            <?php print $cell['data']; ?>
-          </td>
-        <?php endforeach; ?>
-      </tr>
-    <?php endforeach; ?>
+    <?php 
+      foreach ((array) $rows as $row) {
+        print $row['data'];
+      } ?>
   </tbody>
 </table>
-</div></div>
\ No newline at end of file
+</div></div>
+<script>
+try {
+  // ie hack to make the single day row expand to available space
+  if ($.browser.msie ) {
+    var multiday_height = $('tr.multi-day')[0].clientHeight; // Height of a multi-day row
+    $('tr[iehint]').each(function(index) {
+      var iehint = this.getAttribute('iehint');
+      // Add height of the multi day rows to the single day row - seems that 80% height works best
+      var height = this.clientHeight + (multiday_height * .8 * iehint); 
+      this.style.height = height + 'px';
+    });
+  }
+}catch(e){
+  // swallow 
+}
+</script>
\ No newline at end of file
Index: theme/calendar-week-node.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/calendar-week-node.tpl.php,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 calendar-week-node.tpl.php
--- theme/calendar-week-node.tpl.php	20 Jun 2008 11:19:30 -0000	1.2.2.2
+++ theme/calendar-week-node.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -39,9 +39,13 @@
  */ 
 ?>
 <div class="view-item view-item-<?php print $view->name ?>">
-  <div class="calendar weekview" id="<?php print $node->date_id ?>">
+  <div class="calendar weekview">
     <?php print theme('calendar_stripe_stripe', $node); ?>
+    <div id="<?php print $node->date_id ?>" class="contents">
     <?php foreach ($fields as $field): ?>
+      <?php if ($index++ == 0 && $node->continuation) : ?>
+      <div class="continuation">&laquo;</div>
+      <?php endif;?>
       <div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
         <?php if ($field['label']): ?>
           <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
@@ -49,5 +53,11 @@
         <?php print $field['data']; ?>
       </div>  
     <?php endforeach; ?>
+    </div>
+    <?php if ($node->continues) : ?>
+    <div class="continues">&raquo;</div>
+    <?php else : ?>
+    <div class="cutoff">&nbsp;</div>
+    <?php endif;?>
   </div>    
 </div>
Index: theme/calendar-week-overlap.tpl.php
===================================================================
RCS file: theme/calendar-week-overlap.tpl.php
diff -N theme/calendar-week-overlap.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ theme/calendar-week-overlap.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -0,0 +1,188 @@
+<?php
+// $Id$ 
+/**
+ * @file
+ * Template to display a view as a calendar week with overlapping items
+ * 
+ * @see template_preprocess_calendar_week.
+ *
+ * $day_names: An array of the day of week names for the table header.
+ * $rows: The rendered data for this week.
+ * 
+ * For each day of the week, you have:
+ * $rows['date'] - the date for this day, formatted as YYYY-MM-DD.
+ * $rows['datebox'] - the formatted datebox for this day.
+ * $rows['empty'] - empty text for this day, if no items were found.
+ * $rows['all_day'] - an array of formatted all day items.
+ * $rows['items'] - an array of timed items for the day.
+ * $rows['items'][$time_period]['hour'] - the formatted hour for a time period.
+ * $rows['items'][$time_period]['ampm'] - the formatted ampm value, if any for a time period.
+ * $rows['items'][$time_period]['values'] - An array of formatted items for a time period.
+ * 
+ * $view: The view.
+ * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
+ * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
+ * 
+ */
+//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
+//dsm($rows);
+//dsm($items);
+?>
+
+<div class="calendar-calendar"><div class="week-view">
+  <div id="header-container">
+  <table class="full">
+  <tbody>
+    <tr class="holder"><td class="calendar-time-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td></tr>
+    <tr>
+      <th class="calendar-agenda-hour">&nbsp;</th>
+      <?php foreach ($day_names as $cell): ?>
+        <th class="<?php print $cell['class']; ?>">
+          <?php print $cell['data']; ?>
+        </th>
+      <?php endforeach; ?>
+    </tr>
+  </tbody>
+  </table>
+  </div>
+  <div id="multi-day-container">
+  <table class="full">
+  <tbody>
+  <tr class="holder"><td class="calendar-time-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td></tr>
+    <?php for ($i = 0; $i < $multiday_rows; $i++): ?>
+    <?php 
+      $colpos = 0; 
+      $rowclass = "all-day";
+      if( $i == 0) {
+        $rowclass .= " first";
+      }
+      if( $i == $multiday_rows - 1) {
+        $rowclass .= " last";
+      }
+    ?>
+    <tr class="<?php print $rowclass?>">
+      <?php if($i == 0 && ($by_hour_count > 0 || !empty($start_times))) :?>
+      <td class="<?php print $agenda_hour_class ?>" rowspan="<?php print $multiday_rows?>">
+        <span class="calendar-hour"><?php print date_t('All day', 'datetime')?></span>
+      </td>
+      <?php endif; ?>
+      <?php for($j = 0; $j < 6; $j++): ?>
+        <?php $cell = (empty($all_day[$j][$i])) ? NULL : $all_day[$j][$i]; ?>
+        <?php if($cell != NULL && $cell['filled'] && $cell['wday'] == $j): ?>
+          <?php for($k = $colpos; $k < $cell['wday']; $k++) : ?>
+          <td class="calendar-agenda-items multi-day no-entry"><div class="inner">&nbsp;</div></td>
+          <?php endfor;?>
+          <td colspan="<?php print $cell['colspan']?>" class="calendar-agenda-items multi-day">
+            <div class="inner">
+            <?php print $cell['entry']?>
+            </div>
+          </td>
+          <?php $colpos = $cell['wday'] + $cell['colspan']; ?>
+        <?php endif; ?>
+      <?php endfor; ?>  
+      <?php for($j = $colpos; $j < 7; $j++) : ?>
+      <td class="calendar-agenda-items multi-day no-entry"><div class="inner">&nbsp;</div></td>
+      <?php endfor;?>
+    </tr>
+    <?php endfor; ?>
+    <?php if ($multiday_rows == 0) :?>
+    <tr>
+      <td class="<?php print $agenda_hour_class ?>">
+        <span class="calendar-hour"><?php print date_t('All day', 'datetime')?></span>
+      </td>
+      <?php for($j = 0; $j < 6; $j++): ?>
+      <td class="calendar-agenda-items multi-day no-entry"><div class="inner">&nbsp;</div></td>
+      <?php endfor; ?>
+     </tr>
+    <?php endif; ?>
+    <tr class="expand">
+      <td class="<?php print $agenda_hour_class ?>">
+        <span class="calendar-hour">&nbsp;</span>
+      </td>
+      <?php for($j = 0; $j < 6; $j++): ?>
+      <td class="calendar-agenda-items multi-day no-entry"><div class="inner">&nbsp;</div></td>
+      <?php endfor; ?>
+     </tr>
+  </thead>
+  </table>
+  </div>
+  <div class="header-body-divider">&nbsp;</div>
+  <div id="single-day-container">
+    <script>
+      try {
+        // Hide container while it renders...  Degrade w/o javascript support
+        $('#single-day-container').css('visibility','hidden');
+      }catch(e){ 
+        // swallow 
+      }
+    </script>
+    <table class="full">
+      <tbody>
+        <tr class="holder"><td class="calendar-time-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td><td class="calendar-day-holder"></td></tr>
+        <tr>
+          <?php for ($index = 0; $index < 8; $index++): ?>
+          <?php if ($index == 0 ): ?>
+          <td class="first">
+          <?php elseif ($index == 7 ) : ?>
+          <td class="last">
+          <?php else : ?>
+          <td>
+          <?php endif; ?>
+            <?php foreach ($start_times as $time_cnt => $start_time): ?>
+              <?php 
+                if ($time_cnt == 0) {
+                  $class = 'first ';
+                }
+                elseif ($time_cnt == count($start_times) - 1) {
+                  $class = 'last ';
+                }
+                else {
+                  $class = '';
+                } ?>
+              <?php if( $index == 0 ): ?>
+              <?php $time = $items[$start_time];?>
+              <div class="<?php print $class?>calendar-agenda-hour">
+                <span class="calendar-hour"><?php print $time['hour']; ?></span>
+                <span class="calendar-ampm"><?php print $time['ampm']; ?></span>
+              </div>
+              <?php else: ?>
+              <div class="<?php print $class?>calendar-agenda-items single-day">
+                <div class="half-hour">&nbsp;</div>
+                <div class="calendar item-wrapper">
+                  <div class="inner">
+                    <?php if(!empty($items[$start_time]['values'][$index - 1])) :?>
+                      <?php foreach($items[$start_time]['values'][$index - 1] as $item) :?>
+                        <?php if ($item['is_first']) :?>
+                        <div class="item <?php print $item['class']?> first_item">
+                        <?php else : ?>
+                        <div class="item <?php print $item['class']?>">
+                        <?php endif; ?>
+                        <?php print $item['entry'] ?>
+                        </div>
+                      <?php endforeach; ?>
+                    <?php endif; ?>
+                  </div>
+                </div>
+              </div>
+              <?php endif; ?>
+            <?php endforeach;?>
+          </td>
+          <?php endfor;?>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+  <div class="single-day-footer">&nbsp;</div>
+</div></div>
+<script>
+try {
+  // Size and position the viewport inline so there are no delays
+  calendar_resizeViewport();
+  calendar_scrollToFirst();
+
+  // Show it now that it is complete and positioned
+  $('#single-day-container').css('visibility','visible');
+}catch(e){ 
+  // swallow 
+}
+</script>
\ No newline at end of file
Index: theme/calendar-week.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/calendar-week.tpl.php,v
retrieving revision 1.5.2.6
diff -u -p -r1.5.2.6 calendar-week.tpl.php
--- theme/calendar-week.tpl.php	16 Feb 2009 23:46:22 -0000	1.5.2.6
+++ theme/calendar-week.tpl.php	2 Nov 2010 00:37:54 -0000
@@ -27,13 +27,16 @@
 //dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
 //dsm($rows);
 //dsm($items);
+$index = 0;
 ?>
 
 <div class="calendar-calendar"><div class="week-view">
-<table>
+<table class="full">
   <thead>
     <tr>
-      <th class="calendar-agenda-hour"><?php print $by_hour_count > 0 ? t('Time') : ''; ?></th>
+      <?php if($by_hour_count > 0 || !empty($start_times)) :?>
+      <th class="calendar-agenda-hour"><?php print t('Time')?></th>
+      <?php endif;?>
       <?php foreach ($day_names as $cell): ?>
         <th class="<?php print $cell['class']; ?>">
           <?php print $cell['data']; ?>
@@ -42,39 +45,80 @@
     </tr>
   </thead>
   <tbody>
-    <tr>
-      <td class="<?php print $agenda_hour_class ?>">
-         <span class="calendar-hour"><?php print $by_hour_count > 0 ? date_t('All day', 'datetime') : ''; ?></span>
-       </td>
-      <?php foreach ($rows as $day): ?>
-       <td class="calendar-agenda-items">
-         <?php print $day['datebox']; ?>
-         <div class="calendar">
-         <div class="inner">
-           <?php print array_key_exists('all_day', $day) && count($day['all_day']) ? implode($day['all_day']) : '&nbsp;';?>
-         </div>
-         </div>
-       </td>
-      <?php endforeach; ?>  
+    <?php for ($i = 0; $i < $multiday_rows; $i++): ?>
+    <?php 
+      $colpos = 0; 
+      $rowclass = "all-day";
+      if( $i == 0) {
+        $rowclass .= " first";
+      }
+      if( $i == $multiday_rows - 1) {
+        $rowclass .= " last";
+      }
+    ?>
+    <tr class="<?php print $rowclass?>">
+      <?php if($i == 0 && ($by_hour_count > 0 || !empty($start_times))) :?>
+      <td class="<?php print $agenda_hour_class ?>" rowspan="<?php print $multiday_rows?>">
+        <span class="calendar-hour"><?php print date_t('All day', 'datetime')?></span>
+      </td>
+      <?php endif; ?>
+      <?php for($j = 0; $j < 6; $j++): ?>
+        <?php $cell = (empty($all_day[$j][$i])) ? NULL : $all_day[$j][$i]; ?>
+        <?php if($cell != NULL && $cell['filled'] && $cell['wday'] == $j): ?>
+          <?php for($k = $colpos; $k < $cell['wday']; $k++) : ?>
+          <td class="multi-day no-entry"><div class="inner">&nbsp;</div></td>
+          <?php endfor;?>
+          <td colspan="<?php print $cell['colspan']?>" class="multi-day">
+            <div class="inner">
+            <?php print $cell['entry']?>
+            </div>
+          </td>
+          <?php $colpos = $cell['wday'] + $cell['colspan']; ?>
+        <?php endif; ?>
+      <?php endfor; ?>  
+      <?php for($j = $colpos; $j < 7; $j++) : ?>
+      <td class="multi-day no-entry"><div class="inner">&nbsp;</div></td>
+      <?php endfor;?>
     </tr>
+    <?php endfor; ?>  
     <?php foreach ($items as $time): ?>
-      <tr>
-        <td class="calendar-agenda-hour">
+    <tr class="not-all-day">
+      <td class="calendar-agenda-hour">
         <span class="calendar-hour"><?php print $time['hour']; ?></span>
-        <span class="calendar-ampm"><?php print $time['ampm']; ?></span>
+      <span class="calendar-ampm"><?php print $time['ampm']; ?></span>
       </td>
-      <?php foreach ($columns as $column): ?>
-        <td class="calendar-agenda-items">
+      <?php $curpos = 0; ?>
+      <?php foreach ($columns as $index => $column): ?>
+        <?php $colpos = (isset($time['values'][$column][0])) ? $time['values'][$column][0]['wday'] : $index; ?>
+        <?php for ($i = $curpos; $i < $colpos; $i++): ?>
+        <td class="calendar-agenda-items single-day">
+          <div class="calendar">
+            <div class="inner">&nbsp</div>
+          </div>
+        </td>
+        <?php endfor; ?>   
+        <?php $curpos = $colpos + 1;?>
+        <td class="calendar-agenda-items single-day">
           <div class="calendar">
           <div class="inner">
-            <?php print isset($time['values'][$column]) ? implode($time['values'][$column]) : '&nbsp;'; ?>
+            <?php if(!empty($time['values'][$column])) :?>
+              <?php foreach($time['values'][$column] as $item) :?>
+                <?php print $item['entry'] ?>
+              <?php endforeach; ?>
+            <?php endif; ?>
           </div>
           </div>
         </td>
       <?php endforeach; ?>   
+      <?php for ($i = $curpos; $i < 7; $i++): ?>
+        <td class="calendar-agenda-items single-day">
+          <div class="calendar">
+            <div class="inner">&nbsp</div>
+          </div>
+        </td>
+      <?php endfor; ?>   
     </tr>
    <?php endforeach; ?>   
-
   </tbody>
 </table>
 </div></div>
\ No newline at end of file
Index: theme/theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/calendar/theme/theme.inc,v
retrieving revision 1.10.2.72
diff -u -p -r1.10.2.72 theme.inc
--- theme/theme.inc	2 Jul 2009 14:42:08 -0000	1.10.2.72
+++ theme/theme.inc	2 Nov 2010 00:37:55 -0000
@@ -110,15 +110,19 @@ function template_preprocess_calendar(&$
     foreach ($fields as $name => $field) {
       // Some fields, like the node edit and delete links, have no alias.
       $field_alias = $field->field_alias != 'unknown' ? $field->field_alias : $name; 
-      if (!empty($field->options['exclude'])) {
-        if (isset($items[$num]->{$field_alias})) unset($items[$num]->{$field_alias});
-      }
-      elseif (!empty($field) && is_object($field)) {
+      if (!empty($field) && is_object($field)) {
         // Theme the copy instead of the original row so duplicate date
         // fields each get a fresh copy of the original data to theme.
         $items[$num]->{$field_alias} = $field->theme($copy);
       }
     }
+    foreach ($fields as $name => $field) {
+      // Some fields, like the node edit and delete links, have no alias.
+      $field_alias = $field->field_alias != 'unknown' ? $field->field_alias : $name; 
+      if (!empty($field->options['exclude'])) {
+        if (isset($items[$num]->{$field_alias})) unset($items[$num]->{$field_alias});
+      }
+    }
   }
   
   $vars['display_type'] = $view->date_info->granularity;
@@ -263,6 +267,13 @@ function template_preprocess_calendar_ye
 }
 
 /**
+ * Display a day overlap view.
+ */
+function template_preprocess_calendar_day_overlap(&$vars) {
+  template_preprocess_calendar_day($vars);
+}
+
+/**
  * Display a day view.
  */
 function template_preprocess_calendar_day(&$vars) {
@@ -278,11 +289,20 @@ function template_preprocess_calendar_da
   $by_hour_count = 0;
   $grouping_field = $view->date_info->style_groupby_field;
   
+  $display_overlap = $view->date_info->style_theme_style == '1';
+  
+  // Add optional css
+  if ($display_overlap) {
+    drupal_add_css(drupal_get_path('module', 'calendar')  .'/calendar-overlap.css');
+    drupal_add_js(drupal_get_path('module', 'calendar') . '/js/calendar_overlap.js');
+    $overlapped_items = array();
+  }
+  
   // If we're not grouping by time, move all items into the 'all day' array.
   if (empty($view->date_info->style_groupby_times)) {
     // Items are already grouped into times, so we need to process each time-group.
     foreach ($rows['items'] as $time => $items) {
-      foreach($items as $item) {
+      foreach ($items as $item) {
         $rows['all_day'][] = $item;
       }
     }
@@ -318,8 +338,9 @@ function template_preprocess_calendar_da
   $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
   
   $grouped_items = array();
-  foreach ($rows['items'] as $time => $items) {
-    foreach ($items as $item) {
+  foreach ($rows['items'] as &$items) {
+    foreach ($items as &$item) {
+      $time = date_format($item->date_start, 'H:i:s');
       if (isset($item->{$grouping_field})) {
         $column = $item->{$grouping_field};
         $item->{$grouping_field} = ''; // Remove the grouping field from the results.
@@ -333,22 +354,32 @@ function template_preprocess_calendar_da
       // Find the next time slot and fill it. Populate the skipped
       // slots if the option to show empty times was chosen.
       while ($time >= $next_start_time && $time < $end_start_time) {
-        if ((!empty($show_empty_times)) && !array_key_exists($start_time, $grouped_items)) {
+        if ((!empty($show_empty_times) || $display_overlap) && !array_key_exists($start_time, $grouped_items)) {
           $grouped_items[$start_time]['values'] = array();        
         }
         $start_time = $next_start_time;
         $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
       }
-      $theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
-      $grouped_items[$start_time]['values'][$column][] = theme($theme, $item, $view);
+      $grouped_items[$start_time]['values'][$column][] = $item;
+      if ($display_overlap) {
+        $time_end = date_format($item->date_end, 'H:i:s');
+        $item->time_start = $time;
+        $item->time_end = $time_end; 
+        _calc_indents($overlapped_items, $time, $time_end, $item);
+      }
       $item_count++;
       $by_hour_count++;
     }
   }
   
   // Finish out the day's time values if we want to see empty times.
-  if (!empty($show_empty_times)) {
-    while ($start_time < $end_start_time) {
+  if (!empty($show_empty_times) || $display_overlap) {
+    while ($start_time < $end_start_time && ($start_time != NULL || $display_overlap)) {
+      if ($start_time == NULL) {
+        $start_times = $view->date_info->style_groupby_times;
+        $start_time = array_shift($start_times);
+        $next_start_time = array_shift($start_times);
+      }
       if (!array_key_exists($start_time, $grouped_items)) {
         $grouped_items[$start_time]['values'] = array();        
       }
@@ -365,6 +396,19 @@ function template_preprocess_calendar_da
     $heading = theme('calendar_time_row_heading', $start_time, $next_start_time, $rows['date']);
     $grouped_items[$start_time]['hour'] = $heading['hour'];
     $grouped_items[$start_time]['ampm'] = $heading['ampm']; 
+    foreach ($grouped_items[$start_time]['values'] as $column => &$items) {
+      foreach ($items as $index => &$item) {
+        if ($display_overlap) {
+          $offset = round(date_format($item->date_start, 'i') / 15);
+          $duration = date_convert('1970-01-01 ' . $item->time_end, DATE_DATETIME, DATE_UNIX) - 
+                      date_convert('1970-01-01 ' . $item->time_start, DATE_DATETIME, DATE_UNIX);
+          $duration = round($duration / (15 * 60));
+          $item->class = 'd_'. $duration . ' o_'. $offset . ' i_' . $item->indent . ' md_' . min($item->max_depth, 5);
+        }
+        $theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
+        $grouped_items[$start_time]['values'][$column][$index] = theme($theme, $item, $view);
+      } 
+    }
     $i++;      
   }
   ksort($grouped_items);
@@ -396,6 +440,13 @@ function template_preprocess_calendar_da
 }
 
 /**
+ * Display a week overlap view.
+ */
+function template_preprocess_calendar_week_overlap(&$vars) {
+  template_preprocess_calendar_week($vars);
+}
+
+/**
  * Display a week view.
  */
 function template_preprocess_calendar_week(&$vars) {
@@ -421,57 +472,107 @@ function template_preprocess_calendar_we
   $end_start_time = '23:59:59';
   
   $grouped_items = array();
-  $vars['rows'] = $rows[0];
-  foreach ($rows[0] as $weekno => $row) {
-    $vars['rows'][$weekno] = $row['data'];
+  
+  // pass the multiday buckets
+  $vars['all_day'] = $rows['multiday_buckets'];
+
+  // Remove the count for singleday
+  $vars['multiday_rows'] = max(0, $rows['total_rows'] - 1); 
+  $display_overlap = ($view->date_info->style_multiday_theme == '1' && $view->date_info->style_theme_style == '1');
+  $vars['display_overlap'] = $display_overlap;
+  
+  // Add optional css
+  if ($display_overlap) {
+    drupal_add_css(drupal_get_path('module', 'calendar')  .'/calendar-overlap.css');
+    drupal_add_js(drupal_get_path('module', 'calendar') . '/js/calendar_overlap.js');
+    $overlapped_items = array( array(), array(), array(), array(), array(), array(), array());
     
-    // If we're not grouping by time, move all items into the 'all day' array.
-    if (empty($view->date_info->style_groupby_times)) {
-      foreach ($row['data']['items'] as $item) {
-        $row['data']['all_day'] += $item;
+    // Locate the first item
+    $first_time = '23:59:59';
+    $first_time_index = -1;
+    for ($i = 0; $i < 7; $i++) {
+      if (count($rows['singleday_buckets'][$i]) > 0) {
+        $time_slot = reset($rows['singleday_buckets'][$i]);
+        $time = date_format($time_slot[0]['item']->date_start, 'H:i:s');
+        if ($time < $first_time) {
+          $first_time = $time;
+          $first_time_index = $i;
+        }
+      } 
+    }
+    if ($first_time_index > -1) {
+      $rows['singleday_buckets'][$first_time_index][$first_time][0]['is_first'] = TRUE;
+    }
+  }
+  
+  // If we're not grouping by time, move all items into the 'all day' array.
+  if (empty($view->date_info->style_groupby_times)) {
+    $add_row = FALSE;
+    foreach ($vars['all_day'] as $index => &$day ) {
+      foreach ($rows['singleday_buckets'][$index] as $item) {
+        foreach ($item as $event) {
+          $day[] = $event;
+          $add_row = TRUE;
+        }
       }
-      $row['data']['items'] = array();
     }
-    
-    $columns[] = $weekno;
-    $start_times = $view->date_info->style_groupby_times;
-    $start_time = array_shift($start_times);
-    $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
-    foreach ($row['data']['all_day'] as $key => $item) {
-      $theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
-      $vars['rows'][$weekno]['all_day'][$key] = theme($theme, $item, $view);
-      $item_count++;
+    if ( $add_row ) {
+      $vars['multiday_rows']++; 
     }
-    foreach ($row['data']['items'] as $time => $items) {
-      foreach ($items as $item) {
-        // Find the next time slot and fill it. Populate the skipped
-        // slots if the option to show empty times was chosen.
-        while ($time >= $next_start_time && $time < $end_start_time) {
-          if (($show_empty_times) && !array_key_exists($start_time, $grouped_items)) {
-            $grouped_items[$start_time]['values'][$weekno] = array();   
+  } 
+  else {
+    foreach ($rows['singleday_buckets'] as $wday => $singleday_row) {
+      $columns[] = $wday;
+      foreach ($singleday_row as &$row) {
+        $start_times = $view->date_info->style_groupby_times;
+        $start_time = array_shift($start_times);
+        $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
+        foreach ($row as &$item) {
+          $time = date_format($item['item']->date_start, 'H:i:s');
+          if ($item['item']->calendar_all_day || ($item['item']->date_start == $item['item']->date_end)) {
+            $vars['all_day'][$item['wday']][] = $item;
+            if ($vars['multiday_rows'] == 0) {
+              $vars['multiday_rows']++;
+            }
+          } 
+          else {
+            // Find the next time slot and fill it. Populate the skipped
+            // slots if the option to show empty times was chosen.
+            while ($time >= $next_start_time && $time < $end_start_time) {
+              if (($show_empty_times || $display_overlap) && !array_key_exists($start_time, $grouped_items)) {
+                $grouped_items[$start_time]['values'][$wday] = array();   
+              }
+              $start_time = $next_start_time;
+              $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
+            }
+            $grouped_items[$start_time]['values'][$wday][] = &$item; 
+            if ($display_overlap) {
+              $date_end = date_format($item['item']->date_end, 'H:i:s');
+              _calc_indents($overlapped_items[$wday], $time, $date_end, $item);
+            }
+            $item_count++; 
+            $by_hour_count++;
           }
-          $start_time = $next_start_time;
-          $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
         }
-        $theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
-        $grouped_items[$start_time]['values'][$weekno][] = theme($theme, $item, $view);
-        $item_count++; 
-        $by_hour_count++; 
       }
-    }
-  
-    // Finish out the day's time values if we want to see empty times.
-    if ($show_empty_times) {
-      while ($start_time < $end_start_time) {
-        if (!array_key_exists($start_time, $grouped_items)) {
-          $grouped_items[$start_time]['values'][$weekno] = array();        
+      // Finish out the day's time values if we want to see empty times.
+      if ($show_empty_times || $display_overlap) {
+        while ($start_time < $end_start_time && ($start_time != NULL || $display_overlap)) {
+          if ($start_time == NULL) {
+            $start_times = $view->date_info->style_groupby_times;
+            $start_time = array_shift($start_times);
+            $next_start_time = array_shift($start_times);
+          }
+          if (!array_key_exists($start_time, $grouped_items)) {
+            $grouped_items[$start_time]['values'][$wday] = array();        
+          }
+          $start_time = $next_start_time;
+          $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
         }
-        $start_time = $next_start_time;
-        $next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
       }
+      ksort($grouped_items);
     }
   }
-  ksort($grouped_items);
   
   // Do the headers last, once we know what the actual values are.
   $i = 0;
@@ -480,7 +581,20 @@ function template_preprocess_calendar_we
     $next_start_time = array_key_exists($i + 1, $start_times) ? $start_times[$i + 1] : '23:59:59';
     $heading = theme('calendar_time_row_heading', $start_time, $next_start_time, $row['data']['date']);
     $grouped_items[$start_time]['hour'] = $heading['hour'];
-    $grouped_items[$start_time]['ampm'] = $heading['ampm'];       
+    $grouped_items[$start_time]['ampm'] = $heading['ampm'];
+    $grouped_items[$start_time]['time'] = $start_time;
+    if ($display_overlap) {
+      foreach ($grouped_items[$start_time]['values'] as $wday => &$items) {
+        foreach ($items as &$item) {
+          if ($display_overlap) {
+            $offset = round(date_format($item['item']->date_start, 'i') / 15);
+            $duration = date_convert($item['item']->date_end, DATE_OBJECT, DATE_UNIX) - date_convert($item['item']->date_start, DATE_OBJECT, DATE_UNIX);
+            $duration = round($duration / (15 * 60));
+            $item['class'] = 'd_'. $duration . ' o_'. $offset . ' i_' . $item['indent'] . ' md_' . min($item['max_depth'], 5);
+          }
+        } 
+      }
+    }
   }
 
   $vars['items'] = $grouped_items;  
@@ -488,6 +602,7 @@ function template_preprocess_calendar_we
   $vars['day_names'] = $day_names;
   $vars['columns'] = $columns;
   $vars['start_times'] = $view->date_info->style_groupby_times;
+  $vars['first_time'] = $first_time;
   
   $vars['agenda_hour_class'] = 'calendar-agenda-hour';
   $first_column_width = 10;
@@ -677,7 +792,7 @@ function theme_calendar_stripe_legend() 
   $rows = array();
   $output = '';    
   foreach ((array) $GLOBALS['calendar_stripes'] as $label => $stripe) {
-    if($stripe){
+    if ($stripe) {
       $rows[] = array($label, '<div style="background-color:'. $stripe .';color:'. $stripe .'" class="stripe" title="Key: '. $label .'">&nbsp;</div>');
     }
   }
@@ -695,11 +810,11 @@ function theme_calendar_stripe_stripe($n
     return;
   }
   $output = '';
-  if(is_array($node->stripe_label)){
-    foreach($node->stripe_label as $k => $stripe_label){
-      if(!empty($node->stripe[$k]) && !empty($stripe_label)) {
+  if (is_array($node->stripe_label)) {
+    foreach ($node->stripe_label as $k => $stripe_label) {
+      if (!empty($node->stripe[$k]) && !empty($stripe_label)) {
         $GLOBALS['calendar_stripes'][$stripe_label] = $node->stripe[$k];
-        $output.= '<div style="background-color:'. $node->stripe[$k] .';color:'. $node->stripe[$k] .'" class="stripe" title="Key: '. $node->stripe_label[$k] .'">&nbsp;</div>'."\n";
+        $output .= '<div style="background-color:'. $node->stripe[$k] .';color:'. $node->stripe[$k] .'" class="stripe" title="Key: '. $node->stripe_label[$k] .'">&nbsp;</div>'."\n";
       }
     }
   }
@@ -722,4 +837,116 @@ function theme_calendar_empty_day($curda
   }
 }
 
+
+/**
+ * Indent items based off a nested tree structure of overlapping items
+ *
+ * @param array $overlapped_items
+ *   Tree of overlapped items
+ * @param date $start
+ *   Start time of the event
+ * @param date $end
+ *   End tiem of the event
+ * @param array $item
+ *   The event to add to the tree
+ * @param int $depth
+ *   Current depth of the tree
+ * @return rc
+ *   Returns an array with the max depth of the branch and whether an overlap occurred
+ */
+function _calc_indents(&$overlapped_items, $start, $end, &$item, $depth = 0) {
+  
+  // Are there any items at this depth?
+  if (!empty($overlapped_items)) {
+    
+    // Iterate for each item as this depth and see if we overlap
+    foreach ($overlapped_items as $index => &$entry) { 
+
+      // We search depth-first, so if there are children for this item, recurse into
+      // each child tree looking for an overlap
+      if (!empty($entry['children'])) {
+        $rc = _calc_indents($entry['children'], $start, $end, $item, $depth + 1);
+        
+        // Was there an overlap in the child tree?
+        if ($rc['overlap']) {
+          if (is_object($entry['item'])) {
+            $entry['item']->indent = _calc_indent($entry['depth'], $rc['max_depth']);
+            $entry['item']->max_depth = $rc['max_depth'];
+          }
+          else {
+            $entry['item']['indent'] = _calc_indent($entry['depth'], $rc['max_depth']);
+            $entry['item']['max_depth'] = $rc['max_depth'];
+          }
+          
+          // There was an overlap, pop out of this depth
+          return $rc;
+        }
+      }
+      
+      // No, child overlap, so check if we overlap this item
+      if ($start >= $entry['start'] && $start < $entry['end']) {
+        
+        // We overlap, create an overlapping entry
+        $entry['children'][] = array('item' => &$item, 'depth' => $depth + 1, 'start' => $start, 'end' => $end, 'children' => array());
+        if (is_object($entry['item'])) {
+          $max_depth = max($entry['item']->max_depth, $depth + 1);
+          $entry['item']->indent = _calc_indent($depth, $max_depth);
+          $entry['item']->max_depth = $max_depth;
+        }
+        else {
+          $max_depth = max($entry['item']['max_depth'], $depth + 1);
+          $entry['item']['indent'] = _calc_indent($depth, $max_depth);
+          $entry['item']['max_depth'] = $max_depth;
+        }
+        if (is_object($item)) {
+          $item->indent = _calc_indent($depth + 1, $max_depth);
+          $item->max_depth = $max_depth;
+        }
+        else {
+          $item['indent'] = _calc_indent($depth + 1, $max_depth);
+          $item['max_depth'] = $max_depth;
+        }
+        
+        // We overlap, so pop out of this depth
+        return array('overlap' => TRUE, 'max_depth' => $max_depth);
+      }
+    }
+    
+    // If there are items at this depth, but no overlap, then return no overlap and pop
+    // out of this depth
+    if ($depth > 0) {
+      return array('overlap' => FALSE, 'max_depth' => 0);
+    }
+   }
+  
+  // No overlap at any depth, reset the array of overlaps
+  if ($depth == 0) {
+   reset($overlapped_items);
+   $overlapped_items[0] = array('item' => &$item, 'depth' => $depth, 'start' => $start, 'end' => $end, 'children' => array());
+  }
+  else {
+    $overlapped_items[] = array('item' => &$item, 'depth' => $depth, 'start' => $start, 'end' => $end, 'children' => array());
+  }
+  
+  if (is_object($item)) {
+    $item->indent = _calc_indent($depth, $depth);
+    $item->max_depth = $depth;
+  }
+  else {
+    $item['indent'] = _calc_indent($depth, $depth);
+    $item['max_depth'] = $depth;
+  }
+  return array('overlap' => FALSE, 'max_depth' => $depth);
+}
+
+/**
+ * Calculates the indent based of the current depth and the depth of this branch in the tree
+ *
+ * @param int $cur_depth
+ * @param int $depth
+ * @return number
+ */
+function _calc_indent( $cur_depth, $depth ) {
+  return round(10 * $cur_depth / ($depth + 1));
+}
 /** @} End of addtogroup themeable */
