<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp   "&#160;">
<!ENTITY lsaquo   "&#8249;">
<!ENTITY apos   "&#39;">
<!ENTITY rsaquo   "&#8250;">
<!ENTITY laquo  "&#171;">
<!ENTITY raquo  "&#187;">
<!ENTITY copy   "&#169;">
]>
<!--

-->
<xsl:stylesheet version="3.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:ou="http://omniupdate.com/XSL/Variables"
	xmlns:fn="http://omniupdate.com/XSL/Functions"
	xmlns:ouc="http://omniupdate.com/XSL/Variables"
	exclude-result-prefixes="ou xsl xs fn ouc"
	expand-text="yes">

	<xsl:import href="../_shared/template-matches.xsl" />
	<xsl:import href="../_shared/force-self-closing.xsl" />
	<xsl:import href="../_shared/variables.xsl" />
	<xsl:import href="../_shared/functions.xsl" />

	<!-- <xsl:output method="html" version="4.0" indent="no" encoding="UTF-8" include-content-type="no" omit-xml-declaration="yes"/> -->
	<xsl:output method="xml" version="1.0" omit-xml-declaration="yes"/>
	<xsl:strip-space elements="*"/>

	<xsl:template match="/document">
		<xsl:choose>
			<xsl:when test="$ou:action = 'pub'">
				<xsl:call-template name="content" />
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="preview" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template name="common-headcode">
		<xsl:copy-of select="ou:include-file('/_resources/includes/headcode.inc')" />
	</xsl:template>

	<xsl:template name="preview">
		<html>
			<head>
				<title>Global Footer PCF to Include</title>
				<xsl:if test="$ou:action != 'edt'">
					<xsl:call-template name="common-headcode" />
				</xsl:if>
				<xsl:if test="$ou:action = 'edt'">
					<xsl:copy-of select="ou:include-file('/_resources/includes/headcode.inc')"/>
				</xsl:if>

				<xsl:if test="$ou:action != 'pub'">
					<style>
						.footer  {{top:0px !important;}}

						.leftSideFooterArea   {{top:150px !important; width:200px;}}

						.rightSideFooterArea  {{top:-30px !important;}}

					</style>
				</xsl:if>
			</head>
			<body>
				<xsl:call-template name="content" />

				<xsl:if test="$ou:action = 'edt'">
					<xsl:copy-of select="ou:include-file('/_resources/includes/footcode.inc')"/>
				</xsl:if>
				
			</body>
		</html>
	</xsl:template>

	<xsl:template name="content">
		<!-- Footer links and image -->
		<img class="footer" src="/_resources/images/footer.jpg" alt="Winthrop University Footer" />

		<div class="leftSideFooterArea">
			<p class="footerText">
				<xsl:apply-templates select="ouc:div[@label='footer-content']" />
			</p>
			<p class="footerText">© Winthrop University<xsl:value-of disable-output-escaping="yes">&lt;br/&gt;</xsl:value-of>
			<a id="directedit">&nbsp;</a>
		</p>
	</div>

	<div class="rightSideFooterArea">
		<div class="footerLeftColumn">
			<p class="footerText">
				<xsl:apply-templates select="ouc:div[@label='footer-links-1']" />
			</p>
		</div>

		<div class="footerMiddleColumn">
			<p class="footerText">
				<xsl:apply-templates select="ouc:div[@label='footer-links-2']" />
			</p>
		</div>

		<div class="footerRightColumn">
			<p class="footerText">
				<xsl:apply-templates select="ouc:div[@label='footer-links-3']" />
			</p>
		</div>
		<div style="clear: both;"></div>
	</div>
</xsl:template>

</xsl:stylesheet>
