<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1">
<xsl:output method="html" encoding="UTF-8"/>
<!-- Based on Amazon XSL Explorer v109 January 3, 2004 and ammended for UK market by John at tutorials4u.com -->

<!--User Defined Variables-->
<xsl:variable name="title" select="'tutorials4u Amazon Store'"/>
<xsl:variable name="bookmarktitle" select="'Support This Site By Using This Bookmark To Make Purchases At Amazon.co.uk.'"/>
<xsl:variable name="associate-id" select="'smallm206andtheo'"/>
<xsl:variable name="image-url" select="'http://www.tutorials4u.com/amazon-services/graphic/'"/>
<xsl:variable name="target" select="'_top'"/>
<xsl:variable name="AWSversion" select="'http://xml.amazon.co.uk/onca/xml3?'"/>
<!-- Do Not Modify The Following Variables-->
<xsl:variable name="TYPE" select="/ProductInfo/Request/Args/Arg[@name='type']/@value"/>
<xsl:variable name="PAGE" select="/ProductInfo/Request/Args/Arg[@name='page']/@value"/>
<xsl:variable name="MODE" select="/ProductInfo/Request/Args/Arg[@name='mode']/@value"/>
<xsl:variable name="SORT" select="/ProductInfo/Request/Args/Arg[@name='sort']/@value"/>
<xsl:variable name="TEMPLATE-URL" select="/ProductInfo/Request/Args/Arg[@name='f']/@value"/>
<xsl:variable name="OFFER" select="/ProductInfo/Request/Args/Arg[@name='offer']/@value"/>
<xsl:variable name="DEVELOPER-TAG" select="'DUCJ169Q7EKVP'"/>
<xsl:variable name="LOCALE" select="'uk'"/><xsl:variable name="SearchType">
<xsl:choose>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='BrowseNodeSearch']">BrowseNodeSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='BrowseNodeSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='PowerSearch']">PowerSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='PowerSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='AuthorSearch']">AuthorSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='AuthorSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='ArtistSearch']">ArtistSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='ArtistSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='ActorSearch']">ActorSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='ActorSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='DirectorSearch']">DirectorSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='DirectorSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='ManufacturerSearch']">ManufacturerSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='ManufacturerSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='AsinSearch']">AsinSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='AsinSearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='SimilaritySearch']">SimilaritySearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='SimilaritySearch']/@value" /></xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='KeywordSearch']">KeywordSearch=<xsl:value-of select="/ProductInfo/Request/Args/Arg[@name='KeywordSearch']/@value" /></xsl:when>
</xsl:choose>
</xsl:variable>

<!--      Root                 -->
<xsl:template match="/">
<html>

<head>
<xsl:if test="count(ProductInfo/Details) != 0 and (count(ProductInfo/Details/Availability) = 0 or (count(ProductInfo/Details/NumberOfOfferings) = 0 and $OFFER='ThirdPartyNew'))">
<script language="JavaScript1.2" type="text/javascript">
location.replace(document.location)
</script>
</xsl:if>
<META  http-equiv="Pragma" content="no-cache" />
<META  http-equiv="Expires" content="-1" />
<style>
<xsl:comment>

body { 
	font-family: verdana, sans-serif; 
	padding: .25em .5em .25em .5em;
	color: black; 
	background-color: #bbbaa6; 
	scrollbar-base-color: #000000;
	scrollbar-face-color: #bbbaa6;
	scrollbar-highlight-color: #000000;
	scrollbar-3dlight-color: #7d877b;
	scrollbar-darkshadow-color: #7d877b;
	scrollbar-shadow-color: #000000;
	scrollbar-arrow-color: #000000;  
	}
	
#header, .toolbar, #asinbox, #pricebox, .SearchBox, #ProductBox {
	border: .25em solid  #7d877b;
	background-color: white;
	color: black; 
	}

#marketplace {
	background-color: white;
	color: black; 
	}

#buybox, .reverse, .SearchBoxLabel, .label, .subject, .title { 
	background-color:  #7d877b;
	color: white;  
	}

#header {
	width: 100%; 
	border-spacing: .25em;
	font-size: x-small;  
	 }
	 
#footer {
	font-size: xx-small;
	text-align: center;
	}   
	 	
.toolbar {
	width: 100%; 
	border-spacing: .25em;  
	font-size: xx-small;
	text-align: center;  
	 }
	 
.toolbar select {
	margin: 0px;
	padding: 0px;
	}

#asinbox {
	width: 100%; 
	padding: 0px;
	font-size: x-small; 
	 }
	 
#buybox { 
	float: right; 
	width: 15em; 
	margin: 0px;
	text-align: center; 
	vertical-align: top; 
	padding: .25em;
	}

#pricebox {
	padding: .25em;
	height: 5ems;
	 }
	 	
#asin_detail { 
	text-align: left; 
	vertical-align: top;
	}

