<!-- Показываем блок покупки если товар есть на складе -->
<xsl:if test="(type = 0 and rest > 0) or (type = 1 and (eitem_count > 0 or eitem_count = -1))">
<table class="select">
<form id="form1">
<xsl:choose>
<xsl:when test="modifications/item">
<script>var mod_info=new Array();
<xsl:for-each select="modifications/item">
<xsl:variable name="global_pos" select="@id"/>mod_info['<xsl:value-of select="$global_pos"/>']=new Array();
<xsl:for-each select="property[@dir_id = 16]">mod_info['<xsl:value-of select="$global_pos"/>']['<xsl:value-of select="@id"/>'] = '<xsl:value-of select="value"/>';</xsl:for-each>mod_info['<xsl:value-of select="$global_pos"/>']['rest'] = '<xsl:value-of select="rest"/>';</xsl:for-each>var target_item_id = false;</script>
<xsl:for-each select="/shop/properties_for_group/property[@parent_id = 16 and list_items/node()]">
<tr><td>Выберите:</td><td><select name="property_{@id}" id="{@id}" class="width_150 property_set" onchange="PropertySelChange()" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt;">
<option value="0" selected="selected"><xsl:value-of select="name"/></option>
<xsl:for-each select="list_items/list_item">
<option value="{list_item_value}">
<xsl:value-of select="list_item_value"/>
</option>
</xsl:for-each>
</select></td></tr>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<script>var target_item_id = <xsl:value-of select="@id"/>;</script>
</xsl:otherwise>
</xsl:choose>
</form>
<tr><td>Количество:</td><td> <input type="text" size="3" value="1" id="count_{@id}"/> <xsl:value-of disable-output-escaping="yes" select="mesure"/></td></tr>
</table>
<br/>
<noindex>
<a href="{/shop/path}cart/?action=add&item_id={@id}" id="gotocart" rel="{/shop/path}cart/" onclick="return Finist_AddIntoCart('{/shop/path}', target_item_id, document.getElementById('count_{@id}'

.value)">
<img border="0" src="/maxim/in_cart.jpg" alt="Купить {name}" title="Добавить {name} в корзину"/>
</a>
</noindex>
<noindex>
<div class="sendcart">
<a href="/shop/cart/" id="sendcatalog" rel="nofollow" title="Оформить товар в корзине">Перейти в корзину</a>
</div>
</noindex>
</xsl:if>