<html> 
<%@page info="wekview" language="java" pageEncoding="utf-8" contentType="text/html; charset=UTF-8" %>

<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
<%@taglib uri="/WEB-INF/uwc.tld" prefix="uwc"%>
<%@include file="../../uwc/js/resourceBundleUtils.js"%>
<%@include file="../../uwc/js/minicalinclude.js"%>
<jato:useViewBean className="com.sun.uwc.calclient.WeekViewViewBean">

<head>
<title><%= getLocalizedLabel(session, "uwc-calclient-view-weekview-Title", "Calendar Week View - Communications Express") %></title>
<link rel="stylesheet" href="../uwc/css/css_ie5win.css" type="text/css">
<style type="text/css">
#searchON { display: "inline"; }
#searchControlOn { display: "inline"; }
</style>
</head>


<script language="JavaScript" src="../uwc/js/scripts.js"></script>
<script language="JavaScript" src="../uwc/js/uwcUtils.js"></script>
<script src="../uwc/js/browserVersion.js" type="text/javascript"></script>
<script type="text/javascript">
//<!--
  if (is_ie5up) // IE5
  {
	document.write("<LINK href=../uwc/css/css_ie5win.css type=text/css rel=stylesheet>")
  }
  else if (is_gecko) // Netscape 6/7 or Mozilla
  {
	document.write("<LINK href=../uwc/css/css_ns6up.css type=text/css rel=stylesheet>") 

  }
  else  // All others
  {
	document.write("<LINK href=../uwc/css/css_ns6up.css type=text/css rel=stylesheet>") 
  }
//-->
</script>

<script>
var uwcViewUrl = "<%=getContextURI(request) %>/calclient/WeekView?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" 

</script>


<script>
var search_click = 0;

var CANCEL = "Cancle";
var THIS_INSTANCE_ONLY = "ThisInstanceOnly";
var THIS_AND_FUTURE_INSTANCES = "ThisAndFutureInstances";

function clearSearch() {
	if (search_click < 1) {
		document.form_main.search_field.value = "";
	    search_click = 1;
	}
}

function handleDeleteEvent(calid,eventid,isrecurring,eventrid) {

	document.forms[0].elements["WeekView.eventCalid"].value=calid;
	document.forms[0].elements["WeekView.eventUid"].value=eventid;
	document.forms[0].elements["WeekView.eventRid"].value=eventrid;
	document.forms[0].elements["WeekView.recurring"].value=isrecurring;
	document.forms[0].elements["WeekView.action"].value="deleteevent";
			      
	if(isrecurring == "true") 
	{
		window.open('<%= getContextURI(request) %>/uwc/js/DeleteEventConfirmRepeatSelection.jsp', 'RepeatingSelection', 'scrollbars=yes,resizable=yes,width=500,height=175'); 
	}
	else if(UWCConfirm("<%= getLocalizedLabel(session, "uwc-calclient-event-DeleteEventConfirmQuestion", "Are you sure you want to delete this event?") %>")) {
		document.forms[0].elements["WeekViewSubmit"].click(); 
	} else {
		return 0;
	} 
}

function setRepeatingSelectionModifier(theSelection) {
	if(CANCEL == theSelection) {
		return;
	}
	document.forms[0].elements["WeekView.modifier"].value=theSelection;
	document.forms[0].elements["WeekViewSubmit"].click();
}

</script>


<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="Page">

<jato:form name="WeekViewForm" method="post" defaultCommandChild="/CalSearchBar/SearchEvents" >
  <table cellspacing=0 cellpadding=0 width="100%" border=0 bgcolor="#CCCCFF">
    <tr>
      <td class="SkpMst"><a href=#tabs><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel", "uwc-common-skiplink-Masthead-message", "Skip Masthead")%>"></a></td>
      <td class="SkpMst"><a href=#calendarviewtabs><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel", "uwc-common-skiplink-GlobalTabs-message", "Skip Global Tabs")%>"></a></td>
       <td class="SkpMst"><a href=#toolbar><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel", "uwc-common-skiplink-CalendarViewTabs-message", "Skip Calendar View Tabs")%>"></a></td>
       <td class="SkpMst"><a href=#searchevents><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel", "uwc-common-skiplink-SearchEvents-message", "Search for Events")%>"></a></td>
	   <td class="SkpMst"><a href=#jumptomenus><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel","uwc-common-skiplink-jumpToDayMonthYear", "Jump to a day, month or year")%>"></a></td>        <td class="SkpMst"><a href=#calendargrid><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel","uwc-common-skiplink-calendarGrid","Skip to calendar grid")%>"></a></td>
	   <td class="SkpMst"><a href=#quickaddevent><img src="../uwc/images/spacer.gif" height="1" width="1" border="0" alt="<%=getLocalizedLabel(session, "i18nModel","uwc-common-skiplink-quickAdd","Skip to Quick Add Event")%>"></a></td>
	 </tr>
   </table>



