<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:param name="accessPointId"></xsl:param>
	<xsl:param name="building"></xsl:param>
	<xsl:param name="buildingName"></xsl:param>
	<xsl:param name="capId"></xsl:param>
	<xsl:param name="claim"></xsl:param>
	<xsl:param name="conviction"></xsl:param>
	<xsl:param name="coverType"></xsl:param>
	<xsl:param name="dob"></xsl:param>
	<xsl:param name="email"></xsl:param>
	<xsl:param name="forename"></xsl:param>
	<xsl:param name="garage"></xsl:param>
	<xsl:param name="gender"></xsl:param>
	<xsl:param name="isNew"></xsl:param>
	<xsl:param name="mileage"></xsl:param>
	<xsl:param name="postcode"></xsl:param>
	<xsl:param name="siteId"></xsl:param>
	<xsl:param name="surname"></xsl:param>
	<xsl:param name="telephone"></xsl:param>
	<xsl:param name="title"></xsl:param>
	<xsl:param name="tracker"></xsl:param>
	<xsl:param name="vehicleAge"></xsl:param>
	<xsl:param name="vehicleMileage"></xsl:param>
	<xsl:param name="vehiclePrice"></xsl:param>
	<xsl:param name="vehicleReg"></xsl:param>
	
	<xsl:variable name="calcCount" select="count(Calculations/Calculation/Companies//Company)" />
	
	<xsl:template match="Calculations/Calculation">
		<xsl:variable name="CapId" select="Vehicle/Capid"></xsl:variable>
		
		<div id="insuranceQuotesContainer" style="overflow:hidden;">
		
		<div style="border-bottom:#ddd solid 1px;"><h2 style="display:inline;">Your Motor Insurance</h2> <div class="editInsuranceDetails" style=" display:inline; margin-left:10px;"><a href="javascript:(void(0));" onclick="miShowEditWindow();" class="L">[Edit Your Details]</a></div><h2 style="font-size: medium; display: inline; margin-left: 65px;">...You're Only 60 Seconds Away From Cover</h2></div>
		
			<xsl:for-each select="Companies/Company">
			<xsl:sort select="MonthlyPremium" data-type="number" />
			
			<div class="quote_company" style=" overflow:hidden; border-bottom:#ddd solid 1px; margin-top:10px;">
				
				<div class="quote_col_logo" style="float:left; width:170px;">
					<img>
						<xsl:attribute name="src"><xsl:value-of select="LogoUrl" /></xsl:attribute>
						<xsl:attribute name="alt"><xsl:value-of select="Name" /></xsl:attribute>
					</img>
				</div>
				
				<div class="quote_col_quotes" style="float:left; width:40%; padding-top:12px;font-size:16px">
					<xsl:choose>
						<xsl:when test="PremiumUnavailable = 'False'">
								<strong>Monthly &#163;<xsl:value-of select="format-number(MonthlyPremium, '#####.00')" /></strong>
								<br />
								<small>Annual &#163;<xsl:value-of select="format-number(AnnualPremium, '#####.00')" /></small>
						</xsl:when>
						
						<xsl:otherwise>
							<span style="font-weight:normal; font-size:small;">Unfortunately you do not meet one or more restriction that apply to this vehicle.</span>
						</xsl:otherwise>
					</xsl:choose>
				
				</div>
				
				<div class="quote_col_docs" style="float:left; width:35%; margin-top:6px;">
					<form method="post" target="_blank">
					<!--xsl:attribute name="action">https://www.yourcarmotorinsurance.co.uk/home/quote.aspx?s=<xsl:value-of select="$siteId" /></xsl:attribute-->
						<xsl:attribute name="action">http://localhost/LloydLatchford/WebApp/home/quote.aspx?s=<xsl:value-of select="$siteId" /></xsl:attribute>
						<xsl:attribute name="id">frm<xsl:value-of select="@id" />
						</xsl:attribute>
						<input type="submit" value="Review and Buy" style="background: url(http://secure.codeweavers.net/miwebservices/images/btn-grey-152x24.gif) no-repeat; width: 152px; height: 24px; margin: 5px 5px 0 0; color: #fff; font-size: 12px; font-weight: bold; border: none; margin-bottom:10px; margin-right:30px; padding-bottom:2px;">
							<xsl:attribute name="id">btnInsuranceEnquiry<xsl:value-of select="@id" /></xsl:attribute>
						</input>
										
						<a target="blank">
							<xsl:variable name="companyName" select="translate(Name, ' ', '_')" />
							<xsl:attribute name="href">http://www.yourcarmotorinsurance.co.uk/whitelabel/<xsl:value-of select="$siteId" />/includes/key_facts_<xsl:value-of select="$companyName" />.pdf</xsl:attribute>
							<img src="http://secure.codeweavers.net/miwebservices/images/key_facts.gif" class="keyfacts" style="border: none; _position: relative; top: 0px;" />
						</a>
						<input id="derivative" name="derivative" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$capId" /></xsl:attribute>
						</input>
						<input id="vehiclePrice" name="vehiclePrice" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$vehiclePrice" /></xsl:attribute>
						</input>
						<input id="dateOfBirth" name="dateOfBirth" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$dob" /></xsl:attribute>
						</input>
						<input id="coverType" name="coverType" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$coverType" /></xsl:attribute>
						</input>
						<input id="email" name="email" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$email" /></xsl:attribute>
						</input>
						<input id="forename" name="forename" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$forename" /></xsl:attribute>
						</input>
						<input id="hdnGaraged" name="hdnGaraged" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$garage" /></xsl:attribute>
						</input>
						<input id="gender" name="gender" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$gender" /></xsl:attribute>
						</input>
						<input id="postcode" name="postcode" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$postcode" /></xsl:attribute>
						</input>
						<input id="surname" name="surname" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$surname" /></xsl:attribute>
						</input>
						<input id="hdnTracker" name="hdnTracker" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$tracker" /></xsl:attribute>
						</input>
						<input id="insuranceMileage" name="insuranceMileage" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$mileage" /></xsl:attribute>
						</input>
						<input id="hdnClaim" name="hdnClaim" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$claim" /></xsl:attribute>
						</input>
						<input id="hdnConviction" name="hdnConviction" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$conviction" /></xsl:attribute>
						</input>
						<input id="accessPointId" name="accessPointId" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$accessPointId" /></xsl:attribute>
						</input>
						<input id="telephone" name="telephone" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$telephone" /></xsl:attribute>
						</input>
						<input id="building" name="building" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$building" /></xsl:attribute>
						</input>
						<input id="buildingName" name="buildingName" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$buildingName" /></xsl:attribute>
						</input>
						<input id="customerTitle" name="customerTitle" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$title" /></xsl:attribute>
						</input>
						<input id="isNew" name="isNew" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$isNew" /></xsl:attribute>
						</input>
						<input id="vehicleAge" name="vehicleAge" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$vehicleAge" /></xsl:attribute>
						</input>
						<input id="vehicleReg" name="vehicleReg" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$vehicleReg" /></xsl:attribute>
						</input>
						<input id="vehicleMileage" name="vehicleMileage" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="$vehicleMileage" /></xsl:attribute>
						</input>
						<input id="campaignId" name="campaignId" type="hidden">
							<xsl:attribute name="value"><xsl:value-of select="CampaignId" /></xsl:attribute>
						</input>
						<input id="isProxy" name="isProxy" type="hidden" value="true" />
					</form>					
				</div>
				
				<div class="error" style="float:left; width:100%; margin-top:10px; margin-bottom:10px;">
					<xsl:choose>
						<xsl:when test="RestrictionApplies = 'True'">
							<div>
								<strong>Restrictions</strong>
									<ul style="margin: 5px; margin-left: -15px !important; margin-left: 20px;">
										<xsl:for-each select="Restrictions/Restriction">
											<li><xsl:value-of select="." /></li>
										</xsl:for-each>
									</ul>
							</div>
						</xsl:when>
							<xsl:otherwise>
							
							</xsl:otherwise>
					</xsl:choose>
				</div>
				<br />

			</div>
			
			</xsl:for-each>
			
			<div id="offers_col1" style="margin-top:10px;">
			
			<script>
			function init() {
			//<![CDATA[
			new Tip('tip1', 'Car insurance premiums are increasing. Insurers have reported increases in national newspapers, some of up to 40%!! By fixing your price with us, you avoid those year on year increases. As well, you have hassle free motoring without the need to shop around year on year.', {title: 'Why fix your cover?', effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip2', 'In some cases you will be the driver of the vehicle, but not necessarily the registered keeper. This maybe due to the finance product used to acquire the vehicle or ownership sits with another party. Most insurance companies will refuse to insure you as a result of this. We will accept your car under normal terms regardless of ownership details.', {effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip3', 'Even in the event of a fault claim and regardless of cost, you will still continue to enjoy the same monthly rate for the life time of your policy with our uniquely fixed car insurance*<br /><br /> For more information on the protected bonus please see our frequently asked questions.<br /><br /> * Subject to no more than 1 fault claim in the first 24 months.', {title: 'Free Protected No Claims Bonus.', effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip4', 'If your car is repairable and you use our approved network we will guarantee a courtesy car whilst it is in being repaired. In many cases we are able to provide a courtesy car within 24 working hours.', {effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip5', 'With no standards created in the insurance market for business use, consumers are more and more confused about the type of cover they require to be protected. Many claims are turned down because the consumer selects the wrong business or forgets to cover it. We give all customers business use FREE OF CHARGE so as to protect the ones that require it and not to financially penalize the ones that dont. We will also make sure that we select the business use that is right for you!', {effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip6', 'All companies give this? NO. - Some providers still support the use of third party parts being used and reduced guarantees to keep costs down. This can effect the repair standard and ultimately your warranty. If you use our nationwide repair centers we will give a parts, paint and labour guarantee for 3 years.', {effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip7', 'If you wish to take your car to Europe many insurers require you to inform them of the dates you are traveling. Failure to do so can reduce your cover to the basic Third Party Fire and Theft. <br /><br />We cover all clients regardless of notification for a period of 60 days for any one trip. Giving you peace of mind that covers is in place when you may need it the most!', { effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			
			new Tip('tip8', 'The same level of quality cover from the UK\'s leading insurers', { effect: 'appear', className: 'darktip', offset: {x:70, y:0}});
			//]]>
			}
			Event.observe(window, 'load', init, false);
			</script>
				<div id="statement_col1" style="width:50%; float:left;">		
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip1'>Uniquely fixed cover for up to 3 years</a></div>
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip2'>Full acceptance regardless of registered keeper</a></div>
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip3'>Free Protected No Claims Bonus</a></div>
				
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip4'>Guaranteed courtesy car in the event of an accident</a></div>
				</div>
				<div id="statement_col2" style="width:50%; float:left;">
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip5'>Business Use automatically included, free of charge</a></div>
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip6'>3 year guarantee on all accident repairs</a></div>
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip7'>Full European travel cover</a></div>
				<div class="statement" style="margin-bottom:5px;"><a href='javascript:;' id='tip8'>All quotes Fully comprehensive.</a></div>
				</div>
								
			</div>
		</div>
		
		<div id="lloydLatchfordDetails" style="text-align: left; padding: 20px 6px 6px 6px; font-size: 11px;">
			This quote is provided by Lloyd Latchford Schemes Ltd. If you have any queries try our
			<a target="_blank" href="http://secure.codeweavers.net/motorinsurance/whitelabel/{$siteId}/pages/faqs.aspx?s={$siteId}">
				Frequently Asked Questions
			</a> 
			to find an answer to your questions or Contact us on 01844 275555 or <a href="mailto:info@lloydlatchford.co.uk?subject=Lloyd Latchford Motor Insurance">info@lloydlatchford.co.uk</a>.
			We are available Mon - Fri, 9am to 5:30pm, Sat 9am - 12:30pm.</div>
	</xsl:template>
</xsl:stylesheet>

  