﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:import href="GenericTemplates/LoginPopup.xslt"/>

	<xsl:template match="/">
		<div style='margin:15px;'>
			<xsl:call-template name="TemplateContainer">
				<xsl:with-param name="ContentHtml" select="AjaxRequest/Params/TemplateData/ContentHtml"></xsl:with-param>
				<xsl:with-param name="InstructionsHtml" select="AjaxRequest/Params/TemplateData/InstructionsHtml"></xsl:with-param>
				<xsl:with-param name="RelatedTemplatesHtml" select="AjaxRequest/Params/TemplateData/RelatedTemplatesHtml"></xsl:with-param>
				<xsl:with-param name="PayPalHTML" select="AjaxRequest/Params/TemplateData/PayPalHTML"></xsl:with-param>
				<xsl:with-param name="SourceID" select="normalize-space(AjaxRequest/Params/SourceID)"></xsl:with-param>
			</xsl:call-template>
		</div>
	</xsl:template>

	<xsl:template name="TemplateContainer">
		<xsl:param name="ContentHtml" select="'N/A'"></xsl:param>
		<xsl:param name="InstructionsHtml" select="'N/A'"></xsl:param>
		<xsl:param name="RelatedTemplatesHtml" select="'N/A'"></xsl:param>
		<xsl:param name="PayPalHTML" select="'N/A'"></xsl:param>
		<xsl:param name="ItemID" select="normalize-space(AjaxRequest/Params/ItemID)"></xsl:param>
		<xsl:param name="SourceID">
			<xsl:text>-99</xsl:text>
		</xsl:param>

		<div id="divTemplate_Container">

			<input type="hidden" id="hiddenSourceIDForTemplate" value="{$SourceID}"></input>

			<div class="marginTop5 marginBottom20" id="divTemplate_Content">
				<xsl:value-of select="$ContentHtml" disable-output-escaping="yes"/>
			</div>
			<!--<script language="javascript" type="text/javascript">
                template_LoadTemplate("divTemplate_Content", "<xsl:value-of select="$ItemID"/>");
            </script>-->

			<!--<xsl:call-template name ="LoginPopup"></xsl:call-template>-->



			<div id="divTemplate_Operations" style="display: none; margin-top: 20px; background-color:White;">
			</div>

			<div id="divAds" align="center" style="margin-bottom: 10px;margin-top: 5px;background-color:White;">
			</div>
			<script language="javascript" type="text/javascript">
				getActiveAdForItem("<xsl:value-of select='$ItemID'/>", "divAds", "19");
			</script>


			<div id="divTemplate_Instructions" style="margin-top: 20px;background-color:White;">
				<xsl:value-of select="$InstructionsHtml" disable-output-escaping="yes"/>
			</div>

			<xsl:if test ="$PayPalHTML != '' and $PayPalHTML != 'N/A'">
				<div id="divTemplate_Pay_Pal_Body_HTML" style="margin-top: 20px;background-color:White;">
					<xsl:value-of select="$PayPalHTML" disable-output-escaping="yes"/>
				</div>
			</xsl:if>

			<div id="divTemplate_RelatedTemplates" style="margin-top: 20px;background-color:White;">
				<xsl:value-of select="$RelatedTemplatesHtml" disable-output-escaping="yes"/>
			</div>
		</div>
	</xsl:template>
</xsl:stylesheet>
