<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
	<xsl:output method="html" indent="no"/>
	<xsl:decimal-format NaN=""/>
	<xsl:param name="dvt_apos">'</xsl:param>
	<xsl:param name="ManualRefresh"></xsl:param>
	<xsl:param name="Today">CurrentDate</xsl:param>
	<xsl:variable name="dvt_1_automode">0</xsl:variable>
	<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
		<div id="currentEventsBox" class="UpcomingEd">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td><h2>Upcoming Events</h2></td>
					<td align="right"><div id="calendarLink"><a href="/NewsEvents/Pages/Calendar.aspx" target="_self">Events Calendar</a></div></td>
				</tr>
			</table>			
			<xsl:call-template name="dvt_1"/>
			<div id="calendarLegend"><img src="/images/tconf.gif" align="absmiddle" alt="Webinar" title="Webinar" border="0" />-denotes Webinar</div>
		</div>
	</xsl:template>
	<xsl:template name="dvt_1">
		<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
		<xsl:variable name="RowLimit" select="8" />
		<xsl:variable name="dvt_RowCount" select="count($Rows)"/>
		<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
		<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
		<xsl:choose>
			<xsl:when test="$dvt_IsEmpty">
				<div id="current_events_container">
					<xsl:call-template name="dvt_1.empty"/>
				</div>
			</xsl:when>
			<xsl:otherwise>
				<div id="current_events_container" style="height:306px;overflow:hidden;padding-left:24px">
					<xsl:call-template name="dvt_1.body">
						<xsl:with-param name="Rows" select="$Rows"/>
						<xsl:with-param name="FirstRow" select="1" />
						<xsl:with-param name="LastRow" select="$RowLimit" />
					</xsl:call-template>
				</div>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="dvt_1.body">
		<xsl:param name="Rows"/>
		<xsl:param name="FirstRow" />
		<xsl:param name="LastRow" />
		<xsl:for-each select="$Rows">
			<xsl:variable name="dvt_KeepItemsTogether" select="false()" />
			<xsl:variable name="dvt_HideGroupDetail" select="false()" />
			<xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether">
				<xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
					<xsl:call-template name="dvt_1.rowview" />
				</xsl:if>
			</xsl:if>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="dvt_1.rowview">
		<xsl:variable name="monthDay" select="ddwrt:FormatDate(string(@EventDate) ,1033 ,3)" />
		<xsl:variable name="month" select="substring(substring-after($monthDay,', '),1,3)" />
		<xsl:variable name="monthDay1" select="ddwrt:FormatDate(string(@EventDate) ,1033 ,1)" />
		<xsl:variable name="day" select="substring(substring-after($monthDay1,'/'),1,3)" />
		<xsl:variable name="dayTrim" select="substring-before($day,'/')" />
		<div class="webinar_container" style="background-image: url({@Image});margin-bottom:20px">
			<div style="padding:10px">
				<div class="webinar_month"><xsl:value-of select="$month" disable-output-escaping="yes" /></div>
				<div class="webinar_day"><xsl:value-of select="$dayTrim" disable-output-escaping="yes" /></div>
				<div class="webinar_info">
					<div class="webinar_title">	
						<xsl:if test="@EventType = 'Webinar'">
							<img src="/images/tconf.gif" align="absmiddle" alt="Webinar" title="Webinar" border="0" />&#160;
						</xsl:if>
						<xsl:choose>
							<xsl:when test="@URLID = ''">
								<xsl:value-of select="@Title" disable-output-escaping="yes" />
							</xsl:when>
							<xsl:when test="string-length(@URLID) &lt; 5">
								<a href="javascript:void(0);" onclick="window.open('/NewsEvents/SitePages/EventDetail.aspx?eventid={@URLID}', 'Info', 'toolbar=0,location=0,directories=0, status=0, menubar=0,scrollbars=1, resizable=0,width=400, height=400'); return false;" target="_self"><xsl:value-of select="@Title" disable-output-escaping="yes" /></a>
							</xsl:when>
							<xsl:when test="@OpenURLInNewWindow = 'Yes'">
								<a href="{@URLID}" target="_blank"><xsl:value-of select="@Title" disable-output-escaping="yes" /></a>
							</xsl:when>
							<xsl:otherwise>
								<a href="{@URLID}" target="_self"><xsl:value-of select="@Title" disable-output-escaping="yes" /></a>
							</xsl:otherwise>
						</xsl:choose>
					</div>
					<div class="webinar_date">
						<xsl:choose>
							<xsl:when test="@EventDate = @EndDate"><!--xsl:value-of select="@EventDate" disable-output-escaping="yes" /> and <xsl:value-of select="@EndDate" disable-output-escaping="yes" /-->
								<xsl:value-of select="ddwrt:FormatDate(string(@EventDate) ,1033 ,3)"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="ddwrt:FormatDate(string(@EventDate) ,1033 ,3)"/>-<xsl:value-of select="ddwrt:FormatDate(string(@EndDate) ,1033 ,3)"/>		
							</xsl:otherwise>
						</xsl:choose>
					</div>
				</div>
				<hr />
				<xsl:if test="@CalendarInvite != ''">
					<div class="webinar_ics"><a href="{@CalendarInvite}" target="_blank"><img src="/UpcomingWebinarImages/ICS_icon.png" name="Add to Calendar" title="Add to Calendar" border="0" class="ics_icon" /></a></div>
				</xsl:if>
			</div>
		</div>
		<!--div class="current_event_item">
			<xsl:value-of select="ddwrt:FormatDate(string(@EventDate) ,1033 ,1)"/>
			&#160;-&#160;
			<xsl:if test="@EventType = 'Webinar'">
				<img src="/images/tconf.gif" align="absmiddle" alt="Webinar" title="Webinar" border="0" />&#160;
			</xsl:if>
			<xsl:choose>
				<xsl:when test="@URLID = ''">
					<xsl:value-of select="@Title" disable-output-escaping="yes" />
				</xsl:when>
				<xsl:when test="string-length(@URLID) &lt; 5">
					<a href="javascript:void(0);" onclick="window.open('/NewsEvents/SitePages/EventDetail.aspx?eventid={@URLID}', 'Info', 'toolbar=0,location=0,directories=0, status=0, menubar=0,scrollbars=1, resizable=0,width=400, height=400'); return false;" target="_self"><xsl:value-of select="@Title" disable-output-escaping="yes" /></a>
				</xsl:when>
				<xsl:when test="@OpenURLInNewWindow = 'Yes'">
					<a href="{@URLID}" target="_blank"><xsl:value-of select="@Title" disable-output-escaping="yes" /></a>
				</xsl:when>
				<xsl:otherwise>
					<a href="{@URLID}" target="_self"><xsl:value-of select="@Title" disable-output-escaping="yes" /></a>
				</xsl:otherwise>
			</xsl:choose>
		</div-->		
	</xsl:template>
	<xsl:template name="dvt_1.empty">
		There are no upcoming Educational Webinars. Please check back later for our next set of webinars.
	</xsl:template>
</xsl:stylesheet>