<jato:hidden name="action" defaultValue=""/>
<jato:hidden name="eventCalid" defaultValue=""/>
<jato:hidden name="eventUid" defaultValue=""/>
<jato:hidden name="eventRid" defaultValue=""/>
<jato:hidden name="modifier" defaultValue=""/>
<jato:hidden name="recurring" defaultValue=""/>

<!-- Pagelet for branding -->
	<jato:containerView name="MasterHead">
		<%@include file="/uwc/common/MasterHeadNormal.jsp"%>
	</jato:containerView>

<!-- JSP include for application toolbar -->
	<jato:containerView name="ApplnBar">
		<%@include file="/uwc/calclient/CalApplBarNormal.jsp" %>
	</jato:containerView>


<div class="Tab2">
<table border="0" cellspacing="0" cellpadding="0" class="Tab2Tbl" width="100%" summary="<%=getLocalizedLabel(session, "i18nModel","uwc-common-calendar-view-tabs", "Table that contains the Calendar View Tabs")%>">
  <tr>
      <td colspan="18"><img src="../uwc/images/spacer.gif" width="1" height="10" alt=""><a name="calendarviewtabs"></a></td>
  </tr>
  <tr>
      <td colspan="3"><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
      <td colspan="5" class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
      <td colspan="10"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
  <tr>
      <td><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>

	  <td class="Tab2NotSel">
	     <div class="Tab2NotSel"><a title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-DayAlt", "Calendar Day View")%>" href="<%=getContextURI(request) %>/calclient/DayView?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" class="TabLblNormal"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-DayHrefLabel","Day")%></a></div>
	 </td>
    <td><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
    <td class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="12" alt=""></td>
    <td class="Tab2Sel"><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>


     <td class="Tab2Sel">
       <div class="Tab2Sel"><span class="TabLblSel" title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-toolbar-tooltip-Week", "Calendar Week View")%>"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-WeekLabel", "Week")%></span></div>
	 </td>
    <td class="Tab2Sel"><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
    <td class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="12" alt=""></td>
    <td><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>


    <td class="Tab2NotSel">
      <div class="Tab2NotSel"><a title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-MonthAlt", "Calendar Month View")%>" href="<%=getContextURI(request) %>/calclient/MonthView?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" class="TabLblNormal"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-MonthHrefLabel","Month")%></a></div>
    </td>
    <td><img src="../uwc/images/dividerbar.gif" alt="" width="24" height="20"></td>


    <td class="Tab2NotSel">
	   <div class="Tab2NotSel"><a title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-YearAlt", "Calendar Year View")%>" href="<%= getContextURI(request) %>/calclient/YearView?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" class="TabLblNormal"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-YearHrefLabel", "Year")%></a></div>
    </td>
    <td><img src="../uwc/images/dividerbar.gif" alt="" width="24" height="20"></td>


    <td class="Tab2NotSel">
      <div class="Tab2NotSel"><a title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-EventsAlt", "Calendar Events View")%>" href="<%= getContextURI(request) %>/calclient/Events?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" class="TabLblNormal"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-EventsHrefLabel", "Events")%></a></div>
    </td>
	 <td><img src="../uwc/images/dividerbar.gif" alt="" width="24" height="20"></td>
    <td class="Tab2NotSel">
	 <jato:content name="showInvitations">
        <div class="Tab2NotSel"><a title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-InvitationsAlt", "Calendar Invitations List")%>" href="<%= getContextURI(request) %>/calclient/Invitations?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" class="TabLblNormal">
	 </jato:content>

	 <%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-InvitationsLabel", "Invitations")%>
	  <jato:content name="showInvitations">
	    </a>
	  </jato:content>
	  </div>
    </td>
	 <td><img src="../uwc/images/dividerbar.gif" alt="" width="24" height="20"></td>


    <td class="Tab2NotSel" width="90%">
     <div class="Tab2NotSel"><a title="<%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-TasksAlt", "Tasks List")%>" href="<%= getContextURI(request) %>/calclient/Tasks?date=<jato:getDisplayFieldValue name='startDate' />&calid=<jato:getDisplayFieldValue name='contextCalId' />&caltype=<jato:getDisplayFieldValue name='calType' />&category=<jato:getDisplayFieldValue name='category' />&viewctx=week" class="TabLblNormal"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-weekview-TasksHrefLabel", "Tasks")%></a></div>
    </td>
  </tr>
  <tr>
   <td class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
   <td colspan="3" class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
   <td colspan="3"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
   <td colspan="11" class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
</table>
</div>




<!-- Error information pagelet -->
	<jato:containerView name="errorPlugin">
		<%@include file="/uwc/common/error.jsp"%>
	</jato:containerView>

