Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVDocument.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVDocument.cs	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVDocument.cs	(revision 913)
@@ -401,43 +401,63 @@
 		}
 
-		/// <summary>
-		/// Given a selected date,
-		/// Calculates StartDay and End Day and returns them in output params.  
-		/// nWeeks == number of Weeks to display
-		/// nColumnCount is number of days displayed per week.  If 5 columns, begin on
-		/// Monday, if 7 Columns, begin on Sunday
-		/// 
-		/// Returns TRUE if the document's data needs refreshing based on 
-		/// this newly selected date.
-		/// </summary>
+        /// <summary>
+        /// Given a selected date,
+        /// Calculates StartDay and End Day and returns them in output params.  
+        /// nWeeks == number of Weeks to display
+        /// nColumnCount is number of days displayed per week.  
+        /// If 5 columns, begin on Second Day of Week
+        /// If 7 Columns, begin on First Day of Week
+        /// (this is a change from the hardcoded behavior for US-based calendars)
+        /// 
+        /// Returns TRUE if the document's data needs refreshing based on 
+        /// this newly selected date.
+        /// </summary>
+        /// TODO: This is a duplicate of the method in CGDocument. We need to put them together.
 		public bool WeekNeedsRefresh(int nWeeks, DateTime SelectedDate, 
 			out DateTime WeekStartDay, out DateTime WeekEndDay)
 		{
-			DateTime OldStartDay = m_dStartDate;
-			DateTime OldEndDay = m_dEndDate;
-			int nWeekDay = (int) SelectedDate.DayOfWeek; //0 == Sunday
-
-			int nOff = 1;
-			TimeSpan ts = new TimeSpan(nWeekDay - nOff,0,0,0); //d,h,m,s
-
-			if (m_nColumnCount == 1) 
-			{
-				ts = new TimeSpan(0,23,59,59);
-				WeekStartDay = SelectedDate;
-			}
-			else 
-			{
-				WeekStartDay = SelectedDate - ts;
-				if (m_nColumnCount == 7)
-				{
-					ts = new TimeSpan(1,0,0,0);
-					WeekStartDay -= ts;
-				}
-				int nEnd = (m_nColumnCount == 7) ? 1 : 3;
-				ts = new TimeSpan((7* nWeeks) - nEnd, 23, 59,59);
-			}
-			WeekEndDay = WeekStartDay + ts;
-			bool bRet = (( WeekStartDay.Date != OldStartDay.Date) || (WeekEndDay.Date != OldEndDay.Date));
-			return bRet;
+            DateTime OldStartDay = m_dStartDate;
+            DateTime OldEndDay = m_dEndDate;
+            // Week start based on thread locale
+            int nStartWeekDay = (int)System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek;
+            // Current Day
+            int nWeekDay = (int)SelectedDate.DayOfWeek; //0 == Sunday
+
+            // this offset gets approrpriate day based on locale.
+            int nOff = (nStartWeekDay + 1) % 7;
+            TimeSpan ts = new TimeSpan(nWeekDay - nOff, 0, 0, 0); //d,h,m,s
+
+            // if ts is negative, we will jump to the next week in the logic.
+            // to show the correct week, add 7. Confusing, I know.
+            if (ts < new TimeSpan()) ts = ts + new TimeSpan(7, 0, 0, 0);
+
+            if (m_nColumnCount == 1) // if one column start and end on the same day.
+            {
+                ts = new TimeSpan(0, 23, 59, 59);
+                WeekStartDay = SelectedDate;
+                WeekEndDay = WeekStartDay + ts;
+            }
+            else if (m_nColumnCount == 5 || m_nColumnCount == 0) // if 5 column start (or default) at the 2nd day of this week and end in 4:23:59:59 days.
+            {
+                // if picked day is start of week (Sunday in US), start in the next day since that's the first day of work week
+                // else, just substract the calculated time span to get to the start of week (first work day)
+                WeekStartDay = (nWeekDay == nStartWeekDay) ? SelectedDate + new TimeSpan(1, 0, 0, 0) : SelectedDate - ts;
+                // End day calculation
+                int nEnd = 3;
+                ts = new TimeSpan((7 * nWeeks) - nEnd, 23, 59, 59);
+                WeekEndDay = WeekStartDay + ts;
+            }
+            else // if 7 column start at the 1st day of this week and end in 6:23:59:59 days.
+            {
+                // if picked day is start of week, use that. Otherwise, go to the fist work day and substract one to get to start of week.
+                WeekStartDay = (nWeekDay == nStartWeekDay) ? SelectedDate : SelectedDate - ts - new TimeSpan(1, 0, 0, 0);
+                // End day calculation
+                int nEnd = 1;
+                ts = new TimeSpan((7 * nWeeks) - nEnd, 23, 59, 59);
+                WeekEndDay = WeekStartDay + ts;
+            }
+
+            bool bRet = ((WeekStartDay.Date != OldStartDay.Date) || (WeekEndDay.Date != OldEndDay.Date));
+            return bRet;
 		}
 
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs	(revision 913)
@@ -59,5 +59,4 @@
             this.lblResource = new System.Windows.Forms.Label();
             this.panelCenter = new System.Windows.Forms.Panel();
-            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
             this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
             this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
@@ -91,4 +90,5 @@
             this.mnuHelpAbout = new System.Windows.Forms.MenuItem();
             this.splitter1 = new System.Windows.Forms.Splitter();
+            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
             this.panelRight.SuspendLayout();
             this.panelClip.SuspendLayout();
@@ -104,5 +104,5 @@
             this.panelRight.Location = new System.Drawing.Point(728, 0);
             this.panelRight.Name = "panelRight";
