Index: /trunk/expressoCalendar/xsl/viewDay.xsl
===================================================================
--- /trunk/expressoCalendar/xsl/viewDay.xsl	(revision 632)
+++ /trunk/expressoCalendar/xsl/viewDay.xsl	(revision 656)
@@ -7,5 +7,6 @@
 </div>
 <div width="100%" class="title" align="left" ><label id="l_date"></label><br/><br/>
-<table class="table_common" height="50%" width="100%" cellpadding="0" cellspacing="0">
+	<table class="table_common" width="100%" cellpadding="0" cellspacing="0" border="0">
+<tbody>
 <xsl:for-each select="workday">
 	<tr>
@@ -17,4 +18,5 @@
 	</tr>
 </xsl:for-each>
+</tbody>
 </table>
 </div>
Index: /trunk/expressoCalendar/inc/class.uicalendar.inc.php
===================================================================
--- /trunk/expressoCalendar/inc/class.uicalendar.inc.php	(revision 632)
+++ /trunk/expressoCalendar/inc/class.uicalendar.inc.php	(revision 656)
@@ -94,4 +94,6 @@
 	function getViewDay () {
 		$dayViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time()));
+		if (isset ($_REQUEST["uid"]))
+			$this->db_obj->user_id = $_REQUEST["uid"];
 
 		$retorno = "<today>".date('Ydm',$dayViewTime)."</today>";
@@ -125,4 +127,7 @@
 		$dayViewTime -= (date('N', $dayViewTime)%7)*86400;
 		$retorno = "<today>".date('Ydm', $dayViewTime)."</today>";
+		if (isset ($_REQUEST["uid"]))
+			$this->db_obj->user_id = $_REQUEST["uid"];
+
 
 		$fromBo = $this->db_obj->requestWeekCal($dayViewTime);
@@ -169,4 +174,6 @@
 	function getViewMonth () {
 		$monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time()));
+		if (isset ($_REQUEST["uid"]))
+			$this->db_obj->user_id = $_REQUEST["uid"];
 
 		$todayTime = strtotime(date('Y-m', $monthViewTime)."-01");
Index: /trunk/expressoCalendar/inc/class.bocalendar.inc.php
===================================================================
--- /trunk/expressoCalendar/inc/class.bocalendar.inc.php	(revision 632)
+++ /trunk/expressoCalendar/inc/class.bocalendar.inc.php	(revision 656)
@@ -30,5 +30,5 @@
 	function requestDayCal ($dayTime) {
 		$day = getdate($dayTime);
-		$query = ("SELECT * FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".(mktime(0,0,0,$day['mon'],($day['mday']+1),$day['year'])).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".(mktime(0,0,0,($day['mon']+1),$day['mday'],$day['year']))."))");
+		$query = ("SELECT * FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".(mktime(0,0,0,$day['mon'],($day['mday']+1),$day['year'])).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".(mktime(0,0,0,$day['mon'],$day['mday']+1,$day['year']))."))");
 		if (!$this->db->query($query))
 			return false;
Index: /trunk/expressoCalendar/js/calendar_functions.js
===================================================================
--- /trunk/expressoCalendar/js/calendar_functions.js	(revision 632)
+++ /trunk/expressoCalendar/js/calendar_functions.js	(revision 656)
@@ -9,4 +9,5 @@
 	this.nextView;
 	this.previousView;
+	this.uid = calUid;
 }
 
@@ -121,7 +122,11 @@
 	viewType = type;
 	screenTable = new Array();
-	XMLTools.request('$this.uicalendar.getView'+type+(data?data:''), 'GET', handler_getView);  
+	XMLTools.request('$this.uicalendar.getView'+type+(data?data:'')+'&uid='+this.uid, 'GET', handler_getView);  
 };
 
+Calendar.prototype.resetView = function()
+{
+	document.getElementById("div_main").innerHTML = "";
+}
 
 Calendar.prototype.parseView = function(data,type)
Index: /trunk/expressoCalendar/js/globals.js
===================================================================
--- /trunk/expressoCalendar/js/globals.js	(revision 632)
+++ /trunk/expressoCalendar/js/globals.js	(revision 656)
@@ -10,3 +10,3 @@
 	document.getElementById('yearLinkView').alt = get_lang('Year View');
 }
-
+var calUid = document.getElementById('cal_id').value;
Index: /trunk/expressoCalendar/index.php
===================================================================
--- /trunk/expressoCalendar/index.php	(revision 632)
+++ /trunk/expressoCalendar/index.php	(revision 656)
@@ -33,9 +33,10 @@
 	$GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
 	$bo = CreateObject('calendar.bocalendar');
-	$cat = $bo->cat;
+	$cat = &$bo->cat;
+	$cat->app_name = 'calendar'; // The categories still the same from egroupwareCalendar
 	$optionCategories = $cat->formated_list('select','all',$bo->cat_id,'True');
 	foreach ($bo->list_cals() as $cal_)
-		$optionCals .= '<option value="' . $cal_['grantor'] . '">'.$cal_['name'].'</option>' . "\n";
-
+		if (! strstr($cal_['value'],'g_'))
+			$optionCals .= '<option value="' . $cal_['grantor'] . '">'.$cal_['name'].'</option>' . "\n";
 }
 
Index: /trunk/expressoCalendar/templates/default/index.tpl
===================================================================
--- /trunk/expressoCalendar/templates/default/index.tpl	(revision 632)
+++ /trunk/expressoCalendar/templates/default/index.tpl	(revision 656)
@@ -4,10 +4,10 @@
 <tr>
 <td>
-<select name="cat_id">
+<select id="cat_id">
 {cat_options}
 </select>
 </td>
 <td>
-<select name="cal_id">
+<select id="cal_id" onchange="calendar.uid=this.value; calendar.getView('div_main',viewType);">
 {cal_options}
 </select>