<!-- JSP include for application toolbar -->
	<jato:containerView name="CalToolBar">
	    <%@include file="/uwc/calclient/CalToolBarNormal.jsp"%>
	</jato:containerView>

<!-- JSP include for search toolbar -->
	<jato:containerView name="CalSearchBar">
		<%@include file="/uwc/calclient/CalSearchBarPagelet.jsp" %>
	</jato:containerView>

<!-- JSP include for quick Nav bar toolbar -->
    <jato:containerView name="CalQuickNavBar">
       <%@include file="/uwc/calclient/CalQuickNavigationPagelet.jsp"%>
    </jato:containerView>



<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="<%=getLocalizedLabel(session, "i18nModel","uwc-common-calendar-minicalTasks","Table that contains the Main Calendar Grid, Mini-calendar, and Task List")%>">
  <tr>
    <td align="center" valign="top" class="sidebarCopy"><img src="../uwc/images/spacer.gif" alt="" width="10" height="1"></td>
    <td align="center" valign="top" class="sidebarCopy">

      <!-- JSP include for MiniCalendar -->

	  <jato:containerView name="MiniCal">
		  <jsp:include page="/uwc/common/minical.jsp" />
	  </jato:containerView>

  <tr>
    <td><img src="../uwc/images/spacer.gif" alt="" width="1" height="10"></td>
   </tr>

      <!-- Time Zone Display -->
   <tr>
    <td class="McalOutline"><div class="McalTimeZone"><span class="Lbl2"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-month-TimeZoneLabel", "Time Zone:") %></span><br>
	      <jato:text name="timezone"/></div></td>
   </tr>

