<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">&apos;</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">
		<xsl:call-template name="dvt_1"/>
	</xsl:template>
	
	<xsl:template name="dvt_1">
		<style type="text/css">  
		</style> 
		<script type='text/javascript' src='/Javascript/jquery.js'></script> 
		<script language="JavaScript" type="text/javascript"><xsl:comment><![CDATA[
		var speed=50;
		function marquee()
		{
		 if(div2.offsetWidth-div.scrollLeft<=0)
		  div.scrollLeft-=div1.offsetWidth;
		 else
		 {
		  div.scrollLeft++;
		 }
		}
		]]></xsl:comment></script>          
		<SCRIPT type="text/javascript">
	   		var timer=setInterval("marquee()",speed);
		</SCRIPT>
		<xsl:variable name="dvt_StyleName">Table</xsl:variable>
		<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
		<xsl:variable name="RowLimit" select="5" />
		<table cellpadding="2" cellspacing="0">
			<tr>
			<td width="100%">
				<div id="div" align="center" style="width:510px;overflow:hidden;"
					onmouseover="clearInterval(timer)" onmouseout='timer=setInterval("marquee()", speed)'>
				<TABLE align="center" style="border:0px;">
					<TBODY>
					<TR>
					<TD id="div1" vAlign="top">
					<TABLE width="100%"  style="border:0px;">
					<TBODY>
					<tr>
						<xsl:call-template name="dvt_2.body">
							<xsl:with-param name="Rows" select="$Rows"/>
						</xsl:call-template>
					</tr >
					</TBODY></TABLE></TD>
					<TD id="div2" vAlign="top">
					<TABLE width="100%" style="border:0px;">
					<TBODY>
					<TR>
						<xsl:call-template name="dvt_2.body">
							<xsl:with-param name="Rows" select="$Rows"/>
						</xsl:call-template>
					</TR>
					</TBODY></TABLE></TD>
					</TR></TBODY>
				</TABLE>
				</div>
			</td>
			</tr>
		</table>
		
	</xsl:template>
	
	<xsl:template name="dvt_2.body">
		<xsl:param name="Rows"/>
		<xsl:for-each select="$Rows">
			<td>
			<a href="{substring-before(@URLTarget, ', ')}" target="_blank">
				<img width="123" height="82" src="{@FileRef}" style="border:0px;"/>
			</a>
			</td>
		</xsl:for-each>
	</xsl:template>
	
</xsl:stylesheet>	