#asin_detail img { 
	margin-left: 1em; 
	margin-right: 1em; 
	float:left;  
	border: 0px;
	}

#asin_detail ul {
	list-style-type: disc; 
	margin-top: 0px; 
	margin-bottom: 0px; 
	margin-left: 2em;	
	}
	
#sub_asin_detail { 
	float: left;
	margin-right: .25em;
	text-align: left; 
	vertical-align: top; 
	}
	 
#tracks, #ProductDescription, #reviews, #similar, #accessories, #browselist, #marketplace {
	margin: 3em .5em 3em .5em;
	}

#similar, #accessories, #browselist { 
	text-align: center; 
	}

#tracks ol { 
	margin-top: 0px; 
	margin-bottom: 0px; 
	margin-left: 2em; 
	}
	
#marketplace {
	width: 100%; 
	border: 0px; 
	font-size: x-small;  
	}
				 
.SearchBox {
	width: 100%; 
	border-spacing: .25em;
	font-size: xx-small; 
	 }

.SearchBox h3 {	 
	letter-spacing: .5em;
	}
	 
.SearchBoxLabel {
	font-size: x-small;
	text-align: center; 
	vertical-align: top;
	padding: .25em;  
	}	  

#ProductBox {
	padding: 0px;
	width: 100%;
	padding: .25em;
	font-size: xx-small; 
	 }
	 
#ProductBoxItem{
	width: 32%;
	height: 200px;
	float: left;
	text-align: center;
	vertical-align: top;
	padding: 0px;
	margin: 1em .25em 1em .25em;	
	} 
	
.label { 
	font-size: small;  
	font-weight: bold;
	text-align: center; 
	vertical-align: top; 
	padding: .25em; 
	}

.subject { 
	font-size: small;  
	font-weight: bold; 
	text-transform: capitalize;
	text-align: center; 
	vertical-align: top; 
	padding: .25em;
	margin: .25em;  
	}
 
.title {
	font-size: small;  
	font-weight: bold;  
	letter-spacing: .25em;
	text-align: center; 
	vertical-align: top;
	padding: .25em; 
	margin: .25em;   
	}
	
button, .buybutton, .searchbutton {
	color: black; 
	background-color:  #d4d3bf;  
	cursor: hand;	
	margin: .25em .25em .25em .25em;  
	text-align: center;  
	}
	
.buybutton, .searchbutton { 
	width: 100%;  
	}

.leftright { 
	padding-left: 10%; 
	padding-right: 10%; 
	}

h3 { 
	margin: .25em; 
	}

hr { 
	color:  #7d877b; 
	width: 90%; 
	height: .25em;
	clear: all; 
	}

img {
	border: 0px;
	}
	
form { 
	margin-top: 0px; 
	}

</xsl:comment>
</style>

<title><xsl:value-of select="$title"/><xsl:text> - </xsl:text>
<xsl:choose>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='BrowseNodeSearch']"> 
<xsl:value-of select="ProductInfo/Details/Catalog"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after($SearchType,'=')"/>
</xsl:otherwise>
</xsl:choose>
</title>
</head>

<body>
<xsl:call-template name="Header" />
<xsl:call-template name="Toolbar" />
<br />

<xsl:choose>
<xsl:when test="count(ProductInfo/Details) = 0">
<div align="center" class="label">
<p>Unable to find exact matches for your search for<br /><br /><b>"<xsl:value-of select="substring-after($SearchType,'=')"/>"</b><br /><br />
Please modify your search and try again.</p>
</div>
</xsl:when>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='AsinSearch']">
<xsl:apply-templates select="ProductInfo/Details" />
</xsl:when>

<xsl:otherwise>
<xsl:call-template name="AWSSearch" />
</xsl:otherwise>
</xsl:choose>

<br />
<xsl:call-template name="SearchBox" />
<xsl:call-template name="Footer" />

</body>

</html>
</xsl:template>

<!--      End Of Root                 -->

<!--      Start of Templates        -->

<!--Details-->
<xsl:template match="Details">
<span class="label"><xsl:apply-templates select="Catalog"/></span>
<div id="asinbox">

<!--DISPLAY RIGHT SIDE BUY BOX-->
<div id="buybox">
<b>Ready To Buy?</b>
<div id="pricebox">
<xsl:variable name="nOurPrice">
<xsl:value-of select="translate(OurPrice,',$','')"/>
</xsl:variable>
<xsl:variable name="nListPrice">
<xsl:value-of select="translate(ListPrice,',$','')"/>
</xsl:variable>
<xsl:choose>

