<?xml version="1.0"  encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="gb2312" omit-xml-declaration="yes" />
<xsl:strip-space elements="*"/> 
<xsl:variable name="show_method" select="number(root/@show_method)"/>
<xsl:variable name="comments" select="number(root/@comments)"/>
<xsl:variable name="digest" select="number(root/@digest)"/>
<xsl:variable name="pub_time" select="number(root/@pub_time)"/>
<xsl:variable name="reads" select="number(root/@reads)"/>
<xsl:variable name="hasPara" select="number(root/@hasPara)"/>
<xsl:variable name="blockid" select="number(root/@blockid)"/>
<xsl:variable name="dstmaster_id" select="number(root/@dstmaster_id)"/>
<xsl:variable name="dstblockid" select="number(root/@dstblockid)"/>
<xsl:variable name="subtype" select="root/@subtype"/>
<xsl:variable name="classname" select="root/@classname"/>

<xsl:template match="root">

<!--图片内容开始-->

		<xsl:choose>
			<xsl:when test="$show_method=2">		
				<xsl:call-template name="col"/>
			</xsl:when>
			<xsl:when test="$show_method=3">		
				<xsl:call-template name="lantern"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="row"/>
			</xsl:otherwise>
		</xsl:choose>

</xsl:template>

<xsl:template name="row">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
	   		<tr>
			<xsl:for-each select="list/item">
			 <xsl:if test="(position() mod 3) = 1">
			 	<xsl:element name="tr"/>
			 </xsl:if>
				<td width="4%">&#160;</td>
				<td align="center" valign="top" width="23%" height="83">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						  <tr>
							<td align="center"><div class="Hall_photo" style="width:81px; height:75px">
							<a href="{url}" target="_blank">
							<img src="{m_image_path}" onmouseout="hiddenToolTip();" onmousemove="showToolTip($('blockMyNewPho_{$blockid}_{id}').innerHTML,this)" />
							</a>
							
							<span style="display:none" id="blockMyNewPho_{$blockid}_{id}">
							  <table border="0" cellspacing="0" style="width:185px;background-color: #fcf4e4;">
								<tr>
								  <td>
									  <xsl:if test="$comments=1">
										评论数：<span class="F12_FF6600"><xsl:value-of select="comments"/></span>　
									  </xsl:if>
									  <xsl:if test="$reads=1">
										阅读数：<span class="F12_FF6600"><xsl:value-of select="hits"/></span>
									  </xsl:if>
								 </td>
								</tr>								
								<tr>
								  <td height="25">发布时间：<xsl:value-of select="pub_time"/></td>
								</tr>
								
								<xsl:if test="$digest=1">
								<tr>
								  <td height="36"><xsl:value-of select="content"/></td>
								</tr>
								</xsl:if>
							  </table>
							</span>
							</div></td>
						  </tr>
						  
						  <tr>
							<td height="20" align="center">
							<div>
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td align="center">
									<a href="{url}" target="_blank" class="InfoHint F12_000000"><xsl:value-of select="title"/></a>
									</td>
								</tr>
							</table>
							</div>
							</td>
						  </tr>				  
					</table>
				</td>
				<td width="6%">&#160;</td>
				
				</xsl:for-each> 
		  </tr>   
		  
		
	  
	 </table>
</xsl:template>


<xsl:template name="col">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<xsl:for-each select="list/item">
		<tr>
			<td width="11" valign="middle">&#160;</td>
			<td valign="middle" align="center" class="Hall_photo1" width="81" height="75">	
			<a href="{url}" target="_blank">
			<img align="middle" src="{m_image_path}"/>
			</a>
			</td>
			<td valign="middle" >
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
				  <tr>
					<td width="8%" rowspan="3">&#160;</td>
					<td width="92%" height="20" class="F12_FF6600_L">
					<div class="autohidden_13">
					<xsl:value-of select="title"/>
					 &#160;&#160;&#160;&#160;&#160;<xsl:value-of select="pub_time"/>
					 </div>
					 </td>
				  </tr>
				  <xsl:if test="$digest=1">
				  <tr>
					<td height="19"><div class="autohidden_13"><xsl:value-of select="content"/></div></td>
				  </tr>
				  </xsl:if>
				  <tr>
					<td height="15">
					<div class="autohidden_13">
					<xsl:if test="$reads=1">阅读数：<xsl:value-of select="hits"/>&#160;&#160;&#160;&#160;&#160;</xsl:if><xsl:if test="$comments=1">评论数：<xsl:value-of select="comments"/></xsl:if>
					</div>
					</td>
				  </tr>
				</table></td>
		</tr>
		<tr>
			<td height="14"></td>
		</tr>	
	</xsl:for-each>
	</table>
