<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template name="lowlist">

<!-- BEGIN LOWLIST MOVIE DETAILS PAGE CODE HERE -->


<table height="720" border="0" cellspacing="0" cellpadding="0" width="1280">
<xsl:if test="$extras='false'"><xsl:attribute name="width">1280</xsl:attribute></xsl:if>
<xsl:if test="$extras='true'"><xsl:attribute name="width">2650</xsl:attribute></xsl:if>
<tr><td width="1280">
<table height="720" border="0" cellspacing="0" cellpadding="0" width="1280">


<tr><td height="377" width="1280" valign="top">

	<table border="0" cellspacing="0" cellpadding="0" width="1280">
    <tr>
    <td width="70" background="pictures/dim/custom_header.png"></td>
<td valign="center" height="50" width="510" class="tvtt" background="pictures/dim/custom_header.png">
<xsl:choose>
    <xsl:when test="string-length(title)&lt;40">
        <xsl:value-of select="title"/>
    </xsl:when>
    <xsl:otherwise>
        <xsl:value-of select="substring(title,1,40)"/>...
    </xsl:otherwise>
</xsl:choose>
</td>
	<xsl:if test="$ShowStudioField='true'">
						<td valign="center" height="50" class="tvtt" background="pictures/dim/custom_header.png" width="95">
							<img><xsl:attribute name="src">pictures/studios/<xsl:value-of select="company"/>.png</xsl:attribute></img>
						</td>
					</xsl:if>
<td align="center" valign="center" height="50" width="90" class="tvtts" background="pictures/dim/custom_header.png">
							<xsl:if test="year != 'UNKNOWN'">
							  <xsl:choose>
								<xsl:when test="year/@index != ''">
									<xsl:value-of select="year" />
								</xsl:when>
								<xsl:otherwise>
								  <xsl:value-of select="year" />
								</xsl:otherwise>
							  </xsl:choose>
							</xsl:if></td>
                            <td align="center" valign="center" height="50" width="120" class="tvtts" background="pictures/dim/custom_header.png">

                            <xsl:if test="runtime != 'UNKNOWN'">
										  <xsl:value-of select="runtime" /> 
										</xsl:if>
</td>                            
<td valign="center" height="50" width="260" background="pictures/dim/custom_header.png"><xsl:attribute name="class">rating</xsl:attribute>
			<xsl:if test="rating != -1">
              <xsl:if test="$star_rating = 'true'">
                <img><xsl:attribute name="src">pictures/detail/rating_<xsl:value-of select="round(rating div 10)*10" />.png</xsl:attribute>
				</img>
              </xsl:if>
            </xsl:if>
              <xsl:if test="$number-rating =	'true'">&#160;(<xsl:value-of select="rating div 10" />/10)</xsl:if></td>


              <xsl:if test="top250 != -1">   
<td valign="center" height="50" width="250" background="pictures/dim/custom_header.png" class="tvtts">Top 250: #<xsl:value-of select="top250" /></td>
</xsl:if>

<!-- end TOP250 -->
</tr>
</table>
</td>
<!-- 268+400=703 -->
<!-- <td width="93" align="left" valign="middle" rowspan="2" height="720" background="pictures/dim/custom_header-right.png">
<xsl:call-template name="playfile"/>
</td> -->


</tr>
<tr>
	<td>
		<table width="1187" height="320" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="250" height="300" valign="top"  align="right">
						<xsl:if test="$dim='false'"><xsl:attribute name="background">pictures/lowlist/tvbg-mov-l.png</xsl:attribute></xsl:if>
						<xsl:if test="$dim='true'"><xsl:attribute name="background">pictures/dim/custom_tvbg-mov-l_dim.png</xsl:attribute></xsl:if>
					<table width="342" height="300" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="52" height="300" rowspan="3"></td>
							<td width="310" height="332" align="center" valign="bottom">
								<img width="224"><xsl:attribute name="src"><xsl:value-of select="detailPosterFile" /></xsl:attribute></img>
							</td>
						</tr>
						<!--<tr>
							<td width="230" height="56" background="pictures/detail/spotlight-tv1.png" align="center" valign="middle">
<xsl:if test="certification != 'UNKNOWN' and certification != '' and certification != 'Not Rated'">
          <xsl:if test="count(genres) != 0 or (runtime != 'UNKNOWN' and runtime != '')"></xsl:if>
          <xsl:call-template name="certification" />
		  </xsl:if>
							</td>
						</tr>-->
						<tr>
							<td height="12"></td>
						</tr>
					</table>
				</td>
				<td>
					<table height="320" border="0" cellspacing="0" cellpadding="0">
					