<xsl:when test="count(OurPrice) = 0 or (substring(Availability,1,7)  != 'usually' and substring(Availability,1,13) != 'In stock soon' and substring(Availability,1,7) != 'Not yet' and substring(Availability,1,13) != 'Special Order')"><p><b style="color:red;">Sorry!<br /> - <br />Not Available At Amazon.co.uk<br /> - <br />Check New At Amazon Marketplace Section At The Bottom</b></p></xsl:when>
<xsl:when test="substring(OurPrice,1,3) = 'Too'"><p><b style="color:green;">PRICE: </b>Our Unusually Low Price is so low that we can't show it on this page. To see our price, add this item to your cart. You can always remove it later.</p></xsl:when>
<xsl:when test="($nOurPrice >= $nListPrice) or not(number($nListPrice))"><p><b style="color:green;">Our price: <xsl:value-of select="OurPrice"/></b><br /></p></xsl:when>
<xsl:otherwise>
<p><b style="color:black; text-decoration:line-through;">List price: <xsl:value-of select="ListPrice"/></b><br />
<b style="color:red;">Our price: <xsl:value-of select="OurPrice"/></b><br />
<b style="color:green;">THAT'S <xsl:value-of select="100 - round(($nOurPrice div $nListPrice) * 100)"/><xsl:text>%</xsl:text> OFF!</b></p>
</xsl:otherwise>
</xsl:choose>
</div>
<xsl:if test="count(OurPrice) != 0 and (substring(Availability,1,7)  = 'usually' or substring(Availability,1,13) = 'In stock soon' or substring(Availability,1,7) = 'Not yet' or substring(Availability,1,13) = 'Special Order')">
<form method="POST" target="{$target}" action="{concat('http://www.Amazon.co.uk/o/dt/assoc/handle-buy-box=', Asin)}">
<input type="hidden" name="{concat('asin.', Asin)}" value="1"/>
<input type="hidden" name="tag_value" value="{$associate-id}"/>
<input type="hidden" name="tag-value" value="{$associate-id}"/>
<input type="hidden" name="dev-tag-value" value="{$DEVELOPER-TAG}"/>
<input  type="submit" name="submit.add-to-cart" value="Buy At Amazon.co.uk" title="Buy From Amazon.co.uk" class="buybutton" />
</form>
</xsl:if>
<xsl:variable name="nonostring">&#39;&#34;</xsl:variable>
<xsl:variable name="product_title"><xsl:value-of select="translate(ProductName, $nonostring, '')"/></xsl:variable>
<button class="buybutton" onclick="window.external.AddFavorite('{@url}', '{$product_title}');"  title="No Time? Bookmark it!">Bookmark It!</button>
<button class="buybutton" onclick="top.window.location='{@url}'"  title="More Product Info From Amazon.co.uk?">More Product Info?</button>
</div>

<!--DISPLAY PRODUCT DETAILS -->
<div id="asin_detail">
<h3><xsl:value-of select="ProductName"/></h3>
<a href="{ImageUrlLarge}"  target="{$target}" title="Click For Larger Image - If Available"><img src="{ImageUrlMedium}" onload="if(this.width=='1') this.src='http://g-images.Amazon.co.uk/images/G/01/books/icons/books-no-image.gif'"/></a>

<div id="sub_asin_detail">
<xsl:apply-templates select="Authors | Artists | Starring | Directors"/>
<xsl:apply-templates select="Manufacturer"/>
<xsl:apply-templates select="Availability"/>
<br />
<xsl:if test="(Catalog = 'DVD') or (Catalog = 'Video Games') or (Catalog = 'Video') or (Catalog = 'Software') or (Catalog = 'Music') or (Catalog = 'Book')">
<xsl:apply-templates select="Media"/>
</xsl:if>
<xsl:apply-templates select="NumMedia"/>
<xsl:apply-templates select="NumberOfPages"/>
<xsl:apply-templates select="RunningTime"/>
<xsl:apply-templates select="NumberOfIssues"/>
<xsl:apply-templates select="IssuesPerYear"/>
<xsl:apply-templates select="SubscriptionLength"/>
<xsl:apply-templates select="ReadingLevel"/>
<xsl:apply-templates select="MpaaRating"/>
<xsl:apply-templates select="EsrbRating"/>
<xsl:apply-templates select="AgeGroup"/>
<xsl:apply-templates select="TheatricalReleaseDate"/>
<xsl:apply-templates select="ReleaseDate"/>
<xsl:apply-templates select="SalesRank"/>
<xsl:apply-templates select="Isbn"/>
<xsl:apply-templates select="DeweyNumber"/>
<xsl:apply-templates select="Mpn"/>
<xsl:apply-templates select="Upc"/>
<xsl:apply-templates select="Platforms"/>
<xsl:apply-templates select="Features"/>
</div></div>
<br clear="all" />

<!-- DISPLAY SOUNDTRACKS -->
<xsl:apply-templates select="Tracks" />

<!-- DISPLAY REVIEWS -->
<xsl:apply-templates select="ProductDescription" />
<xsl:apply-templates select="Reviews/AvgCustomerRating"/>

<!-- DISPLAY ACCESSORIES / SIMILAR ITEMS IMAGES -->
<xsl:apply-templates select="Accessories"/>
<xsl:apply-templates select="SimilarProducts"/>