-            this.panelRight.Size = new System.Drawing.Size(120, 450);
+            this.panelRight.Size = new System.Drawing.Size(120, 517);
             this.panelRight.TabIndex = 1;
             // 
@@ -165,5 +165,5 @@
             this.panelBottom.Controls.Add(this.statusBar1);
             this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panelBottom.Location = new System.Drawing.Point(8, 426);
+            this.panelBottom.Location = new System.Drawing.Point(8, 493);
             this.panelBottom.Name = "panelBottom";
             this.panelBottom.Size = new System.Drawing.Size(720, 24);
@@ -217,6 +217,236 @@
             this.panelCenter.Location = new System.Drawing.Point(8, 24);
             this.panelCenter.Name = "panelCenter";
-            this.panelCenter.Size = new System.Drawing.Size(712, 402);
+            this.panelCenter.Size = new System.Drawing.Size(712, 469);
             this.panelCenter.TabIndex = 4;
+            // 
+            // ctxCalendarGrid
+            // 
+            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.ctxCalGridAdd,
+            this.ctxCalGridEdit,
+            this.ctxCalGridDelete});
+            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
+            // 
+            // ctxCalGridAdd
+            // 
+            this.ctxCalGridAdd.Index = 0;
+            this.ctxCalGridAdd.Text = "Add New Access Block";
+            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
+            // 
+            // ctxCalGridEdit
+            // 
+            this.ctxCalGridEdit.Index = 1;
+            this.ctxCalGridEdit.Text = "Edit Access Block";
+            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
+            // 
+            // ctxCalGridDelete
+            // 
+            this.ctxCalGridDelete.Index = 2;
+            this.ctxCalGridDelete.Text = "Delete Access Block";
+            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
+            // 
+            // tvSchedules
+            // 
+            this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;
+            this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;
+            this.tvSchedules.HotTracking = true;
+            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
+            this.tvSchedules.Name = "tvSchedules";
+            this.tvSchedules.Size = new System.Drawing.Size(8, 517);
+            this.tvSchedules.Sorted = true;
+            this.tvSchedules.TabIndex = 5;
+            // 
+            // mainMenu1
+            // 
+            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.menuItem1,
+            this.mnuAvailability,
+            this.mnuCalendar,
+            this.mnuHelp});
+            // 
+            // menuItem1
+            // 
+            this.menuItem1.Index = 0;
+            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnuLoadTemplate,
+            this.mnuSaveTemplate,
+            this.menuItem6,
+            this.mnuSchedulingManagment,
+            this.menuItem5,
+            this.mnuClose});
+            this.menuItem1.Text = "&File";
+            // 
+            // mnuLoadTemplate
+            // 
+            this.mnuLoadTemplate.Index = 0;
+            this.mnuLoadTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
+            this.mnuLoadTemplate.Text = "&Apply Template";
+            this.mnuLoadTemplate.Click += new System.EventHandler(this.mnuLoadTemplate_Click);
+            // 
+            // mnuSaveTemplate
+            // 
+            this.mnuSaveTemplate.Index = 1;
+            this.mnuSaveTemplate.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
+            this.mnuSaveTemplate.Text = "&Save Template";
+            this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click);
+            // 
+            // menuItem6
+            // 
+            this.menuItem6.Index = 2;
+            this.menuItem6.Text = "-";
+            // 
+            // mnuSchedulingManagment
+            // 
+            this.mnuSchedulingManagment.Index = 3;
+            this.mnuSchedulingManagment.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftM;
+            this.mnuSchedulingManagment.Text = "Scheduling &Management";
+            this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click);
+            // 
+            // menuItem5
+            // 
+            this.menuItem5.Index = 4;
+            this.menuItem5.Text = "-";
+            // 
+            // mnuClose
+            // 
+            this.mnuClose.Index = 5;
+            this.mnuClose.Shortcut = System.Windows.Forms.Shortcut.CtrlW;
+            this.mnuClose.Text = "&Close";
+            this.mnuClose.Click += new System.EventHandler(this.mnuClose_Click);
+            // 
+            // mnuAvailability
+            // 
+            this.mnuAvailability.Index = 1;
+            this.mnuAvailability.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnuAddNewAV,
+            this.mnuRemoveAV,
+            this.mnuEditAV});
+            this.mnuAvailability.Text = "&Access Blocks";
+            this.mnuAvailability.Popup += new System.EventHandler(this.mnuAvailability_Popup);
+            // 
+            // mnuAddNewAV
+            // 
+            this.mnuAddNewAV.Index = 0;
+            this.mnuAddNewAV.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
+            this.mnuAddNewAV.Text = "Add &New Block";
+            this.mnuAddNewAV.Click += new System.EventHandler(this.mnuAddNewAV_Click);
+            // 
+            // mnuRemoveAV
+            // 
+            this.mnuRemoveAV.Index = 1;
+            this.mnuRemoveAV.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
+            this.mnuRemoveAV.Text = "&Remove Block";
+            this.mnuRemoveAV.Click += new System.EventHandler(this.mnuRemoveAV_Click);
+            // 
+            // mnuEditAV
+            // 
+            this.mnuEditAV.Index = 2;
+            this.mnuEditAV.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
+            this.mnuEditAV.Text = "&Edit Block";
+            this.mnuEditAV.Click += new System.EventHandler(this.mnuEditAV_Click);
+            // 
+            // mnuCalendar
+            // 
+            this.mnuCalendar.Index = 2;
+            this.mnuCalendar.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnu1Day,
+            this.mnu5Day,
+            this.mnu7Day,
+            this.menuItem7,
+            this.mnuTimeScale,
+            this.mnuViewRightPanel});
+            this.mnuCalendar.Text = "&View";
+            // 
+            // mnu1Day
+            // 
+            this.mnu1Day.Index = 0;
+            this.mnu1Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl1;
+            this.mnu1Day.Text = "&1-Day View";
+            this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click);
+            // 
+            // mnu5Day
+            // 
+            this.mnu5Day.Index = 1;
+            this.mnu5Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl5;
+            this.mnu5Day.Text = "&5-Day View";
+            this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click);
+            // 
+            // mnu7Day
+            // 
+            this.mnu7Day.Index = 2;
+            this.mnu7Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl7;
+            this.mnu7Day.Text = "&7-Day View";
+            this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click);
+            // 
+            // menuItem7
+            // 
+            this.menuItem7.Index = 3;
+            this.menuItem7.Text = "-";
+            // 
+            // mnuTimeScale
+            // 
+            this.mnuTimeScale.Index = 4;
+            this.mnuTimeScale.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnu10Minute,
+            this.mnu15Minute,
+            this.mnu20Minute,
+            this.mnu30Minute});
+            this.mnuTimeScale.Text = "&Time Scale";
+            // 
+            // mnu10Minute
+            // 
+            this.mnu10Minute.Index = 0;
+            this.mnu10Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl0;
+            this.mnu10Minute.Text = "&10-Minute";
+            this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click);
+            // 
+            // mnu15Minute
+            // 
+            this.mnu15Minute.Index = 1;
+            this.mnu15Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl4;
+            this.mnu15Minute.Text = "&15-Minute";
+            this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click);
+            // 
+            // mnu20Minute
+            // 
+            this.mnu20Minute.Index = 2;
+            this.mnu20Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl3;
+            this.mnu20Minute.Text = "&20-Minute";
+            this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click);
+            // 
+            // mnu30Minute
+            // 
+            this.mnu30Minute.Index = 3;
+            this.mnu30Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl2;
+            this.mnu30Minute.Text = "&30-Minute";
+            this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click);
+            // 
+            // mnuViewRightPanel
+            // 
+            this.mnuViewRightPanel.Index = 5;
+            this.mnuViewRightPanel.Text = "&Access Block Clipboard";
+            this.mnuViewRightPanel.Click += new System.EventHandler(this.mnuViewRightPanel_Click);
+            // 
+            // mnuHelp
+            // 
+            this.mnuHelp.Index = 3;
+            this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
+            this.mnuHelpAbout});
+            this.mnuHelp.Text = "&Help";
+            // 
+            // mnuHelpAbout
+            // 
+            this.mnuHelpAbout.Index = 0;
+            this.mnuHelpAbout.Text = "&About";
+            this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);
+            // 
+            // splitter1
+            // 
+            this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
+            this.splitter1.Location = new System.Drawing.Point(720, 24);
+            this.splitter1.Name = "splitter1";
+            this.splitter1.Size = new System.Drawing.Size(8, 469);
+            this.splitter1.TabIndex = 6;
+            this.splitter1.TabStop = false;
             // 
             // calendarGrid1
