<?xml version='1.0' encoding='iso-8859-1' ?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
								xmlns:w2c="http://www.web2cad.com/w2c"
								w2c:cc-xml-version="5.5.3">

<xsl:output method="html" indent="no" encoding='utf-16' />
<xsl:strip-space elements="*" />
<!--
  /*
	 *(C) Copyright 2000-2003 by Web2CAD AG.  All rights reserved.
	 *
	 * WEB2CAD PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
	 * WEB2CAD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
	 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  
	 * WEB2CAD AG DOES NOT WARRANT THAT THE OPERATION OF THE
	 * PROGRAM WILL BE UNINTERRUPTED OR ERROR FREE.
   */
	 
  /*
	 * This is an example stylesheet for CatalogCreator
	 */
-->

<!--
	Generation of <A HREF="javascript:...> results in an URI-encoded value that is not readable by the browser by now.
	So this looks like <A HREF="" onclick="...; return false;">
	If xsl:attribute should support disable-output-encoding some day this could be changed again.
-->
	
	
	<!-- ******** Verification of CAD Elements Type ********** -->
	<xsl:variable name="has_caddrawing">
		<xsl:choose>
			<xsl:when test = "count(//CADDRAWING) &gt; 0">true</xsl:when>
			<xsl:otherwise>false</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>	

	<xsl:variable name="cad_type">
		<xsl:choose>
			<xsl:when test = "count(//MAP_PA2VAR) &gt; 0">integrated</xsl:when>
			<xsl:when test = "$has_caddrawing='false' and ( //SUBTABLE or //ARTICLE/MINMAX )">integrated</xsl:when>
			<xsl:otherwise>isolated</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	
	<!-- ********** Begin of templates ************ -->
	<xsl:template match="/">
		<HTML>
			<HEAD>
				<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes" />
				<META name="description"><xsl:attribute name="content"><xsl:value-of select="//PRODUCT_CATEGORY[PRODUCT_INFO]/@name"/></xsl:attribute></META>
				<TITLE><xsl:value-of select="//PRODUCT_CATEGORY[PRODUCT_INFO]/@name"/></TITLE>
				<xsl:variable name="assigned_css">
					<xsl:choose>
						<xsl:when test="//ASSEMBLY[PART]/@css"><xsl:value-of select="//ASSEMBLY[PART]/@css" /></xsl:when>
						<xsl:when test="//PRODUCT_CATEGORY[PRODUCT_INFO]/@css"><xsl:value-of select="//PRODUCT_CATEGORY[PRODUCT_INFO]/@css" /></xsl:when>
						<xsl:otherwise>product.css</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>				
				<link rel="stylesheet">
					<xsl:attribute name="type">text/css</xsl:attribute>
					<xsl:attribute name="href"><xsl:value-of select="$assigned_css"/></xsl:attribute>
				</link>
				<style type="text/css" MEDIA="print">
					.partstable {height: 100%;}
				</style>

				<SCRIPT language="JavaScript">
				<xsl:comment>
				<![CDATA[
				onerror = stopError;
				function stopError() { return true; }				
				]]>
				//</xsl:comment>
				</SCRIPT>

				<!-- including texts edited with websitemanager -->
				<SCRIPT language="JavaScript" src="textscripts/text.js"></SCRIPT>
				
				<!-- including cad.js for-->				
				<xsl:if test="//PRODUCT_INFO[@type='caddrawing'] or //ARTICLE/MINMAX or //SUBTABLE">
				<SCRIPT language="JavaScript" src="../common/script/cad.js"></SCRIPT>				
				</xsl:if>
				
				<!-- including functions for handling assembly drawings -->
				<xsl:if test="//ASSEMBLY or //PRODUCT_CATEGORY[@detailview]">
				<SCRIPT language="JavaScript" src="../common/script/ic.js"></SCRIPT>
				</xsl:if>
				<xsl:if test="//ASSEMBLY[PART and (not(@type) or @type!='svg')]">
				<SCRIPT language="JavaScript" src="../common/script/iso.js"></SCRIPT>
				<SCRIPT language="VBScript" for="iso_img" event="HsHit(nMouseBtn, lRefID, strName, strViewPortName, strViewPortFile)">call HsHit(nMouseBtn, lRefID, strName, strViewPortName, strViewPortFile)</SCRIPT>
				<SCRIPT language="VBScript" for="iso_img" event="ContextMenuItemHit(item, Title)">call ContextMenuItemHit(item, Title)</SCRIPT>
				</xsl:if>
				<xsl:if test="//ASSEMBLY[PART and @type='svg']">
				<SCRIPT language="JavaScript" src="../common/script/svg.js"></SCRIPT>
				<SCRIPT LANGUAGE="JavaScript" SRC="../common/script/svgcheck.js"></SCRIPT>
				<SCRIPT LANGUAGE="VBScript" SRC="../common/script/svgcheck.vbs"></SCRIPT>
				</xsl:if>

				<!-- scripts for shopping cart and PowerParts -->
				<SCRIPT language="JavaScript"  src="../common/script/isc.js"></SCRIPT>
				<SCRIPT language="JavaScript">
				<xsl:comment>
					var PartOrderInfo = new Array();
					<xsl:for-each select="//ASSEMBLY[PART]">
						//parts information
						var PartsName = new Array();
						var PartsOrd = new Array();
						var PartsHs = new Array();
						var PartsNumber = new Array();
						var PartsEAN = new Array();
						var PartsDelivery = new Array();
						var PartsRef = new Array();
						var PartsNav = new Array();
				  		var PartIndex = 1;
						<xsl:for-each select="PART">
				  		//ordering information - articles
							<xsl:if test="@articlenumber!=''">PartOrderInfo[PartIndex] = <xsl:apply-templates select="." mode="createSC" />;</xsl:if>
					  	PartsName[PartIndex] = '<xsl:value-of select="VALUE[@type='PARTNAME']" />';

							PartsOrd[PartIndex] = <xsl:value-of select="@can_be_ordered" />;
							PartsHs[PartIndex] = '<xsl:value-of select="@number" />';
							PartsNumber[PartIndex] = '<xsl:value-of select="@articlenumber" />';
							PartsEAN[PartIndex] = '<xsl:value-of select="VALUE[@type='EAN']" />';
							PartsDelivery[PartIndex] = '<xsl:value-of select="VALUE[@type='DELIVERY']" />';
							PartsRef[PartIndex] = '<xsl:value-of select="@assemblylink" />';
							PartsNav[PartIndex] = '<xsl:value-of select="@navlink" />';
							PartIndex++;
						</xsl:for-each>
					</xsl:for-each>

					//syncronize navigation frame with product page
					loadNav('<xsl:value-of select="//ASSEMBLY/@navlink|//PRODUCT_CATEGORY/@navlink"/>');
				//</xsl:comment>
				</SCRIPT>
			</HEAD>

			<!-- visible part of the HTML page -->
			<BODY>
				<xsl:if test="//ASSEMBLY[PART and @drawing!='' and (not(@type) or @type!='svg')]">	<!-- no svg drawing -->
					<xsl:attribute name="onload">Init('../../media/<xsl:value-of select="//ASSEMBLY[PART]/@drawing"/>')</xsl:attribute>
				</xsl:if>
				<xsl:if test="//ASSEMBLY[PART and @drawing!='' and @type='svg']">	<!-- svg drawing -->
					<xsl:attribute name="onload">checkParam()</xsl:attribute>
					<SCRIPT LANGUAGE="JavaScript">
					<xsl:comment>
						checkAndGetSVGViewer();
					//</xsl:comment>
					</SCRIPT>
				</xsl:if>
				<xsl:if test="$has_caddrawing='true' or $cad_type='integrated'">
				<FORM name="goCAD" action="../php/startCAD.php" method="get">
					<!-- **********  "HiddenFields" for transfer to PHP-Logic ************ -->
					<INPUT type="hidden" name="productname" id="productname"><xsl:attribute name="value"><xsl:value-of select="//PRODUCT_CATEGORY[PRODUCT_INFO]/@name"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="cadtype" id="cadtype"><xsl:attribute name="value"><xsl:value-of select="$cad_type"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="stvModel" id="stvModel"><xsl:attribute name="value"><xsl:value-of select="normalize-space(//CADDRAWING[position()='1']/@src)"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="stvID" id="stvID"><xsl:attribute name="value"><xsl:value-of select="normalize-space(//CADDRAWING[position()='1']/@id)"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="mappa2var" id="mappa2var"><xsl:attribute name="value"><xsl:for-each select="//CADDRAWING[position()='1']/MAP_PA2VAR"><xsl:value-of select="@variable_name"/>=<xsl:value-of select="@type_id"/>;</xsl:for-each></xsl:attribute></INPUT>
					<INPUT type="hidden" name="subtab" id="subtab"></INPUT>
					<INPUT type="hidden" name="catalogPath" id="catalogPath"></INPUT>
					<INPUT type="hidden" name="backto" id="backto"></INPUT>
					<INPUT type="hidden" name="prodinfopic" id="prodinfopic"><xsl:attribute name="value"><xsl:value-of select="normalize-space(//CADDRAWING[position()='1']/@drawing)"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="shoppingcart" id="shoppingcart"></INPUT>
					<INPUT type="hidden" name="artID" id="artID"></INPUT>
					<INPUT type="hidden" name="rule" id="rule"><xsl:attribute name="value"><xsl:call-template name="replace-text"><xsl:with-param name="text" select="//RULE/ORIGINAL"/><xsl:with-param name="replace" select="'&quot;'"/><xsl:with-param name="by" select="'\&quot;'"/></xsl:call-template></xsl:attribute></INPUT>
					<INPUT type="hidden" name="SCorCAD" id="SCorCAD"></INPUT>
					<INPUT type="hidden" name="language" id="language"><xsl:attribute name="value"><xsl:value-of select="//WEB2CAD/@language"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="language_abbreviation" id="language_abbreviation"><xsl:attribute name="value"><xsl:value-of select="//WEB2CAD/@language_abbreviation"/></xsl:attribute></INPUT>
					<INPUT type="hidden" name="pp_lang" id="pp_lang"><xsl:attribute name="value"><xsl:value-of select="//WEB2CAD/@pp_lang"/></xsl:attribute></INPUT>					
					<INPUT type="hidden" name="used_charset" id="used_charset"></INPUT>
					<INPUT type="hidden" name="cadstring" id="language"></INPUT>
					<INPUT type="hidden" name="css" id="css"><xsl:attribute name="value"><xsl:value-of select="$assigned_css"/></xsl:attribute></INPUT>					
				</FORM>
				</xsl:if>
				<DIV id="body">				
				<!-- for feature search: search history -->
				<table class="tables" align="center">
				<tr>
				<xsl:for-each select="//SEARCH_HISTORY">
					<TD class="shistory">
					<script language="JavaScript">
					<xsl:comment><![CDATA[
						document.writeln("&nbsp;" + str_pas_history);
					]]>
					//</xsl:comment>
					</script>
					<xsl:value-of select="."/><br/>
					</TD>
				</xsl:for-each>
				</tr>

				<!-- for feature search: number of results -->
				<tr>
				<xsl:for-each select="//NUMBER_OF_RESULTS">
					<TD class="shistory">
					<script language="JavaScript">
					<xsl:comment><![CDATA[
						document.writeln("&nbsp;" + str_number_results);
					]]>
					//</xsl:comment>
					</script>
					<xsl:value-of select="."/></TD>
				</xsl:for-each>
				</tr>
				</table>

				<xsl:apply-templates select="//PRODUCT_CATEGORY[PRODUCT_INFO]" mode="writeProduct"/>
				<xsl:apply-templates select="//ASSEMBLY[PART]" mode="writeAssembly"/>

			</DIV>
			</BODY>
		</HTML>
	</xsl:template>
	<!-- *********** End of HTML-Code *************** -->

	<!-- ********** PRODUCTS ************ -->
	<xsl:template match="PRODUCT_CATEGORY[PRODUCT_INFO]" mode="writeProduct">
		<xsl:for-each select=".">
			<!-- in feature search result dont show header with name of productgroup -->
			<xsl:if test="not(self::node()[@resultview]) and not(self::node()[@detailview])">
				<TABLE class="tables" align="center" id="space_title">
				<TR>
					<!-- PRODUCT NAME  -->
					<TD class="title" valign="top"><xsl:value-of select="@name"/></TD>
				</TR>
				<xsl:if test="@powerpartsbranch">
					<TR> <TD align="right"><A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">goToPP('<xsl:value-of select="@powerpartsbranch" />'); return false;</xsl:attribute><IMG src="../common/pic/pp_web.gif" border="0"/></A></TD></TR>
				</xsl:if>
				<xsl:if test="@ppf">
					<TR> <TD align="right"><A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">goToPPF('<xsl:value-of select="@ppf" />'); return false;</xsl:attribute><IMG src="../common/pic/pp_local.gif" border="0"/></A></TD></TR>
				</xsl:if>
			</TABLE>
			</xsl:if>
			<xsl:apply-templates select="PRODUCT_INFO[not(@isvisibleinweb='0')]"/>
		</xsl:for-each>
	</xsl:template>
	<!-- ********** END PRODUCTS ************ -->


	<!-- ************************************************* -->
	<!-- **************** variant ************************ -->
	<!-- ************************************************* -->
	<xsl:template match="PRODUCT_INFO[@type='variant']">
		<!-- nothing to do, only used in shopping cart -->
	</xsl:template>


	<!-- ******************************************************************* -->
	<!-- ************************** create Media ***************************** -->
	<!-- ******************************************************************* -->