<!-- DISPLAY BROWSENODE LIST -->
<xsl:apply-templates select="BrowseList"/>

<!-- DISPLAY Amazon Marketplace -->
<xsl:apply-templates select="ThirdPartyProductInfo"/>

<div class="title"><xsl:value-of select="$title" /></div>
</div>
</xsl:template>
<!--END OF DETAIL TEMPLATE-->

<!--Process all non ASIN Searches-->
<xsl:template name="AWSSearch">
<div id="ProductBox">
<div class="subject">
<xsl:choose>
<xsl:when test="/ProductInfo/Request/Args/Arg[@name='BrowseNodeSearch']"> 
<xsl:value-of select="$MODE"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after($SearchType,'=')"/>
</xsl:otherwise>
</xsl:choose>
</div>

<xsl:for-each select="ProductInfo/Details">
<xsl:sort select="(count(ThirdPartyProductInfo) != 0 and $OFFER='ThirdPartyNew') or substring(Availability,1,7) = 'Usually' or substring(Availability,1,13) ='In stock soon' or substring(Availability,1,7)='Not yet' or substring(Availability,1,13)='Special Order'" order="descending"/>
<xsl:sort select="number(translate(SalesRank,',',''))" data-type="number" order="ascending"/>
<xsl:call-template name="Cell"><xsl:with-param name="t" select="'_self'"/></xsl:call-template>
<xsl:if test="position() mod 3 = 0 or position() = last()"><br clear="all" /></xsl:if>
</xsl:for-each>
<div class="title"><xsl:value-of select="$title" /></div>
</div>
</xsl:template>

<xsl:template name="Cell">
<xsl:param name="t"/>
<xsl:if test="(count(ThirdPartyProductInfo) != 0 and $OFFER='ThirdPartyNew') or substring(Availability,1,7) = 'Usually' or substring(Availability,1,13) ='In stock soon' or substring(Availability,1,7)='Not yet' or substring(Availability,1,13)='Special Order'">
<xsl:variable name="product_title" select="ProductName"/>
<xsl:variable name="product_title2">
<xsl:choose>
<xsl:when test="substring-before(translate(ProductName,':(','**'),'*') = ''">
<xsl:value-of select="$product_title"/>
</xsl:when>
<xsl:otherwise><xsl:value-of select="substring-before(translate(ProductName,':(','**'),'*')"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div id="ProductBoxItem">
<a target="{$t}" href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;AsinSearch={Asin}&amp;type=heavy&amp;offer={$OFFER}&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}"><img title="{$product_title}" src="{ImageUrlMedium}" onload="if(this.width=='1') this.src='http://g-images.Amazon.co.uk/images/G/01/books/icons/books-no-image.gif'"/></a>
<br  />
<xsl:if test="count(OurPrice) != 0">
Buy New: <font color="#990000"><xsl:value-of select="OurPrice"/></font><br  />
</xsl:if>
<a target="{$t}" href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;AsinSearch={Asin}&amp;type=heavy&amp;offer={$OFFER}&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}" title="{$product_title}"><xsl:value-of select="substring($product_title2,1,60)" disable-output-escaping="yes" /></a>
</div>
</xsl:if>
</xsl:template>

<!--Header of Page-->
<xsl:template name="Header">
<table id="header">
<tr><td align="center" width="60%">
<div class="title"><xsl:value-of select="$title" /></div>
</td>
<td rowspan="2">
<a href="http://www.amazon.co.uk/exec/obidos/redirect-home/{$associate-id}">
<img onclick="window.external.AddFavorite('http://www.amazon.co.uk/exec/obidos/redirect-home/{$associate-id}','Amazon.co.uk');" src="http://images-eu.Amazon.co.uk/images/G/02/uk-shared/logos/smile-amazon-logo-notag-new-200x45.gif" title="{$bookmarktitle}" height="43" width="148"/></a>
<!-- <img src="{$image-url}amazon01.gif"/> -->
</td></tr>
<tr><td align="center"><div class="title">In Association with ...</div></td>
</tr></table>
</xsl:template>

<!--Footer of Page-->
<xsl:template name="Footer">
<div id="footer">
 <p><br />
<font color="red"><b>Amazon.co.uk prices are subject to change.</b></font>
 <br />
Amazon XSL Explorer v109 © 2002 - 2004 by <a href="http://celtic-one-design.com/amazon-xsl109.htm" target="_top">CelticOneDesign</a> and ammended for the <a href="http://www.tutorials4u.com/webservices2.htm" target="_top">UK Market by Tutorials4u</a>

<!--XSLT Tracking Code = (Remove) 
<script language="JavaScript" src="http://celtic-one-design.com/js/tracker.js"></script>
 --></p></div>
</xsl:template>

 <!--SearchBox-->