@@ -239,5 +469,5 @@
             this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
             this.calendarGrid1.SelectedAppointment = 0;
-            this.calendarGrid1.Size = new System.Drawing.Size(712, 402);
+            this.calendarGrid1.Size = new System.Drawing.Size(712, 469);
             this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
             this.calendarGrid1.TabIndex = 2;
@@ -248,224 +478,8 @@
             this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded);
             // 
-            // ctxCalendarGrid
-            // 
-            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.ctxCalGridAdd,
-            this.ctxCalGridEdit,
-            this.ctxCalGridDelete});
-            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
-            // 
-            // ctxCalGridAdd
-            // 
-            this.ctxCalGridAdd.Index = 0;
-            this.ctxCalGridAdd.Text = "Add New Access Block";
-            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
-            // 
-            // ctxCalGridEdit
-            // 
-            this.ctxCalGridEdit.Index = 1;
-            this.ctxCalGridEdit.Text = "Edit Access Block";
-            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
-            // 
-            // ctxCalGridDelete
-            // 
-            this.ctxCalGridDelete.Index = 2;
-            this.ctxCalGridDelete.Text = "Delete Access Block";
-            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
-            // 
-            // tvSchedules
-            // 
-            this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;
-            this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;
-            this.tvSchedules.HotTracking = true;
-            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
-            this.tvSchedules.Name = "tvSchedules";
-            this.tvSchedules.Size = new System.Drawing.Size(8, 450);
-            this.tvSchedules.Sorted = true;
-            this.tvSchedules.TabIndex = 5;
-            // 
-            // mainMenu1
-            // 
-            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.menuItem1,
-            this.mnuAvailability,
-            this.mnuCalendar,
-            this.mnuHelp});
-            // 
-            // menuItem1
-            // 
-            this.menuItem1.Index = 0;
-            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuLoadTemplate,
-            this.mnuSaveTemplate,
-            this.menuItem6,
-            this.mnuSchedulingManagment,
-            this.menuItem5,
-            this.mnuClose});
-            this.menuItem1.Text = "&File";
-            // 
-            // mnuLoadTemplate
-            // 
-            this.mnuLoadTemplate.Index = 0;
-            this.mnuLoadTemplate.Text = "&Apply Template";
-            this.mnuLoadTemplate.Click += new System.EventHandler(this.mnuLoadTemplate_Click);
-            // 
-            // mnuSaveTemplate
-            // 
-            this.mnuSaveTemplate.Index = 1;
-            this.mnuSaveTemplate.Text = "&Save Template";
-            this.mnuSaveTemplate.Click += new System.EventHandler(this.mnuSaveTemplate_Click);
-            // 
-            // menuItem6
-            // 
-            this.menuItem6.Index = 2;
-            this.menuItem6.Text = "-";
-            // 
-            // mnuSchedulingManagment
-            // 
-            this.mnuSchedulingManagment.Index = 3;
-            this.mnuSchedulingManagment.Text = "Scheduling &Management";
-            this.mnuSchedulingManagment.Click += new System.EventHandler(this.mnuSchedulingManagment_Click);
-            // 
-            // menuItem5
-            // 
-            this.menuItem5.Index = 4;
-            this.menuItem5.Text = "-";
-            // 
-            // mnuClose
-            // 
-            this.mnuClose.Index = 5;
-            this.mnuClose.Text = "&Close";
-            this.mnuClose.Click += new System.EventHandler(this.mnuClose_Click);
-            // 
-            // mnuAvailability
-            // 
-            this.mnuAvailability.Index = 1;
-            this.mnuAvailability.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuAddNewAV,
-            this.mnuRemoveAV,
-            this.mnuEditAV});
-            this.mnuAvailability.Text = "&Access Blocks";
-            this.mnuAvailability.Popup += new System.EventHandler(this.mnuAvailability_Popup);
-            // 
-            // mnuAddNewAV
-            // 
-            this.mnuAddNewAV.Index = 0;
-            this.mnuAddNewAV.Text = "&Add New Block";
-            this.mnuAddNewAV.Click += new System.EventHandler(this.mnuAddNewAV_Click);
-            // 
-            // mnuRemoveAV
-            // 
-            this.mnuRemoveAV.Index = 1;
-            this.mnuRemoveAV.Text = "&Remove Block";
-            this.mnuRemoveAV.Click += new System.EventHandler(this.mnuRemoveAV_Click);
-            // 
-            // mnuEditAV
-            // 
-            this.mnuEditAV.Index = 2;
-            this.mnuEditAV.Text = "&Edit Block";
-            this.mnuEditAV.Click += new System.EventHandler(this.mnuEditAV_Click);
-            // 
-            // mnuCalendar
-            // 
-            this.mnuCalendar.Index = 2;
-            this.mnuCalendar.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnu1Day,
-            this.mnu5Day,
-            this.mnu7Day,
-            this.menuItem7,
-            this.mnuTimeScale,
-            this.mnuViewRightPanel});
-            this.mnuCalendar.Text = "&View";
-            // 
-            // mnu1Day
-            // 
-            this.mnu1Day.Index = 0;
-            this.mnu1Day.Text = "&1-Day View";
-            this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click);
-            // 
-            // mnu5Day
-            // 
-            this.mnu5Day.Index = 1;
-            this.mnu5Day.Text = "&5-Day View";
-            this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click);
-            // 
-            // mnu7Day
-            // 
-            this.mnu7Day.Index = 2;
-            this.mnu7Day.Text = "&7-Day View";
-            this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click);
-            // 
-            // menuItem7
-            // 
-            this.menuItem7.Index = 3;
-            this.menuItem7.Text = "-";
-            // 
-            // mnuTimeScale
-            // 
-            this.mnuTimeScale.Index = 4;
-            this.mnuTimeScale.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnu10Minute,
-            this.mnu15Minute,
-            this.mnu20Minute,
-            this.mnu30Minute});
-            this.mnuTimeScale.Text = "&Time Scale";
-            // 
-            // mnu10Minute
-            // 
-            this.mnu10Minute.Index = 0;
-            this.mnu10Minute.Text = "&10-Minute";
-            this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click);
-            // 
-            // mnu15Minute
-            // 
-            this.mnu15Minute.Index = 1;
-            this.mnu15Minute.Text = "&15-Minute";
-            this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click);
-            // 
-            // mnu20Minute
-            // 
-            this.mnu20Minute.Index = 2;
-            this.mnu20Minute.Text = "&20-Minute";
-            this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click);
-            // 
-            // mnu30Minute
-            // 
-            this.mnu30Minute.Index = 3;
-            this.mnu30Minute.Text = "&30-Minute";
-            this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click);
-            // 
-            // mnuViewRightPanel
-            // 
-            this.mnuViewRightPanel.Index = 5;
-            this.mnuViewRightPanel.Text = "&Access Block Clipboard";
-            this.mnuViewRightPanel.Click += new System.EventHandler(this.mnuViewRightPanel_Click);
-            // 
-            // mnuHelp
-            // 
-            this.mnuHelp.Index = 3;
-            this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuHelpAbout});
-            this.mnuHelp.Text = "&Help";
-            // 
-            // mnuHelpAbout
-            // 
-            this.mnuHelpAbout.Index = 0;
-            this.mnuHelpAbout.Text = "&About";
-            this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);
-            // 
-            // splitter1
-            // 
-            this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
-            this.splitter1.Location = new System.Drawing.Point(720, 24);
-            this.splitter1.Name = "splitter1";
-            this.splitter1.Size = new System.Drawing.Size(8, 402);
-            this.splitter1.TabIndex = 6;
-            this.splitter1.TabStop = false;
-            // 
             // CGAVView
             // 
             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-            this.ClientSize = new System.Drawing.Size(848, 450);