</xsl:template>

<xsl:template name="lantern">
<xsl:for-each select="list/item">
	<table width="100%" border="0" id="Block_{$blockid}_LanternSlide_{id}" cellspacing="0" cellpadding="0" style="display:none; width:100%">
      <tr>
        <td height="30" colspan="3" align="center" class="F14_000000_B"><xsl:value-of select="title"/></td>
      </tr>
      <tr>
        <td height="20" colspan="3" align="center">
		
		发布时间：<span class="F12_FF6600"><xsl:value-of select="pub_time"/></span>　
		
		<xsl:if test="$reads=1">
		阅读数：<span class="F12_FF6600"><xsl:value-of select="hits"/></span>
		</xsl:if>
		<xsl:if test="$comments=1">
		&#160;&#160;&#160;&#160;&#160;评论数：<span class="F12_FF6600"><xsl:value-of select="comments"/></span>
		</xsl:if>
		</td>
      </tr>
      <tr>
        <td height="15" colspan="3"></td>
      </tr>
	  <xsl:if test="$digest=1">
      <tr>
        <td width="11%" height="15"></td>
        <td width="77%"><span class="F12_000000_L"><xsl:value-of select="content"/></span></td>
        <td width="12%"></td>
      </tr>
	  </xsl:if>
      <tr>
        <td height="15" colspan="3"></td>
      </tr>
    </table>
</xsl:for-each>	
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">  			  
		<tr>
		  <td height="228" colspan="3" align="center" valign="middle">
		  <div class="Hall_photo" style="height:228px; width:210; background:#000000; text-align:center">
		  
		  <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"> 
				<tr>
					<td valign="middle" align="center">
					<img src="" border="0" style="display:none;cursor:pointer"  id="Block_{$blockid}_LanternSlide" />
					</td>
				</tr>
			</table>
		  </div></td>
		</tr>
		<tr>
		  <td colspan="3" align="center">			  
			  <table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
				  <td width="12%" height="31">&#160;</td>
				  <td width="8%"><img src="images/image/stop00.gif" id="Block_{$blockid}_LanternSlidePlayImg" style="cursor:pointer" onclick="pub_LanternSlideAction('{$blockid}','stop',this)" /></td>
				  <td width="4%">&#160;</td>
				  <td width="15%"><img src="images/image/play003.gif" style="cursor:pointer" onclick="pub_LanternSlideAction('{$blockid}','end')"/></td>
				  <td width="4%">&#160;</td>
				  <td width="9%"><img src="images/image/play002gif.gif" style="cursor:pointer" onclick="pub_LanternSlideAction('{$blockid}','prev',this)" /></td>
				 <td width="4%">&#160;</td>
				  <td><img src="images/image/play001.gif" style="cursor:pointer" onclick="pub_LanternSlideAction('{$blockid}','next',this)" /></td>
				</tr>
			  </table>						  
		  </td>
		</tr>
	</table>
	
	<script type="text/javascript" defer="defer">
	<xsl:for-each select="list/item">
	//alert('<xsl:value-of select="picture"/>')
	</xsl:for-each>
	pub_LanternSlideInit('<xsl:value-of select="$blockid"/>',{
		imgs : [
				<xsl:for-each select="list/item">				
				['<xsl:value-of select="b_image_path"/>','<xsl:value-of select="id"/>','','','<xsl:value-of select="url" disable-output-escaping="yes"/>'],				
				</xsl:for-each>
		],width : 228,height:210,second : 5
	});
	
	</script>
	

</xsl:template>
</xsl:stylesheet>