<xsl:template name="SearchBox">
<form name="myform" onsubmit="return false">
<table cols="4" class="SearchBox">
<tr><td align="center" colspan="4">
<h3>Amazon Products Search</h3>
</td></tr>
<tr><td width="30%" align="center">
<div class="SearchBoxLabel">Search Type<br />
<select name="advSearch">
<option value="KeywordSearch" selected="">Keyword Search</option>
<option value="ActorSearch">Actor Search</option>
<option value="DirectorSearch">Director Search</option>
<option value="ArtistSearch">Band/Artist Search</option>
<option value="AuthorSearch">Author Search</option>
<option value="AsinSearch">ISBN Search</option>
<option value="UpcSearch">UPC Search (CDs Only)</option>
<option value="ManufacturerSearch">Manufacturer</option>
</select></div></td>
<td width="30%" align="center">
<div class="SearchBoxLabel">Search Term<br />
<input maxLength="256" name="searchterm" size="20" /></div></td>
<td width="30%" align="center">
<div class="SearchBoxLabel">Product Type<br />
<select name="mode">


<option value="books-uk" selected="">Books</option>
<option value="dvd-uk">... DVD Only</option>
<option value="vhs-uk">... VHS Only</option>
<option value="music">Music</option>
<option value="electronics-uk">Electronics</option>
<option value="sw-vg-uk">... ... Software</option>
<option value="toys-uk">Toys &amp; Games</option>
<option value="video-games-uk">... Video Games</option>
<option value="kitchen-uk">Kitchen &amp; Housewares</option>
<!-- <option value="video">All Movies</option>
<option value="magazines">... Magazines</option>
<option value="pc-hardware">... Computers</option>
<option value="photo">... Camera &amp; Photo</option>
<option value="garden">Outdoor Living</option>
<option value="tools">Tools &amp; Hardware</option>
<option value="baby">Baby</option>
 --></select></div></td>
<td width="10%" align="center">
<input title="Click To Search" class="searchbutton" onclick="window.location.href='{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;' + myform.advSearch.value + '=' + myform.searchterm.value + '&amp;page=1&amp;mode='+ myform.mode.value + '&amp;type=heavy&amp;offer={$OFFER}&amp;sort=+salesrank&amp;locale=uk&amp;f={$TEMPLATE-URL}'; return false" type="button" value="Search" />
</td></tr>
</table>
</form>
</xsl:template>

<xsl:template name="Toolbar">
<table class="toolbar">
<tr valign="middle">
<td width="40%" align="left">
<a href="http://www.amazon.co.uk/exec/obidos/redirect?tag={$associate-id}&amp;path=shopping-basket" target="{$target}" title="View Your Amazon.co.uk Cart">View Cart</a>
<xsl:text> | </xsl:text>
<a href="http://www.amazon.co.uk/exec/obidos/redirect?tag={$associate-id}&amp;path=account-access-login" target="{$target}">View your Amazon Account</a>
</td>

<td align="center">
<xsl:variable name="stub" select="concat($AWSversion, 't=',$associate-id, '&amp;dev-t=',$DEVELOPER-TAG,'&amp;page=1&amp;type=',$TYPE,'&amp;offer=', $OFFER,'&amp;sort=+salesrank&amp;locale=uk&amp;f=',$TEMPLATE-URL,'&amp;BrowseNodeSearch=')" />
<select name="search" onChange="location=this.options[this.selectedIndex].value">
<option selected="" value="">Browse Amazon</option>
<option value="{$stub}279792&amp;mode=books-uk">Books- Travel Guide</option>
<option value="{$stub}285263&amp;mode=dvd-uk">DVD</option>
<option value="{$stub}283923&amp;mode=vhs-uk">VHS Classic Films</option>
<option value="{$stub}696422&amp;mode=music">Music-Compilations</option>
<option value="{$stub}3108311&amp;mode=electronics-uk">Electronic Gadets</option>
<option value="{$stub}599968&amp;mode=sw-vg-uk">Software-Office Suites</option>
<option value="{$stub}468292&amp;mode=toys-uk">Toys &amp; Games</option> 
<option value="{$stub}300729&amp;mode=video-games-uk">Video Games-PC</option>
<option value="{$stub}3147451&amp;mode=kitchen-uk">Kitchen-Home Appliances</option>

<!-- <option value="{$stub}53&amp;mode=books-uk">Books</option>
<option value="{$stub}130&amp;mode=dvd-uk">...DVD</option>
<option value="{$stub}404272&amp;mode=vhs-uk">...VHS</option>
<option value="{$stub}301668&amp;mode=music">Music</option>
<option value="{$stub}172282&amp;mode=electronics-uk">Electronics</option>
<option value="{$stub}491286&amp;mode=sw-vg-uk">... ...Software</option>
<option value="{$stub}491290&amp;mode=toys-uk">Toys &amp; Games</option> 
<option value="{$stub}471280&amp;mode=video-games-uk">...Video Games</option>
<option value="{$stub}491864&amp;mode=kitchen-uk">Kitchen &amp; Housewares</option>
<option value="{$stub}599872&amp;mode=magazines">...Magazines</option>
<option value="{$stub}404272&amp;mode=video">All Movies</option>
<option value="{$stub}565118&amp;mode=pc-hardware">...Computers</option>
<option value="{$stub}502394&amp;mode=photo">...Camera  &amp; Photo</option>
<option value="{$stub}468250&amp;mode=garden">Outdoor</option>
<option value="{$stub}468240&amp;mode=tools">Tools &amp; Hardware</option>
<option value="{$stub}542456&amp;mode=baby">Baby</option>
 --></select>