</table>


	  <!--  JSP include for Tasks pane...  --> 
	  <jato:containerView name="TasksPane">
		  <%@include file="/uwc/calclient/tasksPane.jsp" %>
	  </jato:containerView>


	</td>
	<td><img src="../uwc/images/spacer.gif" alt"" width="10" height="1"></td>
	<td valign="top" width="100%">
	   <table width="100%" cellspacing="0" cellpadding="0" class="CalGrid">
	    <tr>
			<td colspan="8" class="GridHdr"><a href="<jato:text name='previousWeekURL' />"><img src="<%= getLocalizedLabel(session, "skinModel", "uwc-calclient-Back-Arrow-image", "../uwc/images/back.gif") %>" width="13" height="13" align="absmiddle" alt="<%=getLocalizedLabel(session, "uwc-calclient-events-DisplayEventsForPreviousWeek", "Display Events for Previous Week") %>" border="0"></a>&nbsp;&nbsp;<span class="BlockHeaderText"><jato:getDisplayFieldValue escape="false" name="displayWeek"/></span>&nbsp;&nbsp;<a href="<jato:text name='nextWeekURL' />"><img src="<%= getLocalizedLabel(session, "skinModel", "uwc-calclient-Forward-Arrow-image", "../uwc/images/forward.gif") %>" width="13" height="13" align="absmiddle" alt="<%=getLocalizedLabel(session, "uwc-calclient-events-DisplayEventsForNextWeek", "Display Events for Next Week") %>" border="0"></a></td>


		</tr>
		<tr>
		   <td class ="DayOfWeekFirst" width="9%">&nbsp;</td>


			<jato:tiledView name="dayNamesOfWeek" type="com.sun.uwc.calclient.WeekDisplayTiledView">
	        <jato:content name="notToday">
				<td nowrap class="DayOfWeek" scope="col" width="13%">
	        </jato:content>
	        <jato:content name="today">
				<td nowrap class="DayOfWeekToday" scope="col" width="13%">
	        </jato:content>
				
				<a href="../calclient/DayView?date=<jato:getDisplayFieldValue name='eventdate' />&<jato:getDisplayFieldValue name='urlparams' />" title="<%=getLocalizedLabel(session, "uwc-calclient-view-weekview-displayDayView", "Display Calendar Day View") %>" class="LnkBold" target="_parent"><jato:getDisplayFieldValue escape="false" name="day"/>&nbsp;<jato:getDisplayFieldValue escape="false" name="date"/></a>&nbsp;<a href="javascript:void(0)" title="<%=getLocalizedLabel(session, "uwc-calclient-toolbar-NewEvent", "New Event")%>" class="Lnk" onClick="openWinAutoHeight('../calclient/EditEvent?date=<jato:getDisplayFieldValue name="eventdate" />&calid=<jato:getDisplayFieldValue name="neweventcalid"/>&caltype=<jato:getDisplayFieldValue name="neweventcaltype"/>','eventWin','scrollbars=yes,resizable=yes,width=600')"><span class="plus">+</span></a></td>
			</jato:tiledView>

		 </tr>
		<!-- All Day Tiled View Should Come here.... -->
		

		<tr>
		  <td scope="row" nowrap class="AllDayFirst"><span class="Lbl2"><%=getLocalizedLabel(session, "i18nModel", "uwc-calclient-event-viewEvent-allDay", "All Day")%></span></td>

			<jato:tiledView name="allDayDisplay" type="com.sun.uwc.calclient.WeekAllDayDisplayTiledView">

				<jato:content name="emptyevent">
					<td class="AllDay">&nbsp;</td>
				</jato:content>

				<jato:content name="event">
					<td class="Contain">
						<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
							<jato:tiledView name="allDayEvents" type="com.sun.uwc.calclient.WeekEventsTiledView">
								<tr colspan="1">
								<uwc:WeekViewEvent name="allDayEvents" modelName="weekAllDayEvents" printable="false" allDay="true" anon="false"/>


								</tr>
							</jato:tiledView>
						</table>
					</td>
				</jato:content>
			</jato:tiledView>
		</tr>

		
		<jato:tiledView name="timeSlotTileView" type="com.sun.uwc.calclient.WeekViewTimeSlotTiledView">
		  <tr >
		   <td scope="row" nowrap class="GridTime" ><span class="Lbl2"><jato:getDisplayFieldValue name="timeslot"/></span><span class="Lbl5"><jato:getDisplayFieldValue escape="false" name="ampm"/></span>
				<a href="javascript:void(0)" class="Lnk" onClick="openWinAutoHeight('../calclient/EditEvent?calid=<jato:getDisplayFieldValue name='neweventcalid'/>&caltype=<jato:getDisplayFieldValue name='neweventcaltype' />&start=<jato:getDisplayFieldValue name='timeslotstart'/>&end=<jato:getDisplayFieldValue name='timeslotend'/>', 'eventWin', 'width=600,titlebar=yes,resizable=yes,scrollbars=yes'); return false;"> <span class="plus">+</span></a>

			</td>

			  <jato:tiledView name="weekViewTiledView" type="com.sun.uwc.calclient.WeekViewTiledView">
				<jato:content name="emptyevent">
					<td>&nbsp;</td>
				</jato:content>

				<jato:content name="event">

						<jato:content name="ConflictingOwnedCalendar">
							<td rowspan="<jato:getDisplayFieldValue name='span'/>" class="ContentSelfConflict" >
						</jato:content>
						<jato:content name="ConflictingNonOwnedCalendar">
							<td rowspan="<jato:getDisplayFieldValue name='span'/>" class="ContentExtConflict" >
						</jato:content>
						<jato:content name="NonConflictingOwnedCalendar">
							<td rowspan="<jato:getDisplayFieldValue name='span'/>" class="ContentSelf" >
						</jato:content>
						<jato:content name="NonConflictingNonOwnedCalendar">
							<td rowspan="<jato:getDisplayFieldValue name='span'/>" class="ContentExt" >
						</jato:content>
						<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
							<jato:tiledView name="nonAllDayEvents" type="com.sun.uwc.calclient.WeekEventsTiledView">

								<tr colspan="1">
								<uwc:WeekViewEvent name="nonAllDayEvents" modelName="weekNonAllDayEvents" printable="false" allDay="false" anon="false"/>

								</tr>
							</jato:tiledView>
						</table>
					</td>
				</jato:content>
			</jato:tiledView>
		  </tr>
	</jato:tiledView>
		 
	   </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td>&nbsp;</td>
     </tr>
  </table>
  <div class="Tab1Gutter" style="visibility: hidden;">
    <jato:button styleClass="Btn1" name="WeekViewSubmit" elementId="WeekViewSubmit" defaultValue=" "/>
  </div>
</jato:form>

         <!--Quick Add Event -->
   <jato:form name="QuickAddForm" method="post" defaultCommandChild="/QuickAdd/quickeventadd">
       <jato:containerView name="QuickAdd">
           <%@include file="/uwc/calclient/quickaddevent.jsp"%>
       </jato:containerView>

	   <br>
	    <!--Include  Calendar URL here-->
	       <jato:content name="showAnonAccessURL">
		       <table border="0" align="center" cellpadding="5" cellspacing="0" class="Grid">
			     <tr>
			         <td class="URL"><span class="Lbl2"><%= getLocalizedLabel(session, "i18nModel", "uwc-calclient-view-month-AnonUrlLabel", "The URL to access this calendar is:") %>&nbsp;</span>
			          <jato:text name="anonUrl"/>
			         </td>
			     </tr>
	          </table>


	      </jato:content>

	  </td>
	  <td><img src="../uwc/images/spacer.gif" width="10" height="1"></td>
    </tr>
    <tr>
	   <td colspan="5">&nbsp;</td>
    </tr>
							
  </table>

</jato:form>
</body>
</jato:useViewBean> 
</html>