+            this.ClientSize = new System.Drawing.Size(848, 517);
             this.Controls.Add(this.panelCenter);
             this.Controls.Add(this.splitter1);
@@ -1009,6 +1023,10 @@
 
 				DateTime dtStart = dlg.StartDate;
+                DateTime newStartDate, newEndDate;
+                this.Document.WeekNeedsRefresh(1,dtStart, out newStartDate, out newEndDate);
+                dtStart = newStartDate;
 				int nWeeksToApply = dlg.WeeksToApply;
 				DateTime dtEnd = dtStart.AddDays(6); // or 7?
+
 				string sResourceID = this.m_Document.ResourceID.ToString();
 				DataTable dt;
@@ -1384,11 +1402,6 @@
 		private void mnu5Day_Click(object sender, System.EventArgs e)
 		{
-			if (this.calendarGrid1.Columns == 1)
-			{
-				this.StartDate = this.Document.StartDate;
-			}
-
 			this.calendarGrid1.Columns = 5;
-			this.Document.UpdateAllViews();
+            this.Document.m_nColumnCount = 5; //TODO: redundant but now needed
 		}
 
@@ -1396,4 +1409,5 @@
 		{
 			this.calendarGrid1.Columns = 7;
+            this.Document.m_nColumnCount = 7; //TODO: redundant but now needed
 		}
 
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs	(revision 913)
@@ -670,4 +670,5 @@
             // Week start based on thread locale
             int nStartWeekDay = (int)System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek;