</td>
<td width="40%" align="right">
<xsl:apply-templates select="/ProductInfo/TotalPages" />
</td></tr></table>

</xsl:template>

<!--Total Pages-->
<xsl:template match="TotalPages">
<xsl:if test="$PAGE != 1">
<a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;{$SearchType}&amp;page={$PAGE -1}&amp;mode={$MODE}&amp;type={$TYPE}&amp;sort={$SORT}&amp;offer={$OFFER}&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">&lt;&lt; Previous</a>
<xsl:text> - </xsl:text>
</xsl:if>
PAGE <xsl:value-of select="$PAGE"/> OF <xsl:value-of select="." />
<xsl:if test="$PAGE != .">
<xsl:text> - </xsl:text>
<a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;{$SearchType}&amp;page={$PAGE +1}&amp;mode={$MODE}&amp;type={$TYPE}&amp;sort={$SORT}&amp;offer={$OFFER}&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">Next &gt;&gt;</a>
</xsl:if>
</xsl:template>

<xsl:template match="NumMedia">
<xsl:if test="count(.) != 0 and .  &gt;  1"> 
<b>Number in set:  </b><xsl:value-of select="."/><br />
</xsl:if>
</xsl:template>

<xsl:template match="NumberOfPages">
<b>Number Of Pages: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="DeweyNumber">
<b>Dewey Number: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="RunningTime">
<b>Running Time: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="NumberOfIssues">
<b>Number Of Issues: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="IssuesPerYear">
<b>Issues Per Year: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="SubscriptionLength">
<b>Subscription Length: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="ReadingLevel">
<b>Reading Level: </b><xsl:value-of select="."/><br />
</xsl:template>
 
<xsl:template match="SalesRank">
<b>Amazon Sales Rank: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="MpaaRating">
<b>Rating: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="EsrbRating">
<b>ESRB Rating: </b><a href="http://www.amazon.co.uk/exec/obidos/redirect?tag={$associate-id}&amp;path=tg/feature/-/71576" title="ESRB: Understanding Video Game Ratings" target="{$target}">
<xsl:value-of select="."/></a><br />
</xsl:template>

<xsl:template match="AgeGroup">
<b>Age Group: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="Isbn">
<b>ISBN: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="Upc">
<b>UPC: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="Mpn">
<b>Manufacturer's Part Number: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="Media">
<b>Media: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="Catalog">
<xsl:text> - </xsl:text>Amazon <xsl:value-of select="."/> Catalog<xsl:text> - </xsl:text>
</xsl:template>

<xsl:template match="ReleaseDate">
<b>Release Date: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="TheatricalReleaseDate">
<b>Theatrical Release Date: </b><xsl:value-of select="."/><br />
</xsl:template>

<xsl:template match="Availability">
<b>Availability: </b><xsl:value-of select="."/>
<xsl:if test="(substring(.,1,13)='Special Order')">. Please note that special order titles occasionally go out of stock.<xsl:text> </xsl:text> 
<xsl:if test="../Catalog = 'Book'">These hard-to-find titles are not discounted and are subject to <a href="http://www.amazon.co.uk/exec/obidos/redirect?tag={$associate-id}&amp;path=tg/browse/-/510066/" target="{$target}">an additional charge of $1.99 per item</a> due to the extra cost of ordering them.<xsl:text> </xsl:text></xsl:if> 
Amazon.co.uk will notify you within 2-4 weeks if they have trouble obtaining this title.</xsl:if>
<xsl:if test="(substring(.,1,7)='Not yet')">. You may order it now and we will ship it to you when it arrives.</xsl:if>
<br />
</xsl:template>

<xsl:template match="Platforms">
<br /><b>Platforms: </b>
<ul>
<xsl:for-each select="Platform"><li><xsl:value-of select="."/></li></xsl:for-each>
</ul>
</xsl:template>

<xsl:template match="Tracks">
<div id="tracks">
<h3>Tracks</h3>
<ol>
<xsl:for-each select="Track"><li><xsl:value-of select="."/></li></xsl:for-each>
</ol>
</div>
</xsl:template>

<xsl:template match="Accessories">
<div id="accessories">
<h3>Accessories</h3><hr />
<xsl:for-each select="Accessory">
<a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;AsinSearch={current()}&amp;type=heavy&amp;offer={$OFFER}&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">
<img title="Click to View More Information For This Accessory" src="http://images.Amazon.co.uk/images/P/{current()}.01.MZZZZZZZ.jpg" /></a>
</xsl:for-each>
<hr />
</div>
</xsl:template>