<tr>
<td height="75"></td>
</tr>
						
						<tr><td colspan="2" height="250" valign="top">
							<xsl:if test="$dim='false'"><xsl:attribute name="background">pictures/detail/tvbg-r.png</xsl:attribute></xsl:if>
							<xsl:if test="$dim='true'"><xsl:attribute name="background">pictures/dim/custom_tvbg-r_dim.png</xsl:attribute></xsl:if>

<table border="0" cellspacing="0" cellpadding="0" width="845" height="300"><!--bilo je width 845-->
	<tr><!-- height=257 width=852 total nothing -->
		<td height="207" width="426" valign="top"><!--bilo je width 426-->
			<table border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td>
						<xsl:if test="$AlignRight='true' or $mjb.internet.plugin='com.moviejukebox.plugin.SratimPlugin'">
							<xsl:attribute name="align">right</xsl:attribute>
						</xsl:if>
						<xsl:if test="plot != 'UNKNOWN'">
							<xsl:attribute name="class">plot</xsl:attribute>
								<xsl:call-template name="PreserveLineBreaksLowList">
									<xsl:with-param name="text" select="plot"/>
								</xsl:call-template>
						</xsl:if>
					</td>
				</tr>
			</table>
		</td>
		<td valign="top">
			<table border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td>
						<table border="0" cellspacing="0" cellpadding="0" width="406"><!-- 130+10+266=406 -->
							<tr>
								<xsl:if test="$StudioDebug='false'">
									<td class="gray" width="130">
										<xsl:if test="$DirectedBy=''">DIRECTED BY</xsl:if>
										<xsl:if test="$DirectedBy!=''"><xsl:value-of select="$DirectedBy"/></xsl:if>
									</td><td width="10"/>
									<td width="266">
										<xsl:if test="director != 'UNKNOWN'">
											<xsl:attribute name="class">plot</xsl:attribute>
										  <xsl:choose>
											<xsl:when test="director/@index != ''">
												<xsl:value-of select="director" /> 
											</xsl:when>
											<xsl:otherwise>
											  <xsl:value-of select="director" />
											</xsl:otherwise>
										  </xsl:choose>
										</xsl:if>
									</td>
								</xsl:if>
								<xsl:if test="$StudioDebug='true'">
									<td class="plot" width="406" colspan="3">
										<xsl:value-of select="concat(company,'.png')"/>
									</td>
								</xsl:if>
							</tr>
							<tr>
								<td height="9" colspan="3"><img src="pictures/lowlist/hor-div-406.png"/></td><!-- up to height=13 -->
							</tr>
							<tr>
								<td class="gray">
									<xsl:value-of select="translate($Genre,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
								</td><td width="10"/>
								<td>
									<xsl:if test="count(genres) != 0">
										<xsl:attribute name="class">plot</xsl:attribute>
									  <xsl:for-each select="genres/genre[position() &lt;= 2]">
										<xsl:if test="position()!= 1"> / </xsl:if>
										<xsl:choose>
										  <xsl:when test="@index != ''">
											  <xsl:value-of select="." /> 
										  </xsl:when>
										  <xsl:otherwise>
											<xsl:value-of select="." /> 
										  </xsl:otherwise>
										</xsl:choose>
									  </xsl:for-each>
									</xsl:if>
								</td>
							</tr>
							<tr>
								<td height="9" colspan="3"><img src="pictures/lowlist/hor-div-406.png"/></td><!-- up to height=13 -->
							</tr>
							<tr>
								<td valign="top" class="gray">
									<xsl:if test="$Starring=''">STARRING</xsl:if>
									<xsl:if test="$Starring!=''"><xsl:value-of select="$Starring"/></xsl:if>
								</td><td width="10"/>
								<td>
									<xsl:if test="$AlignRight='true' or $mjb.internet.plugin='com.moviejukebox.plugin.SratimPlugin'">
										<xsl:attribute name="align">right</xsl:attribute>
									</xsl:if>
									<xsl:if test="count(cast/actor) != 0">
									  <xsl:for-each select="cast/actor[position() &lt;= 6]"><!-- up to 6 cast members -->
									  <table border="0" cellpadding="0" cellspacing="0"><tr><td><xsl:attribute name="class">plot</xsl:attribute>
										<xsl:if test="position()!=1">  </xsl:if>
										<xsl:choose>
										  <xsl:when test="@index != ''">
											  <xsl:value-of select="." /> 
										  </xsl:when>
										  <xsl:otherwise>
											<xsl:value-of select="." /> 
										  </xsl:otherwise>
										</xsl:choose>
										</td></tr></table>
									  </xsl:for-each>
									</xsl:if>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="50" colspan="2" align="left">
			<table border="0" cellspacing="0" cellpadding="12">
				<tr>
					<td>
						<xsl:if test="$ShowVideoSource='true'"><xsl:call-template name="videoSource" />&#160;&#160;</xsl:if>
						<xsl:if test="$ShowVideoCodec='true'"><xsl:call-template name="videoCodec" />&#160;&#160;</xsl:if>
						<xsl:if test="$ShowAudioCodec='true'"><xsl:call-template name="audioCodec" />&#160;&#160;</xsl:if>
						<xsl:if test="$ShowSubtitles='true'"><xsl:call-template name="subtitles" />&#160;&#160;</xsl:if>
						<xsl:if test="$ShowContainer='true'"><xsl:call-template name="container" />&#160;&#160;</xsl:if>
						<xsl:if test="$ShowVideoOutput='true'"><xsl:call-template name="videoOutput" />&#160;&#160;</xsl:if>
						<xsl:if test="$ShowFrameRate='true'"><xsl:call-template name="framerate" />&#160;</xsl:if>
						<xsl:if test="$ShowAspectRatio='true'"><xsl:call-template name="aspectratio"/></xsl:if>