+            // Current Day
             int nWeekDay = (int) SelectedDate.DayOfWeek; //0 == Sunday
 
@@ -676,21 +677,34 @@
 			TimeSpan ts = new TimeSpan(nWeekDay - nOff,0,0,0); //d,h,m,s
 
-			if (m_nColumnCount == 1) 
+            // if ts is negative, we will jump to the next week in the logic.
+            // to show the correct week, add 7. Confusing, I know.
+            if (ts < new TimeSpan() ) ts = ts + new TimeSpan(7,0,0,0);
+
+			if (m_nColumnCount == 1) // if one column start and end on the same day.
 			{
 				ts = new TimeSpan(0,23,59,59);
 				WeekStartDay = SelectedDate;
-			}
-			else 
-			{
-				WeekStartDay = SelectedDate - ts;
-				if (m_nColumnCount == 7)
-				{
-					ts = new TimeSpan(1,0,0,0);
-					WeekStartDay -= ts;
-				}
-				int nEnd = (m_nColumnCount == 7) ? 1 : 3;
-				ts = new TimeSpan((7* nWeeks) - nEnd, 23, 59,59);
-			}
-			WeekEndDay = WeekStartDay + ts;
+                WeekEndDay = WeekStartDay + ts;
+			}
+            else if (m_nColumnCount == 5 || m_nColumnCount == 0) // if 5 column start (or default) at the 2nd day of this week and end in 4:23:59:59 days.
+            {
+                // if picked day is start of week (Sunday in US), start in the next day since that's the first day of work week
+                // else, just substract the calculated time span to get to the start of week (first work day)
+                WeekStartDay = (nWeekDay == nStartWeekDay) ? SelectedDate + new TimeSpan(1,0,0,0): SelectedDate - ts;
+                // End day calculation
+                int nEnd = 3;
+                ts = new TimeSpan((7 * nWeeks) - nEnd, 23, 59, 59);
+                WeekEndDay = WeekStartDay + ts;
+            }
+            else // if 7 column start at the 1st day of this week and end in 6:23:59:59 days.
+            {
+                // if picked day is start of week, use that. Otherwise, go to the fist work day and substract one to get to start of week.
+                WeekStartDay = (nWeekDay == nStartWeekDay) ? SelectedDate : SelectedDate - ts - new TimeSpan(1,0,0,0);
+                // End day calculation
+                int nEnd = 1;
+                ts = new TimeSpan((7 * nWeeks) - nEnd, 23, 59, 59);
+                WeekEndDay = WeekStartDay + ts;
+            }
+
 			bool bRet = (( WeekStartDay.Date != OldStartDay.Date) || (WeekEndDay.Date != OldEndDay.Date));
 			return bRet;
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user	(revision 913)
@@ -36,5 +36,5 @@
     </RemoteDebugMachine>
     <StartAction>Project</StartAction>
-    <StartArguments>/s=172.16.16.125 /p=9250 /a=shabiel12 /v=abc,123! /e=utf-8</StartArguments>
+    <StartArguments>/s=172.16.17.51 /p=9260 /a=shabiel12 /v=abc,123! /e=utf-8</StartArguments>
     <StartPage>
     </StartPage>
@@ -55,5 +55,5 @@
     </RemoteDebugMachine>
     <StartAction>Project</StartAction>