<xsl:template match="SimilarProducts">
<div id="similar">
<h3>Similar Items</h3>
<hr />
<xsl:for-each select="Product">
<a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;AsinSearch={current()}&amp;type=heavy&amp;offer={$OFFER}&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">
<img title="Click to Explore This Similar Item" src="http://images.Amazon.co.uk/images/P/{current()}.01.MZZZZZZZ.jpg" /></a>
</xsl:for-each>
<hr />
<b><a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;SimilaritySearch={../Asin}&amp;offer={$OFFER}&amp;type={$TYPE}&amp;sort=+salesrank&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">Explore Similar Items?</a></b>
</div>
</xsl:template>

<xsl:template match="Features">
<br /><b>Features:</b>
<ul>
<xsl:for-each select="Feature"><li><xsl:value-of select="."/></li></xsl:for-each>
</ul>
</xsl:template>

<xsl:template match="BrowseList">
<xsl:variable name="nonostring">&#39;&#34;:&amp;#()</xsl:variable>
<xsl:if test="../Catalog = 'Book'">
<div id="browselist">
<h3>Related Subjects</h3>
<hr />
<xsl:for-each select="BrowseNode"><xsl:for-each select="BrowseName">
<xsl:variable name="subject">
<xsl:value-of select="translate(current(), $nonostring, '')"/>
</xsl:variable>
<a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;PowerSearch=subject:{$subject}&amp;page=1&amp;mode=books-uk&amp;type={$TYPE}&amp;offer={$OFFER}&amp;sort=+salesrank&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">
<xsl:value-of select="."/></a><br />
</xsl:for-each></xsl:for-each>
<hr />
</div>
</xsl:if>
</xsl:template>

<xsl:template match="ThirdPartyProductInfo">
<div id="marketplace">
<h3>New From Amazon Marketplace</h3>
<div class="reverse" style="float: left; width: 80%;"><b>Seller Information</b></div>
<div class="reverse" style="float: left; width: 20%;"><b>| Price</b></div>
<xsl:for-each select="ThirdPartyProductDetails">
<br clear="all" />
<hr />
<div style="float: left; width: 80%;">
<b>Seller: </b><a href="http://www.amazon.co.uk/exec/obidos/redirect?tag={$associate-id}&amp;path=http://s1.Amazon.co.uk/exec/varzea/ts/user-glance/{./SellerId}" target="{$target}"><xsl:value-of select="./SellerNickname"/></a><br />
<b>Seller Rating: </b>
<xsl:call-template name="Stars">
<xsl:with-param name="average" select="./SellerRating"/></xsl:call-template>
<br />
<b>Availablity: </b><xsl:value-of select="./ExchangeAvailability"/> - <xsl:value-of select="./ShipComments"/> - Ships from <xsl:value-of select="./SellerState"/>, <xsl:value-of select="./SellerCountry"/>
<br />
<b>Comments: </b><xsl:value-of select="./ConditionType" disable-output-escaping="yes" /><br />
</div>
<div style="float: left; width: 20%; text-align: center;">
<b style="color: red;"><xsl:value-of select="./OfferingPrice"/></b><br />
<form method="POST" target="{$target}" action="{concat('http://www.Amazon.co.uk/o/dt/assoc/handle-buy-box=',/ProductInfo/Details/Asin)}">
<input type="hidden" name="{concat('exchange.',./ExchangeId,'.',/ProductInfo/Details/Asin,'.',./SellerId)}" value="1"/>
<input type="hidden" name="tag_value" value="{$associate-id}"/>
<input type="hidden" name="tag-value" value="{$associate-id}"/>
<input type="hidden" name="dev-tag-value" value="{$DEVELOPER-TAG}"/>
<input  type="submit" name="submit.add-to-cart" value="Buy Now" title="Buy From Amazon.co.uk" class="buybutton" />
</form>
<br clear="all" />
</div>
</xsl:for-each>
<br clear="all" />
<hr />
</div>
</xsl:template>

<xsl:template match="Authors | Artists | Starring | Directors">
<xsl:choose>
<xsl:when test="name() = 'Authors'"><b>By: </b>
<xsl:for-each select="Author">
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="search" select="'AuthorSearch'"/>
<xsl:with-param name="mode" select="'books'"/>
</xsl:call-template>
</xsl:for-each></xsl:when>
<xsl:when test="name() = 'Artists'"><b>Artist: </b>
<xsl:for-each select="Artist">
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="search" select="'ArtistSearch'"/>
<xsl:with-param name="mode" select="'music'"/>
</xsl:call-template>
</xsl:for-each></xsl:when>
<xsl:when test="name() = 'Starring'"><b>Starring: </b>
<xsl:for-each select="Actor">
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="search" select="'ActorSearch'"/>
<xsl:with-param name="mode" select="'video'"/>
</xsl:call-template>
</xsl:for-each></xsl:when>
<xsl:when test="name() = 'Directors'"><b>Director: </b>
<xsl:for-each select="Director">
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="search" select="'DirectorSearch'"/>
<xsl:with-param name="mode" select="'video'"/>
</xsl:call-template>
</xsl:for-each></xsl:when>
</xsl:choose><br />
</xsl:template>