<xsl:if test="certification != 'UNKNOWN' and certification != '' and certification != 'Not Rated'">
          <xsl:if test="count(genres) != 0 or (runtime != 'UNKNOWN' and runtime != '')"></xsl:if>
          <xsl:call-template name="certification" />
		  </xsl:if>                        
					</td>
				<!--	<xsl:if test="$ShowStudioField='true'">
						<td height="35" width="95" class="plot">
							<xsl:attribute name="background">pictures/studios/<xsl:value-of select="company"/>.png</xsl:attribute>
						</td>
					</xsl:if>-->
				</tr>
               			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" valign="top">
						<xsl:if test="$AlignRight='true' or $mjb.internet.plugin='com.moviejukebox.plugin.SratimPlugin'">
							<xsl:attribute name="align">right</xsl:attribute>
						</xsl:if>
			<!--<table border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td class="tvtt">
						
					</td>
				</tr>
			</table>-->
		</td>
	</tr>
</table>

						</td></tr>
					</table>
				</td>
			</tr>
		</table>
	</td>
	

	
</tr>
</table>
</td><td valign="top" align="right">

<xsl:if test="$extras='true'"><xsl:call-template name="companion"/></xsl:if>

</td></tr></table>

	<xsl:if test="$LowListOverlay='true'">
			<img src="pictures/detail/tvposteroverlay.png" id="Poster_Overlay__LowList_NMT_and_PC__TV_PC"/>
	</xsl:if>
	<xsl:if test="$LowListOverlay='box'">
		<img>
			<xsl:choose>
				<xsl:when test="contains(videoSource,'BluRay')"><xsl:attribute name="src">pictures/boxes/bluray.png</xsl:attribute></xsl:when>
				<xsl:when test="contains(videoSource,'D-THEATER')"><xsl:attribute name="src">pictures/boxes/dtheater.png</xsl:attribute></xsl:when>
				<xsl:when test="contains(videoSource,'HDDVD')"><xsl:attribute name="src">pictures/boxes/hddvd.png</xsl:attribute></xsl:when>
				<xsl:when test="contains(videoSource,'DVD')"><xsl:attribute name="src">pictures/boxes/dvd.png</xsl:attribute></xsl:when>
				<xsl:when test="contains(videoSource,'HDTV')"><xsl:attribute name="src">pictures/boxes/hdtv.png</xsl:attribute></xsl:when>
				<xsl:otherwise><xsl:attribute name="src">pictures/boxes/generic.png</xsl:attribute></xsl:otherwise>
			</xsl:choose>
			<xsl:attribute name="id">Box_Overlay__LowList_NMT_and_PC__TV_PC</xsl:attribute>
		</img>
	</xsl:if>
	
	<xsl:if test="$dim='false'"><img src="pictures/lowlist/tvbg-mov-r-gap.png" id="tvbgmovr"/></xsl:if>
	<xsl:if test="$dim='true'"><img src="pictures/dim/custom_tvbg-mov-r_dim-gap.png" id="tvbgmovr"/></xsl:if>

<!-- start TOP250 -->
<xsl:if test="top250 != -1">
<div id="top250_t"><img src="pictures/detail/top250_bg.png"/></div>
<div id="top250_n" class="tvdet_dim">Top 250: #<xsl:value-of select="top250" /></div>
</xsl:if>
<!-- end TOP250 -->

<!-- END LOWLIST MOVIE DETAILS PAGE CODE HERE -->

</xsl:template>
</xsl:stylesheet>