-    <StartArguments>/s=172.16.16.125 /p=9250 /a=shabiel12 /v=abc,123! /e=utf-8</StartArguments>
+    <StartArguments>/s=172.16.17.51 /p=9260 /a=shabiel12 /v=abc,123! /e=utf-8</StartArguments>
     <StartPage>
     </StartPage>
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.cs	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.cs	(revision 913)
@@ -80,10 +80,8 @@
 		private void cmdOK_Click(object sender, System.EventArgs e)
 		{
-			//assure that it's a monday in the future
-			DateTime dtStart = dtpStartDate.Value;
-			if ((dtStart.DayOfWeek != System.DayOfWeek.Monday) ||
-				(dtStart < DateTime.Today))
-			{
-				MessageBox.Show("Please select a future Monday.");
+            DateTime dtStart = dtpStartDate.Value;
+			if 	(dtStart < DateTime.Today)
+			{
+				MessageBox.Show("Please select a future day.");
 				m_bCancelOK = true;
 				return;
@@ -118,5 +116,5 @@
 			sPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
 
-			openFileDialog1.InitialDirectory = "c:\\" ;
+			openFileDialog1.InitialDirectory = @"c:\" ;
 			openFileDialog1.InitialDirectory = sPath ;
 			openFileDialog1.Filter = "Schedule Template Files (*.bsdxa)|*.bsdxa|All files (*.*)|*.*" ;
@@ -152,173 +150,173 @@
 		private void InitializeComponent()
 		{
-			this.pnlPageBottom = new System.Windows.Forms.Panel();
-			this.cmdCancel = new System.Windows.Forms.Button();
-			this.cmdOK = new System.Windows.Forms.Button();
-			this.pnlDescription = new System.Windows.Forms.Panel();
-			this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
-			this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
-			this.cmdSelectTemplate = new System.Windows.Forms.Button();
-			this.txtTemplate = new System.Windows.Forms.TextBox();
-			this.dtpStartDate = new System.Windows.Forms.DateTimePicker();
-			this.udWeeksToApply = new System.Windows.Forms.NumericUpDown();
-			this.label1 = new System.Windows.Forms.Label();
-			this.label2 = new System.Windows.Forms.Label();
-			this.pnlPageBottom.SuspendLayout();
-			this.pnlDescription.SuspendLayout();
-			this.grpDescriptionResourceGroup.SuspendLayout();
-			((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).BeginInit();
-			this.SuspendLayout();
-			// 
-			// pnlPageBottom
-			// 
-			this.pnlPageBottom.Controls.Add(this.cmdCancel);
-			this.pnlPageBottom.Controls.Add(this.cmdOK);
-			this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
-			this.pnlPageBottom.Location = new System.Drawing.Point(0, 264);
-			this.pnlPageBottom.Name = "pnlPageBottom";
-			this.pnlPageBottom.Size = new System.Drawing.Size(440, 40);
-			this.pnlPageBottom.TabIndex = 7;
-			// 
-			// cmdCancel
-			// 
-			this.cmdCancel.CausesValidation = false;
-			this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-			this.cmdCancel.Location = new System.Drawing.Point(360, 8);
-			this.cmdCancel.Name = "cmdCancel";
-			this.cmdCancel.Size = new System.Drawing.Size(56, 24);
-			this.cmdCancel.TabIndex = 2;
-			this.cmdCancel.Text = "Cancel";
-			// 
-			// cmdOK
-			// 
-			this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-			this.cmdOK.Location = new System.Drawing.Point(280, 8);
-			this.cmdOK.Name = "cmdOK";
-			this.cmdOK.Size = new System.Drawing.Size(64, 24);
-			this.cmdOK.TabIndex = 1;
-			this.cmdOK.Text = "OK";
-			this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
-			// 
-			// pnlDescription
-			// 
-			this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
-			this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
-			this.pnlDescription.Location = new System.Drawing.Point(0, 184);
-			this.pnlDescription.Name = "pnlDescription";
-			this.pnlDescription.Size = new System.Drawing.Size(440, 80);
-			this.pnlDescription.TabIndex = 8;
-			// 
-			// grpDescriptionResourceGroup
-			// 
-			this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
-			this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
-			this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
-			this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
-			this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(440, 80);
-			this.grpDescriptionResourceGroup.TabIndex = 1;
-			this.grpDescriptionResourceGroup.TabStop = false;
-			this.grpDescriptionResourceGroup.Text = "Description";
-			// 
-			// lblDescriptionResourceGroup
-			// 
-			this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
-			this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
-			this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
-			this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(434, 61);
-			this.lblDescriptionResourceGroup.TabIndex = 0;
-			this.lblDescriptionResourceGroup.Text = "Use this panel to define an access pattern for future clinic availability.";
-			// 
-			// cmdSelectTemplate
-			// 
-			this.cmdSelectTemplate.Location = new System.Drawing.Point(24, 40);
-			this.cmdSelectTemplate.Name = "cmdSelectTemplate";
-			this.cmdSelectTemplate.Size = new System.Drawing.Size(136, 32);
-			this.cmdSelectTemplate.TabIndex = 9;
-			this.cmdSelectTemplate.Text = "Select Access Template";
-			this.cmdSelectTemplate.Click += new System.EventHandler(this.cmdSelectTemplate_Click);
-			// 
-			// txtTemplate
-			// 
-			this.txtTemplate.Location = new System.Drawing.Point(176, 32);
-			this.txtTemplate.Multiline = true;
-			this.txtTemplate.Name = "txtTemplate";
-			this.txtTemplate.ReadOnly = true;
-			this.txtTemplate.Size = new System.Drawing.Size(248, 48);
-			this.txtTemplate.TabIndex = 10;
-			this.txtTemplate.Text = "";
-			// 
-			// dtpStartDate
-			// 
-			this.dtpStartDate.AllowDrop = true;
-			this.dtpStartDate.Checked = false;
-			this.dtpStartDate.Location = new System.Drawing.Point(176, 104);
-			this.dtpStartDate.Name = "dtpStartDate";
-			this.dtpStartDate.Size = new System.Drawing.Size(184, 20);
-			this.dtpStartDate.TabIndex = 11;
-			// 
-			// udWeeksToApply
-			// 
-			this.udWeeksToApply.Location = new System.Drawing.Point(176, 144);
-			this.udWeeksToApply.Maximum = new System.Decimal(new int[] {
-																		   52,
-																		   0,
-																		   0,
-																		   0});
-			this.udWeeksToApply.Minimum = new System.Decimal(new int[] {
-																		   1,
-																		   0,
-																		   0,
-																		   0});
-			this.udWeeksToApply.Name = "udWeeksToApply";
-			this.udWeeksToApply.Size = new System.Drawing.Size(96, 20);
-			this.udWeeksToApply.TabIndex = 12;
-			this.udWeeksToApply.Value = new System.Decimal(new int[] {
-																		 1,
-																		 0,
-																		 0,
-																		 0});
-			// 
-			// label1
-			// 
-			this.label1.Location = new System.Drawing.Point(16, 104);
-			this.label1.Name = "label1";
-			this.label1.Size = new System.Drawing.Size(152, 16);
-			this.label1.TabIndex = 13;
-			this.label1.Text = "Starting Week (Monday):";
-			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-			// 
-			// label2
-			// 
-			this.label2.Location = new System.Drawing.Point(16, 144);
-			this.label2.Name = "label2";
-			this.label2.Size = new System.Drawing.Size(152, 16);
-			this.label2.TabIndex = 13;
-			this.label2.Text = "Number of Weeks to Apply:";
-			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-			// 
-			// DAccessTemplate
-			// 
-			this.AcceptButton = this.cmdOK;
-			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-			this.CancelButton = this.cmdCancel;
-			this.ClientSize = new System.Drawing.Size(440, 304);
-			this.Controls.Add(this.label1);
-			this.Controls.Add(this.udWeeksToApply);
-			this.Controls.Add(this.dtpStartDate);
-			this.Controls.Add(this.txtTemplate);
-			this.Controls.Add(this.cmdSelectTemplate);
-			this.Controls.Add(this.pnlDescription);
-			this.Controls.Add(this.pnlPageBottom);
-			this.Controls.Add(this.label2);
-			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-			this.Name = "DAccessTemplate";
-			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-			this.Text = "Apply Access Template";
-			this.Closing += new System.ComponentModel.CancelEventHandler(this.DAccessTemplate_Closing);
-			this.pnlPageBottom.ResumeLayout(false);
-			this.pnlDescription.ResumeLayout(false);
-			this.grpDescriptionResourceGroup.ResumeLayout(false);
-			((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).EndInit();
-			this.ResumeLayout(false);
+            this.pnlPageBottom = new System.Windows.Forms.Panel();
+            this.cmdCancel = new System.Windows.Forms.Button();
+            this.cmdOK = new System.Windows.Forms.Button();
+            this.pnlDescription = new System.Windows.Forms.Panel();
+            this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
+            this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
+            this.cmdSelectTemplate = new System.Windows.Forms.Button();
+            this.txtTemplate = new System.Windows.Forms.TextBox();
+            this.dtpStartDate = new System.Windows.Forms.DateTimePicker();
+            this.udWeeksToApply = new System.Windows.Forms.NumericUpDown();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.pnlPageBottom.SuspendLayout();
+            this.pnlDescription.SuspendLayout();
+            this.grpDescriptionResourceGroup.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // pnlPageBottom
+            // 
+            this.pnlPageBottom.Controls.Add(this.cmdCancel);
+            this.pnlPageBottom.Controls.Add(this.cmdOK);
+            this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.pnlPageBottom.Location = new System.Drawing.Point(0, 264);
+            this.pnlPageBottom.Name = "pnlPageBottom";
+            this.pnlPageBottom.Size = new System.Drawing.Size(440, 40);
+            this.pnlPageBottom.TabIndex = 7;
+            // 
+            // cmdCancel
+            // 
+            this.cmdCancel.CausesValidation = false;
+            this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.cmdCancel.Location = new System.Drawing.Point(360, 8);
+            this.cmdCancel.Name = "cmdCancel";
+            this.cmdCancel.Size = new System.Drawing.Size(56, 24);
+            this.cmdCancel.TabIndex = 2;
+            this.cmdCancel.Text = "Cancel";
+            // 
+            // cmdOK
+            // 
+            this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+            this.cmdOK.Location = new System.Drawing.Point(280, 8);
+            this.cmdOK.Name = "cmdOK";
+            this.cmdOK.Size = new System.Drawing.Size(64, 24);
+            this.cmdOK.TabIndex = 1;
+            this.cmdOK.Text = "OK";
+            this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
+            // 
+            // pnlDescription
+            // 
+            this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
+            this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.pnlDescription.Location = new System.Drawing.Point(0, 184);
+            this.pnlDescription.Name = "pnlDescription";
+            this.pnlDescription.Size = new System.Drawing.Size(440, 80);
+            this.pnlDescription.TabIndex = 8;
+            // 
+            // grpDescriptionResourceGroup
+            // 
+            this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
+            this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
+            this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
+            this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(440, 80);
+            this.grpDescriptionResourceGroup.TabIndex = 1;
+            this.grpDescriptionResourceGroup.TabStop = false;
+            this.grpDescriptionResourceGroup.Text = "Description";
+            // 
+            // lblDescriptionResourceGroup
+            // 
+            this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
+            this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
+            this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(434, 61);
+            this.lblDescriptionResourceGroup.TabIndex = 0;
+            this.lblDescriptionResourceGroup.Text = "Use this panel to define an access pattern for future clinic availability.";
+            // 
+            // cmdSelectTemplate
+            // 
+            this.cmdSelectTemplate.Location = new System.Drawing.Point(24, 40);
+            this.cmdSelectTemplate.Name = "cmdSelectTemplate";
+            this.cmdSelectTemplate.Size = new System.Drawing.Size(136, 32);
+            this.cmdSelectTemplate.TabIndex = 9;
+            this.cmdSelectTemplate.Text = "Select Access Template";
+            this.cmdSelectTemplate.Click += new System.EventHandler(this.cmdSelectTemplate_Click);
+            // 
+            // txtTemplate
+            // 
+            this.txtTemplate.Location = new System.Drawing.Point(176, 32);
+            this.txtTemplate.Multiline = true;
+            this.txtTemplate.Name = "txtTemplate";
+            this.txtTemplate.ReadOnly = true;
+            this.txtTemplate.Size = new System.Drawing.Size(248, 48);
+            this.txtTemplate.TabIndex = 10;
+            // 
+            // dtpStartDate
+            // 
+            this.dtpStartDate.AllowDrop = true;
+            this.dtpStartDate.Checked = false;
+            this.dtpStartDate.Location = new System.Drawing.Point(176, 104);
+            this.dtpStartDate.Name = "dtpStartDate";
+            this.dtpStartDate.Size = new System.Drawing.Size(184, 20);
+            this.dtpStartDate.TabIndex = 11;
+            // 
+            // udWeeksToApply
+            // 
+            this.udWeeksToApply.Location = new System.Drawing.Point(176, 144);
+            this.udWeeksToApply.Maximum = new decimal(new int[] {
+            52,
+            0,
+            0,
+            0});
+            this.udWeeksToApply.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.udWeeksToApply.Name = "udWeeksToApply";
+            this.udWeeksToApply.Size = new System.Drawing.Size(96, 20);
+            this.udWeeksToApply.TabIndex = 12;
+            this.udWeeksToApply.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            // 
+            // label1
+            // 
+            this.label1.Location = new System.Drawing.Point(16, 104);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(152, 16);
+            this.label1.TabIndex = 13;
+            this.label1.Text = "Starting Week:";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            // 
+            // label2
+            // 
+            this.label2.Location = new System.Drawing.Point(16, 144);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(152, 16);
+            this.label2.TabIndex = 13;
+            this.label2.Text = "Number of Weeks to Apply:";
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            // 
+            // DAccessTemplate
+            // 
+            this.AcceptButton = this.cmdOK;
+            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+            this.CancelButton = this.cmdCancel;
+            this.ClientSize = new System.Drawing.Size(440, 304);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.udWeeksToApply);
+            this.Controls.Add(this.dtpStartDate);
+            this.Controls.Add(this.txtTemplate);
+            this.Controls.Add(this.cmdSelectTemplate);
+            this.Controls.Add(this.pnlDescription);
+            this.Controls.Add(this.pnlPageBottom);
+            this.Controls.Add(this.label2);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.Name = "DAccessTemplate";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Apply Access Template";
+            this.Closing += new System.ComponentModel.CancelEventHandler(this.DAccessTemplate_Closing);
+            this.pnlPageBottom.ResumeLayout(false);
+            this.pnlDescription.ResumeLayout(false);
+            this.grpDescriptionResourceGroup.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.udWeeksToApply)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
 
 		}
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.resx
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.resx	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAccessTemplate.resx	(revision 913)
@@ -4,5 +4,5 @@
     Microsoft ResX Schema 
     
-    Version 1.3
+    Version 2.0
     
     The primary goals of this format is to allow a simple XML format 
@@ -15,14 +15,15 @@
     ... ado.net/XML headers & schema ...
     <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">1.3</resheader>
+    <resheader name="version">2.0</resheader>
     <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
     <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1">this is my long string</data>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
     <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
     <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        [base64 mime encoded serialized .NET Framework object]
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
     </data>
     <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        [base64 mime encoded string representing a byte array form of the .NET Framework object]
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
     </data>
                 
@@ -36,5 +37,5 @@
     mimetype set.
     
-    The mimetype is used forserialized objects, and tells the 
+    The mimetype is used for serialized objects, and tells the 
     ResXResourceReader how to depersist the object. This is currently not 
     extensible. For a given mimetype the value must be set accordingly:
@@ -46,5 +47,5 @@
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
     
@@ -60,7 +61,25 @@
     -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
         <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
           <xsd:element name="data">
             <xsd:complexType>
@@ -69,7 +88,8 @@
                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
@@ -90,176 +110,11 @@
   </resheader>
   <resheader name="version">
-    <value>1.3</value>
+    <value>2.0</value>
   </resheader>
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <data name="pnlPageBottom.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="pnlPageBottom.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="pnlPageBottom.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="pnlPageBottom.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>8, 8</value>
-  </data>
-  <data name="pnlPageBottom.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="pnlPageBottom.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="cmdCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="cmdCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="cmdCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="cmdOK.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="cmdOK.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="cmdOK.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="pnlDescription.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="pnlDescription.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="pnlDescription.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="pnlDescription.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>8, 8</value>
-  </data>
-  <data name="pnlDescription.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="pnlDescription.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="grpDescriptionResourceGroup.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="grpDescriptionResourceGroup.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>8, 8</value>
-  </data>
-  <data name="grpDescriptionResourceGroup.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="grpDescriptionResourceGroup.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="grpDescriptionResourceGroup.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="grpDescriptionResourceGroup.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="lblDescriptionResourceGroup.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="lblDescriptionResourceGroup.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="lblDescriptionResourceGroup.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="cmdSelectTemplate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="cmdSelectTemplate.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="cmdSelectTemplate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="txtTemplate.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="txtTemplate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="txtTemplate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="dtpStartDate.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dtpStartDate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="dtpStartDate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="udWeeksToApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="udWeeksToApply.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="udWeeksToApply.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>(Default)</value>
-  </data>
-  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </data>
-  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>8, 8</value>
-  </data>
-  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>80</value>
-  </data>
-  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </data>
-  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>Private</value>
-  </data>
-  <data name="$this.Name">
-    <value>DAccessTemplate</value>
-  </data>
 </root>
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.cs
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.cs	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.cs	(revision 913)
@@ -400,5 +400,5 @@
             this.label16.Size = new System.Drawing.Size(69, 16);
             this.label16.TabIndex = 27;
-            this.label16.Text = "Phone (Cell):";
+            this.label16.Text = "Cell/Mobile:";
             this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
             // 
Index: /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.resx
===================================================================
--- /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.resx	(revision 912)
+++ /Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.resx	(revision 913)
@@ -124,10 +124,4 @@
     <value>179, 17</value>
   </metadata>
-  <metadata name="dsPatientApptDisplay2BindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>179, 17</value>
-  </metadata>
-  <metadata name="dsPatientApptDisplay2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <metadata name="dsPatientApptDisplay2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