<xsl:template match="Manufacturer">
<xsl:choose>
<xsl:when test="../Catalog = 'Music'"><b>Label: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'music'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Electronics'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'electronics'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Book'"><b>Publisher: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'books'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Magazine'"><b>Publisher: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'magazine'"/>
</xsl:call-template></xsl:when>
<xsl:when test="(../Catalog= 'DVD') or (../Catalog = 'Video')"><b>Studio: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'video'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Software'"><b>By: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'software'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Personal Computer'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'pc-hardware'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Home Improvement'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'tools'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Toy'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'toys'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Video Games'"><b>By: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'videogames'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Baby Product'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'baby'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog= 'Kitchen'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'kitchen'"/>
</xsl:call-template></xsl:when>
<xsl:when test="../Catalog = 'Lawn &amp; Patio'"><b>Manufacturer: </b>
<xsl:call-template name="aws-search">
<xsl:with-param name="searchstring" select="."/>
<xsl:with-param name="mode" select="'garden'"/>
</xsl:call-template></xsl:when>
<xsl:otherwise><b>By: </b><xsl:value-of select="."/></xsl:otherwise>
</xsl:choose><br />
</xsl:template>

<xsl:template name="aws-search">
<xsl:param name="searchstring"/>
<xsl:param name="search" select="'ManufacturerSearch'"/>
<xsl:param name="mode"/>
<a href="{$AWSversion}t={$associate-id}&amp;dev-t={$DEVELOPER-TAG}&amp;{$search}={$searchstring}&amp;page=1&amp;mode={$mode}&amp;type={$TYPE}&amp;offer={$OFFER}&amp;sort=+salesrank&amp;f={$TEMPLATE-URL}&amp;locale={$LOCALE}">
<xsl:value-of select="($searchstring)"/></a>
<xsl:if test="position() != last() and not(position() = last()-1)">, </xsl:if>
<xsl:if test="position() = last()-1"> and </xsl:if>
</xsl:template>

<xsl:template match="ProductDescription">
 <div id="ProductDescription">
<h3>Amazon Product Review</h3>
<div class="leftright">
<xsl:value-of select="." disable-output-escaping="yes" />
</div></div>
</xsl:template>

<xsl:template match="AvgCustomerRating">
<xsl:if test=". &gt; 0">
<div id="reviews">
<h3>Customer Reviews</h3>
<b>Average customer rating: </b> 
<xsl:call-template name="Stars">
<xsl:with-param name="average" select="."/>
</xsl:call-template><br />
<xsl:apply-templates select="../TotalCustomerReviews"/>
<xsl:apply-templates select="../CustomerReview">
<xsl:sort select="Rating" order="descending"/>
</xsl:apply-templates>
</div>
</xsl:if>
</xsl:template>

<xsl:template match="TotalCustomerReviews">
<xsl:if test=". &gt; 0">
<b>Total Customer Reviews: </b>
<xsl:value-of select="." /> 
<br /><br />
</xsl:if>
</xsl:template>

<xsl:template match="CustomerReview">
<div class="leftright">
<b><xsl:value-of select="Date"/><xsl:text disable-output-escaping="yes"> </xsl:text></b>
<xsl:call-template name="Stars">
<xsl:with-param name="average" select="Rating"/>
</xsl:call-template>
<b><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="Summary"/></b><br />
</div>
<div class="leftright">
<xsl:value-of select="Comment" disable-output-escaping="yes" />
<br /><br />	
</div>
</xsl:template>

<xsl:template name="Stars">
<xsl:param name="average" select="5"/>
<xsl:variable name="thisurl" select="'http://g-images.Amazon.co.uk/images/G/01/detail/stars-'"/>
<xsl:choose>
<xsl:when test="$average &gt; 4.75"><img src="{$thisurl}5-0.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 4.25"><img src="{$thisurl}4-5.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 3.75"><img src="{$thisurl}4-0.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 3.25"><img src="{$thisurl}3-5.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 2.75"><img src="{$thisurl}3-0.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 2.25"><img src="{$thisurl}2-5.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 1.75"><img src="{$thisurl}2-0.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; 1.25"><img src="{$thisurl}1-5.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; .75"><img src="{$thisurl}1-0.gif" title="{$average}"/></xsl:when>
<xsl:when test="$average &gt; .25"><img src="{$thisurl}0-5.gif" title="{$average}"/></xsl:when>
<xsl:otherwise><img src="{$image-url}stars-0-5.gif" title="{$average}"/></xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>