<?xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'
version="1.0">
	<xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>

	<xsl:template match="/data">
		<xsl:text disable-output-escaping="yes"><![CDATA[
		<script type="text/javascript" src="/estilos/puntos.js"></script>
		]]></xsl:text>
		<xsl:call-template name="Delegaciones"/>
	</xsl:template>
	
	
	<xsl:template name="Delegaciones">
		<table cellpadding="0" cellspacing="0" width="100%" style="">
			<tr>
				<td style="font-size:1px;width:15px;">&#160;</td>
				<td style="font-size:14px; font-family:Verdana; font-weight:bold; text-transform:uppercase; padding-bottom:15px;border-bottom:1px solid #ececec;">
					<xsl:value-of select="//querystring/field[@name='Combprincipal']"></xsl:value-of>
				</td>
				<td style="font-size:1px;width:15px;">&#160;</td>
			</tr>
		</table>
		<xsl:for-each select="row">
			<xsl:if test="substring-before(CombosEnlazados,'|')=//querystring/field[@name='Combprincipal']">
				<xsl:choose>
					<xsl:when test="substring-after(CombosEnlazados,'|')=//querystring/field[@name='CombDependiente']">
						<table cellpadding="0" cellspacing="0" width="100%" style="padding-left:15px;padding-top:15px;">
							<tr>
								<td valign="top" style="padding-top:15px;">
									<a name="Delegacion" id="Delegacion" style="cursor:pointer;color:#e58b30;font-size:14px;font-family:'Verdana';font-weight:bold;">
										<xsl:attribute name="onclick">
											javascript:redirigir('<xsl:value-of select="Title"/>');
										</xsl:attribute>
										<xsl:value-of select="Title"></xsl:value-of>
									</a>
								</td>
							</tr>
							<tr>
								<td valign="top">
									<xsl:value-of disable-output-escaping="yes" select="Descripcion" ></xsl:value-of>
								</td>
								<td style="width:100px; vertical-align:bottom;padding-right:15px;">
									<a>
										<xsl:attribute name="href">
											mailto:<xsl:value-of select="Email"></xsl:value-of>
										</xsl:attribute>
										<img border="0" src="/ImagenesEduca/btn_EnviarMail.jpg"></img>
									</a>
								</td>
							</tr>
						</table>
						<table cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td style="font-size:1px;width:15px;">&#160;</td>
								<td colspan="2" style="border-bottom:1px solid #ececec;">&#160;</td>
								<td style="font-size:1px;width:15px;">&#160;</td>
							</tr>
						</table>
					</xsl:when>
					<xsl:when test="//querystring/field[@name='CombDependiente']='undefined'">
						<table cellpadding="0" cellspacing="0" width="100%" style="padding-left:15px;padding-top:15px;">
							<tr>
								<td valign="top">
									<a name="Delegacion" id="Delegacion" style="cursor:pointer;color:#e58b30;font-size:14px;font-family:'Verdana';font-weight:bold;">
										<xsl:attribute name="onclick">
											javascript:redirigir('<xsl:value-of select="Title"/>');
										</xsl:attribute>
										<xsl:value-of select="Title"></xsl:value-of>
									</a>
								</td>
							</tr>
							<tr>
								<td valign="top">
									<xsl:value-of disable-output-escaping="yes" select="Descripcion" ></xsl:value-of>
								</td>
								<td style="width:100px; vertical-align:bottom;padding-right:15px;">
									<a >
										<xsl:attribute name="href">
											mailto:<xsl:value-of select="Email"></xsl:value-of>
										</xsl:attribute>
										<img border="0" src="/ImagenesEduca/btn_EnviarMail.jpg"></img>
									</a>
								</td>
							</tr>
						</table>
						<table cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td style="font-size:1px;width:15px;">&#160;</td>
								<td colspan="2" style="border-bottom:1px solid #ececec;">&#160;</td>
								<td style="font-size:1px;width:15px;">&#160;</td>
							</tr>
						</table>
					</xsl:when>
					<xsl:when test="//querystring/field[@name='CombDependiente']=''">
						<table cellpadding="0" cellspacing="0" width="100%" style="padding-left:15px;padding-top:15px;">
							<tr>
								<td valign="top">
									<a name="Delegacion" id="Delegacion" style="cursor:pointer;color:#e58b30;font-size:14px;font-family:'Verdana';font-weight:bold;">
										<xsl:attribute name="onclick">
											javascript:redirigir('<xsl:value-of select="Title"/>');
										</xsl:attribute>
										<xsl:value-of select="Title"></xsl:value-of>
									</a>
								</td>
							</tr>
							<tr>
								<td valign="top">
									<xsl:value-of disable-output-escaping="yes" select="Descripcion" ></xsl:value-of>
								</td>
								<td style="width:100px; vertical-align:bottom;padding-right:15px;">
									<a >
										<xsl:attribute name="href">
											mailto:<xsl:value-of select="Email"></xsl:value-of>
										</xsl:attribute>
										<img border="0" src="/ImagenesEduca/btn_EnviarMail.jpg"></img>
									</a>
								</td>
							</tr>
						</table>
						<table cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td style="font-size:1px;width:15px;">&#160;</td>
								<td colspan="2" style="border-bottom:1px solid #ececec;">&#160;</td>
								<td style="font-size:1px;width:15px;">&#160;</td>
							</tr>
						</table>
					</xsl:when>

					<xsl:otherwise>

					</xsl:otherwise>
				</xsl:choose>
			</xsl:if>
			<xsl:if test="//querystring/field[@name='Combprincipal']=''">
				<table cellpadding="0" cellspacing="0" width="100%" style="padding-left:15px;padding-top:15px;">
					<tr>
						<td valign="top" style="padding-top:15px;">
							<a name="Delegacion" id="Delegacion" style="cursor:pointer;color:#e58b30;font-size:14px;font-family:'Verdana';font-weight:bold;">
								<xsl:attribute name="onclick">
									javascript:redirigir('<xsl:value-of select="Title"/>');
								</xsl:attribute>
								<xsl:value-of select="Title"></xsl:value-of>
							</a>
						</td>
					</tr>
					<tr>
						<td valign="top">
							<xsl:value-of disable-output-escaping="yes" select="Descripcion" ></xsl:value-of>
						</td>
						<td style="width:100px; vertical-align:bottom;padding-right:15px;">
							<a>
								<xsl:attribute name="href">
									mailto:<xsl:value-of select="Email"></xsl:value-of>
								</xsl:attribute>
								<img border="0" src="/ImagenesEduca/btn_EnviarMail.jpg"></img>
							</a>
						</td>
					</tr>
				</table>
				<table cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td style="font-size:1px;width:15px;">&#160;</td>
						<td colspan="2" style="border-bottom:1px solid #ececec;">&#160;</td>
						<td style="font-size:1px;width:15px;">&#160;</td>
					</tr>
				</table>
			</xsl:if>
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>