<!--	<xsl:template match="PRODUCT_INFO[@type='media']">-->
<!--		<TABLE class="tables" align="center">-->
<!--			<TR>-->
<!--				<xsl:for-each select="MEDIA[not (@isvisibleinweb='0')]">-->
<!--					<xsl:choose>-->
<!--						<xsl:when test="@mime[.='video/mpeg' or .='video/quicktime' or .='audio/mpeg' or .='video/x-msvideo' or .='audio/x-wav']" >-->
<!--							<TD class="mmedia">-->
<!--							<EMBED>-->
<!--								<xsl:attribute name="src">-->
<!--								<xsl:value-of select="./@src" />-->
<!--								</xsl:attribute>-->
<!--							</EMBED>-->
<!--							</TD>						-->
<!--						</xsl:when>-->
<!--						<xsl:when test="@mime[.='application/x-shockwave-flash']" >-->
<!--							<TD class="mmedia">														-->
<!--								<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="250" height="250">-->
<!--								<param name="movie"> -->
<!--									<xsl:attribute name="value"><xsl:value-of select="./@src" /></xsl:attribute> -->
<!--								</param> 							-->
<!--								 <param name="quality" value="high"/>-->
<!--								 <param name="scale" value="exactfit"/>-->
<!--								 <param name="menu" value="true"/>-->
<!--								 <param name="bgcolor" value="#000040"/>								 -->
<!--								 <embed quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="250"> -->
<!--								 	<xsl:attribute name="src"> -->
<!--								 		<xsl:value-of select="./@src" /> -->
<!--								 	</xsl:attribute> -->
<!--								 </embed> 								 -->
<!--								</object>-->
<!--							</TD>			-->
<!--						</xsl:when>-->
<!--						<xsl:when test="@mime[.='application/msexcel' or .='application/msword' or .='application/pdf' or .='application/rtf' or .='text/html']" >							-->
<!--							<TD class="mmedia">-->
<!--							<script language="JavaScript">-->
<!--							<xsl:comment>-->
<!--								var src_file = '<xsl:value-of select="./@src" />';-->
<!--								var type = '<xsl:value-of select="./@mime" />';-->
<!--								<![CDATA[-->
<!--								if (document.all)-->
<!--									document.write('<iframe width="540" height="350" src="' + src_file + '"></iframe>');-->
<!--								else-->
<!--								{-->
<!--									document.write('<ilayer width="540" height="350">');-->
<!--									document.write('<EMBED type="' + type + '" src="' + src_file + '"></EMBED>');-->
<!--									document.write('</ilayer>');-->
<!--								}-->
<!--							]]>-->
<!--							//</xsl:comment>-->
<!--							</script>-->
<!--							</TD>						-->
<!--						</xsl:when>						-->
<!--						<xsl:when test="@mime[.='image/bmp' or .='image/gif' or .='image/jpeg' or .='image/x-png']" >-->
<!--							<TD class="mmedia">-->
<!--								<xsl:choose>-->
<!--								<xsl:when test="PRODUCT_INFO[@type='link']">-->
<!--									<A><xsl:attribute name ="target"><xsl:value-of select="PRODUCT_INFO[@type='link']/@linktarget"/></xsl:attribute><xsl:attribute name="href"><xsl:value-of select="PRODUCT_INFO[@type='link']/@src"/></xsl:attribute>-->
<!--									<IMG class="image"><xsl:attribute name="id"><xsl:value-of select="@feature_tag"/></xsl:attribute>-->
<!--										<xsl:attribute name="src">-->
<!--										<xsl:value-of select="./@src"/>-->
<!--										</xsl:attribute>-->
<!--									</IMG>-->
<!--									</A>-->
<!--								</xsl:when>-->
<!--								<xsl:otherwise>-->
<!--									<IMG class="image"><xsl:attribute name="id"><xsl:value-of select="@feature_tag"/></xsl:attribute>-->
<!--										<xsl:attribute name="src">-->
<!--										<xsl:value-of select="./@src"/>-->
<!--										</xsl:attribute>-->
<!--									</IMG>-->
<!--								</xsl:otherwise>-->
<!--							</xsl:choose>-->
<!--							</TD>-->
<!--						</xsl:when>-->
<!--						<xsl:when test="@src[.!='']">-->
<!--							<TD class="mmedia">-->
<!--						<script language="JavaScript">-->
<!--							<xsl:comment><![CDATA[-->
<!--							document.write(str_load_file);-->
<!--							]]>-->
<!--							//</xsl:comment>-->
<!--							</script>-->
<!--							<br/><A><xsl:attribute name="href"><xsl:value-of select="./@src" /></xsl:attribute><xsl:value-of select="./@name" /></A>-->
<!--						</TD>-->
<!--						</xsl:when>-->
<!--					</xsl:choose>-->
<!--				</xsl:for-each>-->
<!--			</TR>-->
<!--			<TR>-->
<!--				<xsl:for-each select="MEDIA[not (@isvisibleinweb='0')]">-->
<!--					<TD class="mm_txt">-->
<!--					<xsl:apply-templates select ="*[not (@isvisibleinweb='0')]" />-->
<!--					</TD>-->
<!--				</xsl:for-each>-->
<!--			</TR>		-->
<!--		</TABLE>-->
<!--	</xsl:template>	-->

	<!-- ************************************************* -->
	<!-- ************** text ***************************** -->
	<!-- ************************************************* -->
	<xsl:template match="PRODUCT_INFO[@type='text']">
		<TABLE class="tables" align="center" id="space_text">
			<TR>
				<TD class="txt"><xsl:apply-templates/></TD>
			</TR>
		</TABLE>
	</xsl:template>
	
	<!-- text below media element -->	
	<xsl:template match="PRODUCT_INFO[parent::MEDIA][@type='text']">
		<xsl:apply-templates/>
	</xsl:template>

	<!-- ************************************************* -->
	<!-- ************** order_information **************** -->
	<!-- ************************************************* -->
	<xsl:template match="PRODUCT_INFO[@type='order_information']">
		<TABLE class="tables" align="center" id="space_info">
			<TR>
				<TD align="left" class="order_info"><xsl:apply-templates/></TD>
			</TR>
		</TABLE>
	</xsl:template>	
	
	<!-- ************************************************* -->
	<!-- ************** remark *************************** -->
	<!-- ************************************************* -->
	<xsl:template match="PRODUCT_INFO[@type='remark']">
		<TABLE class="tables" align="center" id="space_remark">
			<TR>
				<TD align="left" class="remark"><xsl:apply-templates/></TD>
			</TR>
		</TABLE>
	</xsl:template>
	
	<!-- ************************************************* -->
	<!-- ***************** links ************************* -->
	<!-- ************************************************* -->
	<xsl:template match="PRODUCT_INFO[@type='link']">
		<TABLE class="tables" align="center" id="space_link">
			<TR>
				<TD align="left"><A>
				<xsl:if test="@linktarget">
					<xsl:attribute name="target"><xsl:value-of select="@linktarget"/></xsl:attribute>
				</xsl:if>
				<xsl:attribute name="href"><xsl:value-of select="@src"/></xsl:attribute>
				<xsl:value-of select="@name"/><xsl:apply-templates/></A></TD>

			</TR>
		</TABLE>
	</xsl:template>
	
	<!-- link below media element -->	
	<xsl:template match="PRODUCT_INFO[parent::MEDIA][@type='link']">
		<A><xsl:if test="@linktarget">
				<xsl:attribute name="target"><xsl:value-of select="@linktarget"/></xsl:attribute>
			</xsl:if>
			<xsl:attribute name="href"><xsl:value-of select="@src"/></xsl:attribute>
			<xsl:value-of select="@name"/><xsl:apply-templates/></A>
	</xsl:template>
	
	<!-- ************************************************* -->
	<!-- ************** CAD  ***************************** -->
	<!-- ************************************************* -->
	<xsl:template match="PRODUCT_INFO[@type='caddrawing']">
		<xsl:if test="$cad_type='isolated'">
			<TABLE class="tables" align="center" id="space_product">
				<TR><TD>
					<!--INTERNAL TABLE -->
					<TABLE class="internalTable" align="left">
						<xsl:if test="CADDRAWING[@drawing]">
							<TR><TD class="CADimage">
								<IMG class="image">
									<xsl:attribute name="id"><xsl:value-of select="CADDRAWING/@feature_tag"/></xsl:attribute>
									<xsl:attribute name="src"><xsl:value-of select="CADDRAWING/@drawing"/></xsl:attribute>
								</IMG>			
							</TD></TR>
						</xsl:if>
						<xsl:variable name="cadstring"><xsl:apply-templates select="." mode="createCAD"/></xsl:variable>
						<xsl:variable name="translated_cadstring"><xsl:value-of select="translate($cadstring,'&#x09;&#x0A;&#x0D;','')"/></xsl:variable>
						<xsl:variable name="cadvariants"><xsl:apply-templates select="." mode="getCADVariants"/></xsl:variable>
						<TR><TD class="CADButton">
							<input type="button" class="button" name="CAD-Links" value="CAD">
							<xsl:attribute name="onClick">SSFormValues_iso('<xsl:value-of select="CADDRAWING/@id"/>','<xsl:value-of select="CADDRAWING/@drawing"/>','<xsl:value-of select="CADDRAWING/@src"/>');</xsl:attribute>
						</input>
						</TD></TR>
					</TABLE>
				</TD></TR>
			</TABLE>
		</xsl:if>
	</xsl:template>
	
	<!-- ************************************************* -->
	<!-- ****************** TABLE TYPES ****************** -->
	<!-- ** all tables, except tables with name 'extra' ** -->
	<xsl:template match="PRODUCT_INFO[@type='articles']">
			<!-- ********************************************* -->
			<!-- ************* TABLE OF PRODUCTS ************* -->
			<!-- ********* Horizontal aligned Values ********* -->
			<!-- ********************************************* -->

			<!-- create variable whether shopping cart column for isc is needed -->
			<xsl:variable name="sccol_isc">
				<xsl:choose>
				<xsl:when test="ARTICLE/@number!='' and @name!='info' and @name!='tab2' and (ARTICLE/@can_be_ordered='1' or ARTICLE/@cart='1' or (not(ARTICLE/@can_be_ordered) and not(ARTICLE/@cart)))">1</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>
			<!-- create variable whether shopping cart column for CAD is needed -->
			<xsl:variable name="sccol_cad">
				<xsl:choose>
				<xsl:when test="($cad_type='integrated' or SUBTABLE or ARTICLE/MINMAX) and @name!='info' and @name!='tab2'">1</xsl:when>
				<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:variable>

			<!-- EXTERNAL TABLE -->
			<TABLE class="tables" align="center" id="space_product">
				<TR><TD>
					<!--INTERNAL TABLE -->
					<TABLE class="internalTable" align="left">
						<!-- ***///// TABLE- HEADERS /////*** -->
						<TR class="thead">
							<!-- column for detail view symbol in feature search -->
							<xsl:if test="@name='searchresult'">
								<TD width="1%">&nbsp;</TD>
							</xsl:if>

							<!-- column for shopping cart symbol, not visible in info/tab2-tables -->
							<xsl:if test="$sccol_isc=1 or $sccol_cad=1">
								<TD class="th_cart">&nbsp;</TD>
							</xsl:if>

						<!-- ///// OTHER PARAMETERS ///// -->
							<xsl:for-each select="FEATURE_SYSTEM/*[not(@isvisibleinweb='0') and not(../../@name='info' and @type='ARTICLENUMBER') and not(self::SUBTABLEFEATURE)]">							
								<TD><xsl:attribute name="class">th_<xsl:value-of select="@type"/></xsl:attribute><xsl:apply-templates/></TD>
							</xsl:for-each>
									
							<!-- ///// PRICE ///// -->
							<xsl:if test="not(../@resultview)"><!-- display price header if not in result view of PAS -->
								<xsl:for-each select="ARTICLE[1]/PRICE">
								<TD class="th_price">
								<xsl:value-of select="../../ARTICLE_DESCRIPTION/@price" />
								<xsl:if test="@quantity &gt; 1">/<xsl:value-of select="@quantity" /></xsl:if>
								<xsl:if test="@sellingunit"><BR/><xsl:value-of select="@sellingunit" /></xsl:if>
								</TD>
								</xsl:for-each>
							</xsl:if>
									
							<xsl:if test="ARTICLE/@powerpartsbranch">
								<TD class="th_ppbranch"><xsl:value-of select="ARTICLE_DESCRIPTION/@pponweb"/></TD>
							</xsl:if>
									
							<xsl:if test="ARTICLE/@ppf">
								<TD class="th_ppf"><xsl:value-of select="ARTICLE_DESCRIPTION/@pplocal"/></TD>
							</xsl:if>
							
							<xsl:if test="$cad_type='integrated' and $has_caddrawing='true'">
								<TD class="th_cad">&nbsp;</TD>
							</xsl:if>							
						</TR>
								
						<!-- ***///// TABLE- SUBHEADERS /////*** -->
						<xsl:if test="FEATURE_SYSTEM/*[not(@isvisibleinweb='0')]/@unit[.!='']|ARTICLE[1]/PRICE/@currency">
							<xsl:if test="not(../@resultview)"><!-- never show this line in result view of pas -->
							<TR class="thead">
								<!-- column for detail view symbol in feature search -->
								<xsl:if test="@name='searchresult'">
									<TD width="1%">&nbsp;</TD>
								</xsl:if>
								<!-- column for shopping cart symbol, not visible in info/tab2-tables -->
								<xsl:if test="$sccol_isc=1 or $sccol_cad=1">
									<TD class="th_cart">&nbsp;</TD>
								</xsl:if>
								<!-- ///// UNITS ///// -->
								<xsl:for-each select="FEATURE_SYSTEM/*[not(@isvisibleinweb='0') and not(../../@name='info' and @type='ARTICLENUMBER') and not(self::SUBTABLEFEATURE)]">
									<TD><xsl:attribute name="class">th_<xsl:value-of select="@type"/></xsl:attribute>&nbsp;<xsl:value-of select="@unit"/>&nbsp;</TD>
								</xsl:for-each>
								<!-- ///// CURRENCY ///// -->
								<xsl:if test="not(../@resultview)"><!-- display currencies if not in result view of PAS -->
									<xsl:for-each select="ARTICLE[1]/PRICE">
									<TD class="th_price">&nbsp;<xsl:value-of select="@currency"/>&nbsp;</TD>
									</xsl:for-each>
								</xsl:if>
								<xsl:if test="ARTICLE/@powerpartsbranch">
									<TD class="th_ppbranch">&nbsp;</TD>
								</xsl:if>
								<xsl:if test="ARTICLE/@ppf">
									<TD class="th_ppf">&nbsp;</TD>
								</xsl:if>								
								<xsl:if test="$cad_type='integrated' and $has_caddrawing='true'">
									<TD class="th_cad">&nbsp;</TD>
								</xsl:if>								
							</TR>
							</xsl:if>
						</xsl:if>
														
						<!-- ***///// VALUES /////*** -->					
						
						<xsl:for-each select="ARTICLE">
							<xsl:variable name="cadstring"><xsl:apply-templates select="." mode="createCAD"/></xsl:variable>
							<xsl:variable name="translated_cadstring"><xsl:value-of select="translate($cadstring,'&#x09;&#x0A;&#x0D;','')"/></xsl:variable>
							<xsl:variable name="cadvariants"><xsl:apply-templates select="." mode="getCADVariants"/></xsl:variable>
					
							<TR><xsl:attribute name="class">tline<xsl:value-of select="(position() mod 2) +1" /></xsl:attribute>
								<!-- column for detail view in feature search -->
								<xsl:if test="../@name='searchresult'">
								<TD class="t_cart" width="1%">
								<A><xsl:attribute name="HREF">javascript:parent.searchinput.showArticleDetailPage(<xsl:value-of select="position()-1" />)</xsl:attribute>
								<!-- the shopping cart symbol -->
								<IMG src="../common/pic/detailview.gif" width="20" height="20" border="0"/></A>
								</TD>
								</xsl:if>
								
								<!-- column for shopping cart symbol, not visible in info/tab2-tables -->
								<xsl:if test="$sccol_isc=1 or $sccol_cad=1">									
									<xsl:variable name="scstring">
										<xsl:choose>
											<xsl:when test ="@number!=''"><xsl:apply-templates select="." mode="createSC"/></xsl:when>
											<xsl:otherwise>''</xsl:otherwise>
										</xsl:choose>
									</xsl:variable>
									<TD class="t_cart" width="1%">									
									<xsl:choose>
										<xsl:when test="$sccol_cad=1">																																			
											<A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onClick">SSFormValues_sc('<xsl:value-of select="$translated_cadstring"/>','<xsl:value-of select="$cadvariants"/>','<xsl:value-of select="@id"/>',<xsl:value-of select="translate($scstring,'&#x09;&#x0A;&#x0D;','')"/>); return false;</xsl:attribute>
											<IMG src="../common/pic/cart20.gif" width="20" height="20" border="0"/></A>
										</xsl:when>
										<xsl:otherwise>
											<xsl:choose>
												<xsl:when test ="@number!='' and (@can_be_ordered='1' or @cart='1' or (not(@can_be_ordered) and not(@cart)))">
													<A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">add2cart2(<xsl:value-of select="translate($scstring,'&#x09;&#x0A;&#x0D;','')"/>); return false;</xsl:attribute>
													<IMG src="../common/pic/cart20.gif" width="20" height="20" border="0"/></A>
												</xsl:when>
												<xsl:otherwise>&nbsp;</xsl:otherwise>
											</xsl:choose>
										</xsl:otherwise>
									</xsl:choose>
								</TD>
								</xsl:if>
										
								<!-- ///// other values ///// -->
								<xsl:for-each select="*">
									<xsl:variable name="pos" select="position()" />
									<xsl:if test="../../FEATURE_SYSTEM/*[position()=$pos][not (@isvisibleinweb='0')]">
										<xsl:apply-templates select="." />
									</xsl:if>
								</xsl:for-each>								
								<xsl:apply-templates select="PRICE"/>
								<!-- ///// powerparts-branch ///// -->
								<xsl:if test="../ARTICLE/@powerpartsbranch">
								<TD id="t_ppbranch">
									<xsl:choose>
										<xsl:when test="@powerpartsbranch">
											<A><xsl:attribute name="href">javascript:goToPP('<xsl:value-of select="@powerpartsbranch" />')</xsl:attribute><IMG src="../common/pic/pp_web.gif" border="0"/></A>
										</xsl:when>
										<xsl:otherwise>&nbsp;</xsl:otherwise>
									</xsl:choose>
								</TD>
								</xsl:if>
								<xsl:if test="../ARTICLE/@ppf">
								<TD id="t_ppf">
									<xsl:choose>
										<xsl:when test="@ppf">
											<A><xsl:attribute name="href">javascript:goToPPF('<xsl:value-of select="@ppf" />')</xsl:attribute><IMG src="../common/pic/pp_local.gif" border="0"/></A>
										</xsl:when>
										<xsl:otherwise>&nbsp;</xsl:otherwise>
									</xsl:choose>
								</TD>
								</xsl:if>
								<xsl:if test="$cad_type='integrated' and $has_caddrawing='true'">
									<TD id="t_cad">
										<IMG class="CADButtontd" src="../common/pic/cad_button.gif" border="0">										
											<xsl:attribute name="onMouseover">javascript:this.setAttribute('alt',unescapeString(strCADButton))</xsl:attribute>									
											<xsl:attribute name="onClick">SSFormValues_int('<xsl:value-of select="$translated_cadstring"/>','<xsl:value-of select="$cadvariants"/>','<xsl:value-of select="@id"/>');</xsl:attribute>
										</IMG>										
										</TD>
								</xsl:if>							
							</TR>
						</xsl:for-each>
					</TABLE>
				</TD></TR>
			</TABLE>
	</xsl:template>

	
	<!-- ****************************************************** -->
	<!-- ************* EXTRA: for optional features *********** -->
	<!-- *************  not displayed on HTML-page  *********** -->
	<!-- ****************************************************** -->
	<xsl:template match="PRODUCT_INFO[@type='articles' and @name='extra']">
	</xsl:template>

	<!-- ********************************************************  -->
	<!-- *** template for generating the shopping cart string ***  -->
	<!-- ********************************************************  -->
	<!-- for compatibility with xalan (used by feature search) and -->
	<!-- netscape browsers:                                        -->
	<!--    - don't use spaces in this template                    -->
	<!--    - use tabs/linebreaks instead                          -->
	<xsl:variable name="von">'</xsl:variable>
	<xsl:variable name="nach">\'</xsl:variable>
	<xsl:template match="ARTICLE[@number!='']|PART[@articlenumber!='']" mode="createSC">
		'<xsl:choose>
			<xsl:when test="@articlenumber"><xsl:value-of select="@articlenumber" />**<xsl:value-of select="VALUE[@type='PARTNAME' or @type='ARTICLENAME']" /></xsl:when>
			<xsl:when test="@productname"><xsl:value-of select="@number" />**<xsl:value-of select="@productname" /></xsl:when><!-- needed for PAS -->
			<xsl:otherwise><xsl:value-of select="VALUE[@type='ARTICLENUMBER']" />**<xsl:value-of select="../../@name" /></xsl:otherwise>
		</xsl:choose><!-- Article number --><!-- Description == Name of part/Name of product -->

		<xsl:for-each select="PRICE">**<xsl:if test="@price"><xsl:value-of select="@price" />$$</xsl:if></xsl:for-each>**<!-- Prices -->
		<xsl:for-each select="PRICE"><xsl:if test="@price"><xsl:value-of select="@quantity" />$$</xsl:if></xsl:for-each>**<!-- Quantities -->
		<xsl:for-each select="PRICE"><xsl:if test="@price"><xsl:value-of select="@currency" />$$</xsl:if></xsl:for-each>**<!-- Currencies -->
		<xsl:for-each select="PRICE"><xsl:if test="@price"><xsl:call-template name="replace-text"><xsl:with-param name="text" select="@sellingunit" /><xsl:with-param name="replace" select="$von"/><xsl:with-param name="by" select="$nach"/></xsl:call-template>$$</xsl:if></xsl:for-each>**<!-- Selling units -->
		<xsl:for-each select="../../PRODUCT_INFO[@type='variant']|PRODUCT_INFO[@type='variant']">
			<xsl:value-of select="@name"/><xsl:for-each select="VARIANT">$$<xsl:value-of select="."/></xsl:for-each>
			<xsl:if test="position() != last()">##</xsl:if>
		</xsl:for-each>**'<!-- variants -->
		<xsl:choose>
			<xsl:when test="@productgroupfilename">+"../<xsl:value-of select="@productgroupfilename"/>"+</xsl:when><!-- needed for PAS -->
			<xsl:otherwise>+location.href+</xsl:otherwise>
		</xsl:choose>
		'**<xsl:for-each select="../../PRODUCT_INFO[@name='extra']/ARTICLE"><xsl:value-of select="@name" />##' +
				'<xsl:for-each select="PRICE"><xsl:value-of select="@price" />$$</xsl:for-each>##' +
				'<xsl:for-each select="PRICE"><xsl:value-of select="@quantity" />$$</xsl:for-each>;</xsl:for-each>****<xsl:value-of select="VALUE[@type='BENENNUNG']" />'

	</xsl:template>

	<!-- ********************************************************  -->
	<!-- *** template for generating the cad string ***  -->
	<!-- ********************************************************  -->
	<xsl:template match="ARTICLE" mode="createCAD">
		<xsl:for-each select="VALUE|VARIANT|INFORMATION|MINMAX">
			<xsl:variable name="VALTYPEID"><xsl:value-of select="@type_id"/></xsl:variable>
			<xsl:if test="//CADDRAWING[position()='1']/MAP_PA2VAR[@type_id=$VALTYPEID]">
				<xsl:value-of select="//CADDRAWING[position()='1']/MAP_PA2VAR[@type_id=$VALTYPEID]/@variable_name"/>=
					<xsl:choose>
						<xsl:when test="name()='MINMAX' and not(@min=@max)">' +  document.getElementById('<xsl:value-of select="../@id"/><xsl:value-of select="@type_id"/>').value + '</xsl:when>
						<xsl:when test="name()='MINMAX' and (@min=@max)"><xsl:value-of select="@min"/></xsl:when>
						<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
					</xsl:choose>
			;</xsl:if>
		</xsl:for-each>
	</xsl:template>
	
	<!-- ********************************************************  -->
	<!-- *** template for generating the CAD Variantinformations   ***  -->
	<!-- ********************************************************  -->
	<xsl:template match="ARTICLE" mode="getCADVariants">		
		<xsl:for-each select="SUBTABLEREF[not(.='')]"><xsl:value-of select="."/>;</xsl:for-each>
	</xsl:template>
	
	<!-- ****************************************************** -->
	<!-- ******************** Assemblies ********************** -->
	<!-- ****************************************************** -->
	<xsl:template match="ASSEMBLY[PART]" mode="writeAssembly">

		<!-- display assembly title and assembly drawing -->
		<xsl:for-each select=".">
			<TABLE class="tables" align="center" id="space_title">
				<TR>
					<!-- PRODUCT NAME  -->
					<TD class="title" valign="top"><xsl:value-of select="@number"/>&nbsp;&nbsp;<xsl:value-of select="@name"/></TD>
				</TR>
			</TABLE>
			<center id="space_assembly">

			<xsl:choose>
				<xsl:when test="/WEB2CAD/@preview">
					<xsl:choose>
						<xsl:when test="@drawing=''">
						</xsl:when>
						<xsl:when test="@type[.='svg']">
							<div class="isoview_div">
							<EMBED NAME="SVGEmbed" TYPE="image/svg-xml" class="isoview">
							<xsl:attribute name="src">../../media/<xsl:value-of select="@drawing"/></xsl:attribute>
							</EMBED>
							<table width="100%">
							<tr>
							<td></td>
							<td width="20"><A href="javascript:doNothing()"><SPAN id="pan" class="svgbutton"><IMG border="0" src="../common/pic/pan.png"/></SPAN></A></td>
							<td width="20"><A href="javascript:doNothing()"><SPAN id="zoominwindow" class="svgbutton"><IMG border="0" src="../common/pic/zoom.png"/></SPAN></A></td>
							<td width="20"><A href="javascript:doNothing()"><SPAN id="zoomout" class="svgbutton"><IMG border="0" src="../common/pic/zoomout.png"/></SPAN></A></td>
							<td width="20"><A href="javascript:doNothing()"><SPAN id="showall" class="svgbutton"><IMG border="0" src="../common/pic/selectall.png"/></SPAN></A></td>
							<td width="20"><A href="javascript:doNothing()"><SPAN id="homeview" class="svgbutton"><IMG border="0" src="../common/pic/home.png"/></SPAN></A></td>
							</tr>
							</table>
							</div>
						</xsl:when>
						<xsl:otherwise>
							<embed name="iso_img" type="application/x-isoview" align="middle" border="1" view="home" class="isoview">
							<xsl:choose>
								<xsl:when test="substring(@drawing,2,1)=':'">
									<xsl:attribute name="src"><xsl:value-of select="@drawing"/></xsl:attribute>
								</xsl:when>
								<xsl:otherwise>
									<xsl:attribute name="src">../../media/<xsl:value-of select="@drawing"/></xsl:attribute>
								</xsl:otherwise>
							</xsl:choose>
							</embed>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:choose>
						<xsl:when test="@drawing=''">
						</xsl:when>
						<xsl:when test="@type[.='svg']">
							<div class="isoview_div">
							<script language="JavaScript">
							<xsl:comment>
							var src_file = '<xsl:value-of select="@drawing"/>';
							var pluginpage = 'http://www.adobe.com/svg/viewer/install/auto/?' + location;
							<![CDATA[
							document.writeln('<EMBED NAME="SVGEmbed" TYPE="image/svg-xml" PLUGINSPAGE="' + pluginpage + '" class="isoview" src="../../media/' + src_file + '"></EMBED>');
							document.writeln('<table width="100%">');
							document.writeln('<tr>');
							document.writeln('<td></td>');
							document.writeln('<td width="20"><A onmousedown="toolBar(\'pan\')" href="javascript:doNothing()"><SPAN id="pan" class="svgbutton"><IMG border="0" src="../common/pic/pan.png" alt="' + strPan + '"/></SPAN></A></td>\n');
							document.writeln('<td width="20"><A onmousedown="toolBar(\'zoomInWindow\')" href="javascript:doNothing()"><SPAN id="zoominwindow" class="svgbutton"><IMG border="0" src="../common/pic/zoom.png" alt="' + strZoomWindow + '"/></SPAN></A></td>\n');
							document.writeln('<td width="20"><A onmousedown="toolBar(\'zoomOutA\')" onmouseup="toolBar(\'zoomOutE\')" href="javascript:doNothing()"><SPAN id="zoomout" class="svgbutton"><IMG border="0" src="../common/pic/zoomout.png" alt="' + strZoomOut + '"/></SPAN></A></td>\n');
							document.writeln('<td width="20"><A onmousedown="toolBar(\'showAllHotspots\')" onmouseup="toolBar(\'hideAllHotspots\')" href="javascript:doNothing()"><SPAN id="showall" class="svgbutton"><IMG border="0" src="../common/pic/selectall.png" alt="' + strShowHotspots + '"/></SPAN></A></td>\n');
							document.writeln('<td width="20"><A onmousedown="toolBar(\'homeViewA\')" onmouseup="toolBar(\'homeViewE\')" href="javascript:doNothing()"><SPAN id="homeview" class="svgbutton"><IMG border="0" src="../common/pic/home.png" alt="' + strHomeView + '"/></SPAN></A></td>\n');
							document.writeln('</tr>');
							document.writeln('</table>');
							]]>
							//</xsl:comment>
							</script>
							</div>
						</xsl:when>
						<xsl:otherwise>
							<script language="JavaScript">
							<xsl:comment>
							var src_file = '<xsl:value-of select="@drawing"/>';
							<![CDATA[
							if (navigator.platform == "Win32")
							{
								document.writeln('<object id="iso_img" classid="CLSID:865B2280-2B71-11D1-BC01-006097AC382A" codebase="' + str_ie_plugin_url + '" class="isoview">');
								document.writeln('<param name="border" value="1" />');
								document.writeln('<embed name="iso_img" type="application/x-isoview" src="../../media/' + src_file + '" align="middle" border="1" view="home" pluginspage="' + str_ns_plugin_url + '" class="isoview">');
								document.writeln('</embed>');
								document.writeln('</object>');
							}
							else
								document.write('<p class="warning">' + str_platform + '</p>');
							]]>
							//</xsl:comment>
							</script>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:otherwise>
			</xsl:choose>
			<script language="JavaScript">
			<xsl:comment><![CDATA[
			if (!document.all && (document.SVGEmbed || document.iso_img))
			{
				// check if Netscape is used with version 2 of svg viewer
				if (navigator.plugins['Adobe SVG Viewer Plugin'])
				{
					if (navigator.plugins['Adobe SVG Viewer Plugin'].description == "SVG Viewer 2.0 for Netscape")
					{
						var newWin = window.open('staticpages/svgplugin.htm','plugin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=250,height=400');
						newWin.focus();
					}
				}
				document.writeln('&nbsp;<br>');
				document.writeln('<center><form name=menu>');
				document.writeln('<font face="Arial">' + str_part_posnr + '</font>&nbsp;<input type="text" size="10" name="artid" value="" readonly>&nbsp;&nbsp;');
				document.writeln('<font face="Arial">' + str_part_name + '</font>&nbsp;<input type="text" size="15" name="artname" value="" readonly>&nbsp;&nbsp;');
				document.writeln('<A HREF="javascript:look4part(document.menu.artname.value)"><IMG src="../common/pic/cart20.gif" width="20" height="20" border="0" ></A>');
				document.writeln('</form></center>');
			}
			]]>
			//</xsl:comment>
			</script>
			</center>
		</xsl:for-each>

		<!-- display product information located above parts in table -->
		<xsl:apply-templates select="PRODUCT_INFO[following-sibling::PART]" />


		<!-- display parts table -->
		<!-- create variable whether shopping cart column is needed -->
		<xsl:variable name="sccol">
			<xsl:choose>
			<xsl:when test="PART/@articlenumber and PART/@can_be_ordered='1'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<DIV id="partstableDIV" align="center" class="partstable">
			<FORM name="show">
			<!-- EXTERNAL TABLE -->
			<TABLE class="tables">
			<TR><TD>
			<!--INTERNAL TABLE -->
			<TABLE class="internalTable">
				<!-- ***///// TABLE- HEADERS /////*** -->
				<THEAD>
				<TR class="thead">
					<xsl:if test="$sccol=1">
						<TD class="th_cart">&nbsp;</TD>
					</xsl:if>
					<!-- ///// Headers of Values from parts ///// -->
					<xsl:for-each select="FEATURE_SYSTEM/*[not(@isvisibleinweb='0')]">
							<TD><xsl:attribute name="class">th_<xsl:value-of select="@type"/></xsl:attribute><xsl:apply-templates/></TD>
					</xsl:for-each>
					
					<!-- ///// PRICE ///// -->
					<xsl:for-each select="PART[1]/PRICE">
						<TD class="th_price">
							<xsl:value-of select="../../PART_DESCRIPTION/@price" />
							<xsl:if test="@quantity &gt; 1">/<xsl:value-of select="@quantity" /></xsl:if>
							<xsl:if test="@sellingunit"><BR/><xsl:value-of select="@sellingunit" /></xsl:if>
						</TD>
					</xsl:for-each>
					<xsl:if test="@drawing!=''"><TD class="th_select">&nbsp;</TD></xsl:if>
				</TR>
				<!-- ***///// TABLE- SUBHEADERS /////*** -->
				<xsl:if test="FEATURE_SYSTEM/*[not(@isvisibleinweb='0')]/@unit[.!='']|PART[1]/PRICE/@currency">
					<!-- ///// UNITS ///// -->
					<TR class="thead">
						<xsl:if test="$sccol=1">
							<TD class="th_cart">&nbsp;</TD>
						</xsl:if>
						<!-- ///// UNITS of parts values///// -->
						<xsl:for-each select="FEATURE_SYSTEM/*[not(@isvisibleinweb='0')]">
							<TD><xsl:attribute name="class">th_<xsl:value-of select="@type"/></xsl:attribute>&nbsp;<xsl:value-of select="@unit"/>&nbsp;</TD>
						</xsl:for-each>
						<!-- ///// CURRENCY ///// -->
						<xsl:for-each select="PART[1]/PRICE">
							<TD>&nbsp;<xsl:value-of select="@currency"/>&nbsp;</TD>
						</xsl:for-each>
						<xsl:if test="@drawing!=''"><TD class="th_select">&nbsp;</TD></xsl:if>
					</TR>
				</xsl:if>
				</THEAD>
				<TFOOT>
				</TFOOT>
				<!-- ***///// VALUES /////*** -->
				<TBODY>
				<xsl:for-each select="PART">
					<TR><xsl:attribute name="class">tline<xsl:value-of select="(position() mod 2) +1" /></xsl:attribute>
						<xsl:if test="$sccol=1">
							<TD class="t_cart">
								<xsl:choose>
								<xsl:when test="@can_be_ordered='1' and @articlenumber!=''">
									<A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">add2cart2(<xsl:apply-templates select="." mode="createSC" />); return false;</xsl:attribute>
									<IMG src="../common/pic/cart20.gif" width="20" height="20" border="0"/></A>
								</xsl:when>
								<xsl:otherwise>&nbsp;</xsl:otherwise>
								</xsl:choose>
							</TD>
						</xsl:if>
						<xsl:variable name="partpos"><xsl:value-of select="position()" /></xsl:variable>
						<xsl:for-each select="*">
							<xsl:variable name="pos" select="position()" />
							<xsl:if test="../../FEATURE_SYSTEM/*[position()=$pos and not(@isvisibleinweb='0')]">
								<xsl:apply-templates select="."><xsl:with-param name="pos" select="$partpos"/></xsl:apply-templates>
							</xsl:if>
						</xsl:for-each>													
						
						<xsl:apply-templates select="PRICE"/>
			
						<xsl:if test="../@drawing!=''"><TD id="t_select">
							<input type="radio" name="ShowDetails"><xsl:attribute name="value"><xsl:value-of select="@number"/></xsl:attribute><xsl:attribute name="onClick">ShowObject('<xsl:value-of select="@number"/>')</xsl:attribute></input>
						</TD></xsl:if>
					</TR>
				</xsl:for-each>
				</TBODY>
			</TABLE>
			</TD></TR>
			</TABLE>
			</FORM>
		</DIV>

		<!-- display everything after the parts -->
		<xsl:apply-templates select="PRODUCT_INFO[preceding-sibling::PART]" />
	</xsl:template>


	<!-- ************************ -->
	<!-- ** product attributes ** -->
	<!-- ************************ -->
	<xsl:template match="//VALUE|//VARIANT|//INFORMATION">
		<TD><xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute>
		<xsl:if test=".=''">&nbsp;</xsl:if>
		<xsl:apply-templates/></TD>
	</xsl:template>

	<xsl:template match="//VALUE[@type='ARTICLENUMBER']">
		<xsl:choose>
			<xsl:when test="../../@name='info' and name(../..)!='ASSEMBLY'"><!-- do not display article number --></xsl:when>
			<xsl:otherwise>
				<TD><xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute>
				<xsl:if test=".=''">&nbsp;</xsl:if>
				<xsl:apply-templates/></TD>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
		
	<xsl:template match="//MINMAX">
		<TD align='right'><xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute>
			<xsl:choose>
				<xsl:when test="@min = @max"><xsl:value-of select="@current"/></xsl:when>
				<xsl:otherwise>
					[<xsl:value-of select="@min"/> - <xsl:value-of select="@max"/>]&nbsp;&nbsp; 
					<input class="t_minmax">								
					<xsl:attribute name="name"><xsl:value-of select="../@id"/><xsl:value-of select="@type_id"/></xsl:attribute>
					<xsl:attribute name="id"><xsl:value-of select="../@id"/><xsl:value-of select="@type_id"/></xsl:attribute>
					<xsl:attribute name="value"><xsl:value-of select="@current"/></xsl:attribute>
					<xsl:attribute name="onBlur">return CheckMinMax(this.id,this.value,<xsl:value-of select="@min"/>,<xsl:value-of select="@max"/>,<xsl:value-of select="@step"/>,<xsl:value-of select="@current"/>);</xsl:attribute>
					</input>
				</xsl:otherwise>
			</xsl:choose>
			</TD>
	</xsl:template>
	
	<xsl:template match="//SUBTABLEREF">
	</xsl:template>

	<xsl:template match="//VALUE[@type='HISTORY']">
		<TD><xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute><xsl:choose>
			<xsl:when test="../@history">
				<A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">showHist('<xsl:value-of select="."/>.','<xsl:value-of select="../../@css"/>'); return false;</xsl:attribute><xsl:value-of select="../../PART_DESCRIPTION/@history"/></A>
			</xsl:when>
			<xsl:otherwise> <!-- needed for PAS -->
				<A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">showHist('<xsl:value-of select="."/>.','product.css'); return false;</xsl:attribute><xsl:value-of select="../../ARTICLE_DESCRIPTION/@history"/></A>
			</xsl:otherwise>
		</xsl:choose></TD>
	</xsl:template>

	<xsl:template match="//VALUE[@type='PARTNAME']">
		<xsl:param name="pos" />
		<TD><xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute><xsl:choose>
			<xsl:when test="../@assemblylink">
				<A href="javascript:doNothing()" onmouseover="window.status=''; return true"><xsl:attribute name="onclick">goToAssembly('<xsl:value-of select="$pos" />'); return false;</xsl:attribute><xsl:value-of select="."/></A>
			</xsl:when>
			<xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
		</xsl:choose></TD>
	</xsl:template>

	<!-- result view and detail view in PAS -->
	<xsl:template match="//VALUE[(@type='ARTICLENAME' or @type='PARTNAME') and ../@productgroupfilename]">
		<TD><xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute>
		<A><xsl:attribute name="href"><xsl:value-of select="../@productgroupfilename" />?highlight=<xsl:value-of select="."/></xsl:attribute>
		<xsl:if test=".=''">&nbsp;</xsl:if>
		<xsl:apply-templates/></A></TD>
	</xsl:template>	

	<xsl:template match="//PRICE">
		<xsl:if test="not(../../../@resultview)"><!-- display price values if not in result view of PAS -->
			<TD id="t_price"><xsl:if test="not(@price)">&nbsp;</xsl:if><xsl:value-of select="@price"/></TD>
		</xsl:if>
	</xsl:template>
	
	<!-- ********************************************************************** -->
	<!-- ************** HTML-TAGS DEFINITIONS, old templates removed ********** -->
	<!-- ********************************************************************** -->
	<xsl:template match="DIV|font|FONT|P|B|I|U|STRIKE|SUP|SUB|A|BR|UL|OL|LI|@*">
    <xsl:copy>
       <!-- Put on one line to prevent addition of whitespace -->
       <xsl:apply-templates select="@*|*|text()"/>
    </xsl:copy>
	</xsl:template>
	
	<!-- ********************************************************************** -->
	<!-- ******************** template for text between tags ****************** -->
	<!-- ********************************************************************** -->
	<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
	

	<!-- **************************************************** -->
	<!-- ****************Find and Replace String ***************** -->
	<!-- **************************************************** -->
	<xsl:template name="replace-text"> 
		 <xsl:param name="text"/> 
		 <xsl:param name="replace"/> 
		 <xsl:param name="by"/>
		 <xsl:choose> 
		 <xsl:when test="contains($text, $replace)"> 
				<xsl:value-of select="substring-before($text, $replace)"/> 
				<xsl:value-of select="$by" disable-output-escaping="yes"/> 
				<xsl:call-template name="replace-text"> 
					 <xsl:with-param name="text" select="substring-after($text, $replace)"/> 
					 <xsl:with-param name="replace" select="$replace" /> 
					 <xsl:with-param name="by" select="$by" /> 
				</xsl:call-template> 
		 </xsl:when> 
		 <xsl:otherwise> 
				<xsl:value-of select="$text"/> 
		 </xsl:otherwise> 
		 </xsl:choose> 
	</xsl:template>		
</xsl:stylesheet>