 <!--

var pwCennikDate = '13.07.2009';

// numer (też do odnośników), jednostka miary (opcja), kod strony z opisem , 0, 0
// 	numer pozycji, nazwa, jednostka, cena spec, cena hurt, cena detal, cena katalogowa
var pwCennik =
[
	[1,'Polystyrenes', 'm<SUP>3</SUP>', 21, 0, 0,
		[101,'EPS-50 (FS-12) Styrofoam', 		'm<SUP>3</SUP>', 	     0,    77,     80,   77],
		[107,'TERMO-ŚCIANA Styrofoam', 			'm<SUP>3</SUP>', 	     0,    79,     82,   79],
		[102,'EPS-70 (FS-15) Styrofoam', 		'm<SUP>3</SUP>', 	     0,    81,     84,   81],
		[108,'TERMO-PODŁOGA Styrofoam', 		'm<SUP>3</SUP>', 	     0,   109,    112,  109],
		[103,'EPS-100 (FS-20) Styrofoam', 		'm<SUP>3</SUP>', 	     0,   112,    115,  112],
		[104,'EPS-200 (FS-30) Styrofoam', 		'm<SUP>3</SUP>', 	     0,   175,    184,  175],
		[110,'LAMBDA 0,032 (graphite colour) Styrofoam', 	'm<SUP>3</SUP>', 	     0,   146,    150,  148],
                [111,'LAMBDA 0,031 (graphite colour) Styrofoam', 	'm<SUP>3</SUP>', 	     0,   157,    161,  159],
		[120,'noise and vibrations reducing Styrofoam',      'm<SUP>3</SUP>',	     0,    89,     96,    0],
		[121,'water proof Styrofoam',  		'm<SUP>3</SUP>',	     0,   215,    219,    0],
		[122,'layered board (Styrofoam with felt)',	'm<SUP>3</SUP>',	     0,   210,    214,    0],
		[130,'extruded polystyrene XPS  20',		'm<SUP>2</SUP>', 	     0,    8.20,  9.21, 0],
		[131,'extruded polystyrene XPS  30',		'm<SUP>2</SUP>', 	     0,    8.80,  9.40, 0],
		[132,'extruded polystyrene XPS  40',		'm<SUP>2</SUP>', 	     0,    12.48,  13.48, 0],
		[133,'extruded polystyrene XPS  50',		'm<SUP>2</SUP>', 	     0,    15.00,  16.99, 0],
		[134,'extruded polystyrene XPS  80',		'm<SUP>2</SUP>', 	     0,    24.00,  26.20, 0],
		[135,'extruded polystyrene XPS 100',		'm<SUP>2</SUP>', 	     0,    30.00,  32.98, 0],
		[136,'extruded polystyrene XPS 120',		'm<SUP>2</SUP>', 	     0,    36.20,  39.40, 0]
		
	],
	[2,'Thermal isolation glues', 'kg', 0, 0, 0,
		
		[205,'Styrofoam glue JANTOŃ 4J',			'25 kg',	11.52,	13.21,	14.63,	18.00],
		[206,'Universal glue (for Styrofoam and nets) JANTOŃ 4J',		'25 kg',	15.55,	16.02,	17.82,	24.30],		
		[201,'Styrofoam glue BOLIX Z',				'25 kg',	13.52,	14.21,	15.63,	23.25],
		[202,'Universal glue (for Styrofoam and nets) BOLIX U',		'25 kg',	17.55,	18.02,	19.82,	29.50],
		[203,'Mineral wool glue BOLIX ZW',			'25 kg',	20.79,	21.83,	24.01,	29.50],
		[204,'Universal glue (for the wool and nets) BOLIX WM',			'25 kg',	25.99,	27.29,	30.02,	35.75],
		[210,'Styrofoam glue BAUMIT',				'25 kg',	21.00,	21.94,	22.93,	36.25],
		[211,'Universal glue (for Styrofoam and nets) BAUMIT',		'25 kg',	29.00,	31.00,	32.50,	55.00],
		[213,'Universal glue (for Styrofoam and nets) BAUMIT DUO CONTACT',	'25 kg',	18.20,	19.50,	20.90,	37.50],
		[212,'Universal glue (for the wool and nets) BAUMIT',			'25 kg',	27.65,	29.03,	31.94,	39.50],
		[220,'Styrofoam glue DRYVIT DRYHESIVE PLUS',		'25 kg',	28.08,	29.48,	32.43,	46.00],
		[221,'Universal glue (for Styrofoam and nets) DRYVIT DRYCOAT',	'25 kg',	31.25,	32.81,	36.09,	48.00],
		[222,'Mineral wool glue DRYVIT ROXHESIVE',		'25 kg',	40.36,	42.38,	46.62,	62.00],
		[223,'Universal glue (for the wool and nets) DRYVIT ROXCOAT',		'25 kg',	41.66,	43.74,	48.12,	64.00],
		[230,'Styrofoam glue ARSANIT',				'25 kg',	14.49,	15.64,	16.90,	20.50],
		[231,'Universal glue (for Styrofoam and nets) ARSANIT zbrojony',	'25 kg',	17.08,	18.49,	19.04,	24.80],
		[250,'Styrofoam glue SKAŁA KSZ',			'25 kg',	12.65,	13.28,	14.61,	21.80],
		[251,'Universal glue (for Styrofoam and nets) SKAŁA KS-03',		'25 kg',        17.05,	17.90,	19.69,	32.90],
		[252,'Universal glue (for Styrofoam and nets) SKAŁA KS-03 biały',	'25 kg',        24.55,	25.20,	26.69,	37.00],
		[240,'Styrofoam glue PLATINUM Termo Organika',		'25 kg',	11.99,	12.99,	13.99,	19.49],
		[241,'Universal glue PLATINUM Termo Organika',			'25 kg',        15.49,	16.49,	17.49,	24.80],
		[260,'Styrofoam glue STO-ISPO',			'25 kg',	34.00,	35.70,	39.27,	42.50],
		[261,'Universal glue (for Styrofoam and nets) STO-ISPO zbrojony',		'25 kg',	62.00,	65.10,	71.61,	80.00],	
		[262,'Mineral wool glue STO-ISPO',			'25 kg',        34.00,	35.70,	39.27,	42.50],
		[263,'Universal glue (for the wool and nets) STO-ISPO zbrojony',			'25 kg',	62.00,	65.10,	71.61,	80.00],	
		[270,'Styrofoam glue WEBER KS 112',			'25 kg',	14.29,	15.61,	16.79, 	23.50],
		[271,'Universal glue (for Styrofoam and nets) WEBER KS 122',		'25 kg',       	20.49,	21.59,	22.99, 	33.75],
		[272,'Mineral wool glue WEBER KS 131',		'25 kg',        20.21,	22.22,	24.34, 	28.50],
		[273,'Universal glue (for the wool and nets) WEBER KS 141',		'25 kg',        27.03,	29.38,	32.22, 	37.25]
	],
	[3,'Glues for ceramics and stones', 'kg', 0, 0, 0,
	
		[301,'glues for interior ceramics SKAŁA',		'25 kg',	 9.90,	10.40,	11.40,	0],
		[302,'universal glue for ceramics SKAŁA',		'25 kg',	11.33,	11.90,	13.09,	0],
		[303,'elastic glue for ceramics SKAŁA',		'25 kg',	25.30,	26.57,	29.22,	0],
		[304,'klej do płytek klinkierowych i gresu SKAŁA',		'25 kg',	26.95,	28.30,	31.13,	0],	
		[310,'universal glue for ceramics BOLIX',		'25 kg',	16.27,	17.08,	18.79,	0],
		[311,'elastic glue for ceramics BOLIX',		'25 kg',	35.68,	37.46,	41.21,	0],
		[312,'universal glue for ceramics DRYVIT',		'25 kg',	17.36,	18.23,	20.05,	0],
		[313,'elastic glue for ceramics DRYVIT',		'25 kg',	34.72,	36.46,	40.10,	0],
		[314,'glues for interior ceramics KTB',		'25 kg',	8.25,	8.66,	 9.53,	0],
		[315,'universal glue for ceramics KTB',		'25 kg',	12.13,	12.74,	14.01,	0],
		[316,'elastic glue for ceramics KTB',		'25 kg',	17.32,	18.19,	20.00,	0],
		[317,'klej do płytek klinkierowych i gresu KTB',		'25 kg',	19.06,	20.01,	22.01,	0],
		[320,'klej do bloczków z betonu komórkowego',			'25 kg',	14.30,	15.02,	16.52,	0]
	],
	[4,'Styrofoam joints','pieces',25,0,0,
	
		[401,'Styrofoam joints /plastic tangs/ 10x90 mm',				'pieces',		0.12,	0.13,	0.15,	0.15],
		[402,'Styrofoam joints /plastic tangs/ 10x120 mm',				'pieces',		0.13,	0.14,	0.16,	0.16],
		[403,'Styrofoam joints /plastic tangs/ 10x140 mm',				'pieces',		0.14,	0.15,	0.17,	0.17],
		[404,'Styrofoam joints /plastic tangs/ 10x160 mm',				'pieces',		0.16,	0.17,	0.19,	0.19],
		[405,'Styrofoam joints /plastic tangs/ 10x180 mm',				'pieces',		0.18,	0.19,	0.21,	0.21],
		[406,'Styrofoam joints /plastic tangs/ 10x200 mm',				'pieces',		0.20,	0.21,	0.23,	0.23],
		[410,'Styrofoam joints /plastic tangs/ 10x220 mm (długa strefa rozporu)',    'pieces',	0.35,	0.38,	0.41,  0.39],
		[411,'Styrofoam joints /plastic tangs/ 10x260 mm (długa strefa rozporu)',    'pieces',	0.38,	0.41,	0.44,  0.42],
		[412,'Styrofoam joints /plastic tangs/ 10x300 mm (długa strefa rozporu)',    'pieces',	0.42,	0.45,	0.48,  0.47],
		[420,'Styrofoam joints /plastic tangs/ 10x120 mm',				'pieces',		0.32,	0.35,	0.38,	0.38],
		[421,'Styrofoam joints /plastic tangs/ 10x140 mm',				'pieces',		0.33,	0.36,	0.39,	0.38],
		[422,'Styrofoam joints /plastic tangs/ 10x160 mm',				'pieces',		0.34,	0.37,	0.40,	0.38],
		[423,'Styrofoam joints /plastic tangs/ 10x180 mm',				'pieces',		0.35,	0.38,	0.42,	0.38],
		[424,'Styrofoam joints /plastic tangs/ 10x200 mm',				'pieces',		0.42,	0.45,	0.48,	0.45],
		[425,'Styrofoam joints /plastic tangs/ 10x200 mm (długa strefa rozp.)',  'pieces',		0.51,	0.55,	0.59,   0.54],
		[426,'Styrofoam joints /plastic tangs/ 10x220 mm (długa strefa rozp.)',  'pieces',		0.53,	0.57,	0.61,   0.56]
		
	],
	[5,'Decorative range', 'pieces', 0,0,0,
	
		[500,'Aluminium corner, without net 2,5 m',		'pieces',	 	 1.15, 	 1.20,	 1.40,	0],
		[501,'Aluminium corner, without net 3,0 m',		'pieces',	 	 1.39,	 1.44,	 1.64,	0],
		[502,'Aluminium corner, with net 2,5 m',		'pieces',	 	 2.05,	 2.10,	 2.30,	0],
		[503,'Aluminium corner, with net 3,0 m',		'pieces',	 	 2.47,	 2.52,	 2.72,	0],
		[504,'PCV corner for arches, with net 2,0 m',	'pieces',		11.70,	12.29,	13.51,	0],
		[505,'"drip channel" cornice profile 2,5 m',		'pieces',		11.45,	11.50,	13.50,	0],
		[506,'"drip channel" closed cornice profile 2,0 m',		'pieces',		 8.45,	 8.50,	10.50,	0],
		[507,'settlement joint corner profile 2,0 m',	'pieces',		28.00,	34.00,	50.00,	0],
		[508,'straight settlement joint profile 2,0 m',		'pieces',		26.00,	32.00,	48.00,	0],
		[510,'start profile 50 mm/2,5 m',		'pieces',	 	 6.20,	 6.42,	 8.42,	0],
		[511,'start profile 60 mm/2,5 m',		'pieces',	 	 7.50,	 7.76,	 8.76,	0],
		[512,'start profile 80 mm/2,5 m',		'pieces',	 	 9.00,	 9.20,	11.00,	0],
		[513,'start profile 100 mm/2,5 m',		'pieces',		10.00,	10.32,	12.32,	0],
		[514,'start profile 120 mm/2,5 m',		'pieces',		11.50,	11.99,	13.99,	0],
		[515,'start profile 150 mm/2,5 m',		'pieces',		16.00,	16.13,	18.13,	0]

	],
	[6,'Mineral (rock) wool ROCKWOOL' , '', 23,0,0,

		[601,'DOMROCK (&#955;-0.045) mat 100 mm',	'm<SUP>2</SUP>',	0,	 9.40,	  10.34,     0],
		[602,'DOMROCK (&#955;-0.045) mat 140 mm',	'm<SUP>2</SUP>',	0,      13.53,    14.88,     0],
		[603,'DOMROCK (&#955;-0.045) mat 150 mm',	'm<SUP>2</SUP>',	0,	13.94,	  15.33,     0],
		[604,'DOMROCK (&#955;-0.045) mat 160 mm',	'm<SUP>2</SUP>',	0,	16.22,	  17.84,     0],
		[605,'DOMROCK (&#955;-0.045) mat 180 mm',	'm<SUP>2</SUP>',	0,	17.80,	  19.58,     0],
		[606,'DOMROCK (&#955;-0.045) mat 200 mm',	'm<SUP>2</SUP>',	0,	18.48,	  20.33,     0],
		[611,'MEGAROCK (&#955;-0.039) mat 100 mm',	'm<SUP>2</SUP>',	0,	10.08,	  11.09,     0],
		[612,'MEGAROCK (&#955;-0.039) mat 120 mm',	'm<SUP>2</SUP>',	0,	13.22,	  14.54,     0],
		[613,'MEGAROCK (&#955;-0.039) mat 150 mm',	'm<SUP>2</SUP>',	0,	15.05,	  16.56,     0],
		[614,'MEGAROCK (&#955;-0.039) mat 160 mm',	'm<SUP>2</SUP>',	0,	17.45,	  19.20,     0],
		[615,'MEGAROCK (&#955;-0.039) mat 180 mm',	'm<SUP>2</SUP>',	0,	17.96,	  19.76,     0],
		[616,'MEGAROCK (&#955;-0.039) mat 200 mm',	'm<SUP>2</SUP>',	0,	19.85,	  21.84,     0],
		[621,'TOPROCK (&#955;-0.035) mat 100 mm',	'm<SUP>2</SUP>',	0,	11.36,	  12.50,     0],
		[622,'TOPROCK (&#955;-0.035) mat 120 mm',	'm<SUP>2</SUP>',	0,	15.08,	  16.59,     0],
		[623,'TOPROCK (&#955;-0.035) mat 150 mm',	'm<SUP>2</SUP>',	0,	16.96,	  18.65,     0],
		[624,'TOPROCK (&#955;-0.035) mat 160 mm',	'm<SUP>2</SUP>',	0,	19.87,	  21.86,     0],
		[625,'TOPROCK (&#955;-0.035) mat 180 mm',	'm<SUP>2</SUP>',	0,	22.27,	  24.50,     0],
		[626,'TOPROCK (&#955;-0.035) mat 200 mm',	'm<SUP>2</SUP>',	0,	22.49,	  24.74,     0],
		[631,'ROCKMIN (&#955;-0.039) panel  50 mm',	'm<SUP>2</SUP>',	0,	 5.09,	   5.60,     0],
		[632,'ROCKMIN (&#955;-0.039) panel  80 mm',	'm<SUP>2</SUP>',	0,	 8.90,	   9.79,     0],
		[633,'ROCKMIN (&#955;-0.039) panel 100 mm',	'm<SUP>2</SUP>',	0,	10.08,	  11.09,     0],
		[634,'ROCKMIN (&#955;-0.039) panel 120 mm',	'm<SUP>2</SUP>',	0,	13.22,	  14.54,     0],
		[635,'ROCKMIN (&#955;-0.039) panel 150 mm',	'm<SUP>2</SUP>',	0,	15.05,	  16.56,     0],
		[636,'ROCKMIN (&#955;-0.039) panel 160 mm',	'm<SUP>2</SUP>',	0,	17.45,	  19.20,     0],
		[637,'ROCKMIN (&#955;-0.039) panel 180 mm',	'm<SUP>2</SUP>',	0,	17.96,	  19.76,     0],
		[638,'ROCKMIN (&#955;-0.039) panel 200 mm',	'm<SUP>2</SUP>',	0,	19.85,	  21.84,     0],
		[641,'SUPERROCK (&#955;-0.035) panel 50 mm',	'm<SUP>2</SUP>',	0,	 5.73,	   6.30,     0],
		[642,'SUPERROCK (&#955;-0.035) panel 80 mm',	'm<SUP>2</SUP>',	0,	10.01,	  11.01,     0],
		[643,'SUPERROCK (&#955;-0.035) panel 100 mm',	'm<SUP>2</SUP>',	0,	11.36,	  12.50,     0],
		[644,'SUPERROCK (&#955;-0.035) panel 120 mm',	'm<SUP>2</SUP>',	0,	15.07,	  16.58,     0],
		[645,'SUPERROCK (&#955;-0.035) panel 150 mm',	'm<SUP>2</SUP>',	0,	16.96,	  18.66,     0],
		[646,'SUPERROCK (&#955;-0.035) panel 160 mm',	'm<SUP>2</SUP>',	0,	19.87,	  21.86,     0],
		[647,'SUPERROCK (&#955;-0.035) panel 180 mm',	'm<SUP>2</SUP>',	0,	22.27,	  24.50,     0],
		[648,'SUPERROCK (&#955;-0.035) panel 200 mm',	'm<SUP>2</SUP>',	0,	22.49,	  24.74,     0],
		[650,'ROCKTON (&#955;-0.036) panel  50 mm',	'm<SUP>2</SUP>',	0,	 5.09,	   5.60,     0],
		[651,'ROCKTON (&#955;-0.036) panel  80 mm',	'm<SUP>2</SUP>',	0,	 8.90,	   9.79,     0],
		[652,'ROCKTON (&#955;-0.036) panel 100 mm',	'm<SUP>2</SUP>',	0,	10.08,	  11.09,     0],
		[653,'ROCKTON (&#955;-0.036) panel 120 mm',	'm<SUP>2</SUP>',	0,	13.22,	  14.54,     0],
		[654,'ROCKTON (&#955;-0.036) panel 150 mm',	'm<SUP>2</SUP>',	0,	15.05,	  16.56,     0],
		[655,'ROCKTON (&#955;-0.036) panel 160 mm',	'm<SUP>2</SUP>',	0,	17.45,	  19.20,     0],
		[656,'ROCKTON (&#955;-0.036) panel 180 mm',	'm<SUP>2</SUP>',	0,	17.96,	  19.76,     0],
		[657,'ROCKTON (&#955;-0.036) panel 200 mm',	'm<SUP>2</SUP>',	0,	19.85,	  21.84,     0],
		[681,'lamellae hard facade',			'm<SUP>3</SUP>',	0,     228,    247, 	0],
		[682,'lamellae hard facade in a panel',			'm<SUP>3</SUP>',	0,     300,    325,	0]
	
	],
	[7,'Mineral (glass) wool KNAUF', '', 23,0,0,	
		
		[701,'CLASIC 040 (&#955;-0.040) mat  50 mm',	'm<SUP>2</SUP>',	0,	 4.06,	   4.26,    0],
		[702,'CLASIC 040 (&#955;-0.040) mat  60 mm',	'm<SUP>2</SUP>',	0,	 5.09,	   5.34,    0],
		[703,'CLASIC 040 (&#955;-0.040) mat  80 mm',	'm<SUP>2</SUP>',	0,	 6.62,	   6.95,    0],
		[704,'CLASIC 040 (&#955;-0.040) mat 100 mm',	'm<SUP>2</SUP>',	0,	 7.94,	   8.34,    0],
		[705,'CLASIC 040 (&#955;-0.040) mat 120 mm',	'm<SUP>2</SUP>',	0,	 9.98,	  10.48,    0],
		[706,'CLASIC 040 (&#955;-0.040) mat 140 mm',	'm<SUP>2</SUP>',	0,	11.64,	  12.22,    0],
		[707,'CLASIC 040 (&#955;-0.040) mat 150 mm',	'm<SUP>2</SUP>',	0,	11.79,	  12.38,    0],
		[708,'CLASIC 040 (&#955;-0.040) mat 160 mm',	'm<SUP>2</SUP>',	0,	13.11,	  13.77,    0],
		[709,'CLASIC 040 (&#955;-0.040) mat 180 mm',	'm<SUP>2</SUP>',	0,	14.95,	  15.70,    0],
 		[710,'CLASIC 040 (&#955;-0.040) mat 200 mm',	'm<SUP>2</SUP>',	0,	15.54,	  16.31,    0]

	],	

	[8, 'Plaster facings and primer materials', 'kg', 0,0,0,
				
		[801,'BAUMIT mineral plaster of different textures 1/2/3 mm',	                    	'kg',	1.41,  	1.48,	1.55,   2.45],
		[802,'BOLIX mineral plaster of different textures 1,5/2/3 mm',                     	'kg',	1.28,	1.41,	1.55,   1.77],
		[803,'DRYVIT mineral plaster of different textures 1,5/2 mm',                      	'kg',	1.42,	1.56,	1.72,   2.28],
		[804,'KTB mineral plaster of different textures 2 mm',		                    	'kg',	0.89,	0.99,	1.15,   1.43],
		[806,'SKAŁA mineral plaster of different textures 2/3 mm',	                    	'kg',	1.15,	1.20,	1.26,   1.44],
		[807,'STO-ISPO mineral plaster of different textures 2/3/ 4 mm',                   	'kg',	2.98,	3.14,	3.30,   3.90],
		[808,'WEBER mineral plaster of different textures 1/1,5/2/3 mm',                   	'kg',	1.72,	1.81,	1.91,   2.16],
		[809,'ARSANIT mineral plaster of different textures 1,5/2 mm',                   	'kg',	0.99,	1.12,	1.28,   1.59],
		[810,'BAUMIT acrylic plaster of different textures 1/1,5/2/3 mm',	            	'kg',	4.08,	4.29,	4.51,   7.30],
		[805,'TORAED acrylic plaster of different textures 1/1,5/2 / 2,5 mm',      		'kg',	3.20,	3.30,	3.47,   4.40],
		[829,'PROMA acrylic plaster of different textures 1/1,5/2 / 2,5 mm',	            	'kg',	3.44,	3.63,	3.82,   5.70],
		[811,'BOLIX acrylic plaster of different textures 1/1,5/2 / 2,5 mm',	            	'kg',	3.62,	3.87,	4.26,   4.89],
		[812,'DRYVIT acrylic plaster of different textures 1,6/1,8 mm',  	            	'kg',	5.72,	6.29,	6.92,   9.61],
		[813,'KTB acrylic plaster of different textures 2 mm',			            	'kg',	3.47,	3.82,	4.20,   5.28],
		[815,'SKAŁA acrylic plaster of different textures 1,5/2/2,5 mm',	            		'kg',	3.42,	3.60,	3.78,   4.60],
		[816,'STO-ISPO acrylic plaster of different textures 2/3 mm',		            	'kg',	5.51,	5.80,	6.09,   7.20],
		[817,'WEBER acrylic plaster of different textures 1/1,5/2/3 mm',	            		'kg',	3.50,	3.80,	4.30,   5.30],
		[818,'WEBER acrylic-silicon plaster of different textures 1,5/2 mm',   		'kg',	4.99,	5.27,	5.54,   6.28],
		[819,'ARSANIT acrylic plaster of different textures 1/1,5/2/2,5 mm',	            	'kg',	3.40,	3.65,	3.97,   4.50],
		[820,'BAUMIT silica plaster of different textures 1/1,5/2 mm',      			'kg',	4.71,	5.18,	5.70,	6.73],
		[830,'TOARED silica plaster of different textures 1,5/2 mm',				'kg',	3.52,	3.71,	3.90,   4.95],
		[814,'PROMA silica plaster of different textures 1,5/2 mm',	       			'kg',	3.99,	4.06,	4.27,   6.05],
		[821,'BOLIX silica plaster of different textures 1/2/2,5 mm',	       			'kg',	4.58,	4.88,	4.99,   5.67],
		[822,'DRYVIT silica plaster of different textures 1,6/1,8 mm',	       		'kg',	5.60,	5.96,	6.17,   7.44],
		[823,'SKAŁA silica plaster of different textures 1,5/2 mm',	       			'kg',	3.65,	3.80,	4.00,   4.70],
		[824,'STO-ISPO silica plaster of different textures 2/3/4 mm',	       		'kg',	6.12,	6.44,	6.76,	8.00],
		[825,'WEBER silica plaster of different textures 1/1,5/2 mm',     			'kg',   5.26,	5.54,	5.81,   6.59],
		[826,'BAUMIT silica plaster of different textures 1,5/2/3 mm',		       	'kg',	5.49,	5.80,	6.20,   8.90],
		
		[827,'STO-ISPO silicon plaster of different textures 1,5/2/3 mm',		       	'kg',	7.56,	7.97,	8.37,	9.90],
		[828,'WEBER silicon plaster of different textures 1/1,5/2 mm',		       	'kg',	6.50,	6.85,	7.19,   8.51],

		[850,'popular primer material SKAŁA',		'kg',	 4.21,      4.46,     4.68,       4.90],
		[851,'deep penetrating primer material SKAŁA',	'kg',	 3.09,	    3.19,     3.34,	  3.50],
		[852,'Primer under plaster SKAŁA POB',	'kg',	 3.99,      4.28,     4.49,	  4.70],
		[861,'Primer under plaster TORAED EUROPUTZ',	'kg',	 3.88,	    4.04,     4.24,	  5.39],
		[860,'Primer under plaster PROMA',		'kg',	 4.45,	    4.95,     5.20,	  7.20],
		[853,'Primer under plaster BOLIX OP',		'kg',	 4.35,	    4.56,     4.81,	  5.62],
		[854,'Primer under plaster WEBER PG 221', 'kg',	 8.79,	    9.21,     9.68,      10.97],
		[855,'Primer under plaster BAUMIT',		'kg',	 5.99,	    6.07,     6.38,       9.20],
		[856,'Primer under plaster STO-ISPO',		'kg',	 8.92,	    9.20,     9.65,      11.40],
		[857,'Primer under plaster DRYVIT',		'kg',	12.40,     13.02,    14.32,      20.41],
		
		[858,'Primer under plaster KTB',		'kg',	 3.60,	    3.99,     4.21,       5.50],
		[859,'Primer under plaster ARSANIT',		'kg',	 4.00,	    4.29,     4.81,       5.50]
	],

	[9,'Other thermal isolation materials', '', 29,0,0,
		
		[901,'net 145 g/m2 POLKONI',		'm<SUP>2</SUP>',	        1.04,	1.14,	1.29,  1.29],
		[902,'net 145 g/m2 PABIANICE',		'm<SUP>2</SUP>',		1.49,	1.56,	1.72,  1.72],
		[903,'net 145 g/m2 WEBER',		'm<SUP>2</SUP>',		1.88,	1.98,	2.29,  3.08],
		[904,'net 145 g/m2 DRYVIT',			'm<SUP>2</SUP>',		2.00, 	2.30,	2.50,  3.34],

		[1710,'polyurethane gun foam 750 ml',          'pieces',               12.25,	12.89,	13.99,	0],
		[1711,'Styrofoam and rubbish bags 240 L',               'pieces',	        0.94,	0.99,	1.09,	0],
		[1712,'Styrofoam and rubbish bags 150 L',               'pieces',	        0.62,	0.65,	0.75,	0],
		[1713,'Styrofoam and rubbish bags 120 L',               'pieces',	        0.20,	0.22,	0.32,	0],
		[1714,'vapour barrier film 0,15 mm',		'm<SUP>2</SUP>',		0.55,	0.60,	0.71,	0],
		[1715,'vapour barrier film 0,20 mm',		'm<SUP>2</SUP>',		0.62,	0.70,	0.82,	0],
		[1716,'painter’s film 4x5 m thickness 0,03 mm',		 'pieces',	        2.10,	2.31,	2.54,	0],
		[1717,'protective fabric stretch 4x5 m thickness 0,06 mm',		 'pieces',	        4.30,	4.73,	5.20,	0]


	],

	[10, 'Dry plaster system', '', 24,0,0,
		
		[1500,'normal dry plaster board 12,5 mm x 260 cm',	'pieces',	      0,    16.29,    18.91,    0],
		[1501,'water proof dry plaster board 12,5 mm x 260 cm',	'pieces',	      0,    25.46,    27.71,    0],
		[1502,'fire proof dry plaster board 12,5 mm x 260 cm','pieces',	      0,    20.96,    22.71,    0],
		[1510,'profile CW 50 (2,6;3,0 lub 4,0 mb)',	'mb',	      0,     2.68,     2.98,    0],
		[1511,'profile CW 75 (2,6;3,0 lub 4,0 mb)',	'mb',	      0,     3.11,     4.31,    0],
		[1512,'profile CW 100 (2,6;3,0 lub 4,0 mb)',	'mb',	      0,     3.25,     3.55,    0],
		[1513,'profile UW 50 (2,6;3,0 lub 4,0 mb)',	'mb',	      0,     1.98,     2.28,    0],
		[1514,'profile UW 75 (2,6;3,0 lub 4,0 mb)',	'mb',	      0,     2.47,     2.77,    0],
		[1515,'profile UW 100 (2,6;3,0 lub 4,0 mb)',	'mb',	      0,     2.87,     3.17,    0],
		[1516,'profile CD 60 (3,0 lub 4,0 mb)',		'mb',	      0,     1.73,     2.03,    0],
		[1517,'profile UD 30 (3,0 lub 4,0 mb)',		'mb',	      0,     1.11,     1.41,    0],
		[1520,'rotary hanger with spring',			'pieces',	0.62,	0.66,	0.76,	0],
		[1521,'hanger ES 60/75',				'pieces',	0.23,	0.27,	0.37,	0],
		[1522,'hanger eS 60/125',				'pieces',	0.32,	0.36,	0.46,	0],
		[1523,'longitudinal joint',				'pieces',	0.32,	0.36,	0.46,	0],
		[1524,'cross joint',				'pieces',	0.34,	0.38,	0.48,	0],
		[1525,'two hook hanger',				'pieces',	0.38,	0.42,	0.52,	0],
		[1526,'spring hanger THERMATEX',			'pieces',	0.38,	0.42,	0.52,	0],
		[1527,'fixing rod 125',				'pieces',	0.08,	0.11,	0.29,	0],
		[1528,'fixing rod 250',				'pieces',	0.17,	0.20,	0.30,	0],
		[1529,'fixing rod 500',				'pieces',	0.45,	0.50,	0.60,	0],
		[1530,'fixing rod 750',				'pieces',	0.60,	0.65,	0.75,	0],
		[1531,'fixing rod 1000',				'pieces',	0.89,	0.94,	1.04,	0],
		[1532,'fixing rod 1250',				'pieces',	0.96,	1.02,	1.12,	0],
		[1533,'fixing rod 1500',				'pieces',	1.09,	1.15,	1.25,	0]
	
	],
	
	[11, 'Thermoplastic roof felts SWISSPOR (Międzyrzecz) czarna mamba', '', 28,0,0,

		[1800,'Oxidized inner roof felt V60 S30',			'm<SUP>2</SUP>',	 5.99,	6.49,	   6.99,	0],
		[1801,'Oxidized inner roof felt V60 S35',			'm<SUP>2</SUP>',	 6.29,	6.79,	   6.99,	0],
		[1802,'Oxidized surface roof felt V60 S37H',		'm<SUP>2</SUP>',	 6.79,	6.99,	   7.49,	0],
		[1803,'Oxidized surface roof felt V60 S42H',		'm<SUP>2</SUP>',	 7.29,	7.49,	   7.99,	0],
		[1804,'Oxidized surface roof felt PY PV200 S52H',		'm<SUP>2</SUP>',	 11.99,	12.49,	  12.99,	0],		[1808,'Papa modyfikowana SBS podkładowa PYE PV200 S44',	        'm<SUP>2</SUP>',        12.59,	12.99,	  13.49,	0],
		[1809,'Modified oxidized inner SBS roof felt PYE PV160 S37',		'm<SUP>2</SUP>',        11.49,	11.99,	  12.99,	0],
		[1809,'Modified oxidized inner SBS roof felt PYE PV200 S44',    	'm<SUP>2</SUP>',        12.49,	12.99,	  13.99,	0],
		[1809,'Modified SBS surface felt PYE PV160 S42H',    'm<SUP>2</SUP>',        12.49,	12.99,	  13.99,	0],
		[1810,'Modified SBS surface felt PYE PV200 S50H',    'm<SUP>2</SUP>',        13.49,	13.99,	  14.99,	0],
		[1811,'Modified SBS surface felt PYE PV250 S52H',    'm<SUP>2</SUP>',        14.49,	14.99,	  15.99,	0]

	],
	[12, 'Polyurethane panels (EcoTherm)', '', 19, 0, 0,

                [1900,'Vapotherm XR (30mm)','m<SUP>2</SUP>', 	0,	30.50,	32.10,	0],
                [1901,'Vapotherm XR (40mm)','m<SUP>2</SUP>', 	0,	34.83,	36.66,	0],
                [1902,'Vapotherm XR (50mm)','m<SUP>2</SUP>', 	0,	38.48,	40.51,	0],
                [1903,'Vapotherm XR (60mm)','m<SUP>2</SUP>', 	0,	43.94,	45.25,	0],
                [1904,'Vapotherm XR (70mm)','m<SUP>2</SUP>', 	0,	50.38,	53.03,	0],
                [1905,'Vapotherm XR (80mm)','m<SUP>2</SUP>', 	0,	54.37,	57.23,	0],
                [1906,'Vapotherm XR (90mm)','m<SUP>2</SUP>', 	0,	60.74,	63.94,	0],
                [1907,'Vapotherm XR (100mm)','m<SUP>2</SUP>', 	0,	64.71,	69.12,	0],
                [1908,'Vapotherm XR (110mm)','m<SUP>2</SUP>', 	0,	69.58,	73.24,	0],
                [1909,'Vapotherm XR (120mm)','m<SUP>2</SUP>', 	0,	77.99,	82.09,	0],
                [1910,'Vapotherm XR (140mm)','m<SUP>2</SUP>', 	0,	92.43,	97.29,	0],
	        [1920,'Selthaan ALU 3 (20mm)','m<SUP>2</SUP>', 	0,	40.73,	42.87,	0],
	        [1921,'Selthaan ALU 3 (25mm)','m<SUP>2</SUP>', 	0,	43.78,	46.08,	0],
	        [1922,'Selthaan ALU 3 (30mm)','m<SUP>2</SUP>', 	0,	46.53,	48.98,	0],
	        [1922,'Selthaan ALU 3 (40mm)','m<SUP>2</SUP>', 	0,	52.74,	55.52,	0],
	        [1923,'Selthaan ALU 3 (50mm)','m<SUP>2</SUP>', 	0,	58.91,	62.01,	0],
	        [1924,'Selthaan ALU 3 (60mm)','m<SUP>2</SUP>', 	0,	66.09,	69.56,	0],
	        [1925,'Selthaan ALU 3 (70mm)','m<SUP>2</SUP>', 	0,	74.76,	78.70,	0],
	        [1926,'Selthaan ALU 3 (80mm)','m<SUP>2</SUP>', 	0,	85.28,	89.77,	0],
	        [1927,'Selthaan ALU 3 (90mm)','m<SUP>2</SUP>', 	0,	99.85,	105.10,	0],
	        [1928,'Selthaan ALU 3 (100mm)','m<SUP>2</SUP>', 0,	108.32,	114.02,	0],
	        [1929,'Selthaan ALU 3 (120mm)','m<SUP>2</SUP>', 0,	135.88, 143.03,	0],
		[1930,'Selthaan ALU 3 (120mm)','m<SUP>2</SUP>', 0,	142.30, 149.79,	0]

 	],
	[13, 'Narzędzia (KUBALA)', '', 19, 0, 0,
	
              [2000,'Uchwyt szlifierski z guma',        'm<SUP>2</SUP>', 	 0,    8.08,	8.50,   0],
	      [2001,'Siatka ścierna 120 mm',            'm<SUP>2</SUP>',	 0,    0.50,	0.53,	0],
              [2002,'Tarnik do styropianum 13x27',      'm<SUP>2</SUP>',         0,   11.88,   12.50,	0],
              [2003,'Paca plastikowa 13x28',            'm<SUP>2</SUP>', 	 0,    4.56, 	4.80,   0],
              [2004,'Paca nierdzewna wenecka',          'm<SUP>2</SUP>', 	 0,    6.46,	6.80,	0],
              [2005,'Kielnia sztukatorska 100mm',       'm<SUP>2</SUP>',         0,    7.98,	8.40,	0],
              [2006,'Mieszadło do zapraw 8,5x40',       'm<SUP>2</SUP>',         0,   14.73,   15.50,	0],
              [2007,'Pędzel ławkowczyk 15 cm',          'm<SUP>2</SUP>', 	 0,   11.14,   11.73,	0],
              [2008,'Pistolet do pian',                 'm<SUP>2</SUP>',	 0,   72.00,   80.00,	0],
              [2009,'Wiertło SDS+ 10/200/310 BOSH',     'm<SUP>2</SUP>',         0,   19.32,   21.00,	0]

	],
	[99,'Promocje', '', 0,0,0,
		
		[1401,'Styrofoam TERMO-ŚCIANA (FS-15)', 	'm<SUP>3</SUP>', 	0,  	0,  	0,     75.00],
		[1410,'Styrofoam joints 10x180 mm',	'pieces',	             	0,	0,	0,	0.24],
		[1420,'net 145 g/m2 POLKONI',		'm<SUP>2</SUP>',	0,	0,	0, 	1.09]
	]
	

];

//numer, nazwa, min Rabat%, max Rabat %
var pwFirmy =
[
	[1, 'WEBER',		 10.00,	30.00, 0],
	[2, 'BOLIX',		 10.00,	30.00, 0],
	[3, 'ARSANIT',		 10.00,	30.00, 0],
	[4, 'SKAŁA',		 10.00,	30.00, 0],
	[5, 'DRYVIT',		 10.00,	35.00, 0],
	[6, 'BAUMIT',		 10.00,	40.00, 0],
	[7, 'PAKIET EKONOMICZNY',10.00,	35.00, 0],
	[8, 'STO-ISPO',		 10.00,	30.00, 0],
	[9, 'PROMA',		 10.00,	30.00, 0],
	[10, 'TORAED',		 10.00,	30.00, 0]
	
];

 //pierwszy poziom:
//	kod firmy, nazwa, liczba (flagi)  1 - bez opcji wyboru styropianu
//drugi poziom
//	pozycja z cennika, opis, zużycie, wielkość paczki w cenniku (dzielnik), jednostka (gdy inna niż w cenniku), cena, opcje (bity 1-nie rabatuj pozycji, 2-sytropian (pozycja parametryzowana) )
// jeżeli pozycja z cennika jest 0, to zuzycie podajemy jako string z jednostkami, wielkośc paczki jest ignorowana (==1), cena musi być podana
// jeżeli pozycja == -1 oznacza to sumowanie częściowe

var pwKalkulator =
[
	[1, 'WEBER', 0,
		[270, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',					4.00,  	1, 'pieces', 	0.22, 3],
		[271,	'Plastering paste (for covered net)',				3.50,  25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10,  	1, '', 	0, 1],
		[854,	'Primer (isolating)',						0.20,  	1, '', 	0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,	0, '',	0, 0],
		[808,   'White mineral plaster', 							2.80, 	1, '',	0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',		0,	0, '',	0, 0],
		[817,	'Acrylic coloured plaster',							2.8, 	1, '',	0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',		0,	0, '',	0, 0]
	],
	[2, 'BOLIX', 0,
		[201, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,  	1, 'pieces', 	0.22, 3],
		[202,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[853,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[802, 'White mineral plaster',								2.80, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[811,	'Acrylic coloured plaster',							2.8, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]
	],
	[3, 'ARSANIT', 0,
		[230, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,	1, 'pieces', 	0.22, 3],
		[231,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[859,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[809, 'White mineral plaster',								2.80, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[819, 'Acrylic coloured plaster', 							2.80, 1, '',0 , 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]

	],
	[4, 'SKAŁA', 0,
		[250, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,	1, 'pieces', 	0.22, 3],
		[251,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[850,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[806,  'White mineral plaster', 							2.80, 1, '', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[815,	'Acrylic coloured plaster',							2.8, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]

	],
	[5, 'DRYVIT SYSTEMS', 0,
		[220, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,	1, 'pieces', 	0.22, 3],
		[221,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[857,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[803,  'White mineral plaster', 								2.80, 1, 	'', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,	0,	'',0, 0],
		[812,	'Acrylic coloured plaster',							 	2.8, 	1,  	'',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,	0,	'',0, 0]

	],
	[6, 'BAUMIT', 0,
		[210, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,	1, 'pieces', 	0.22, 3],
		[213,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[855,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[801,  'White mineral plaster', 								2.80, 1, 	'', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,	0,	'',0, 0],
		[810,	'Acrylic coloured plaster',							 	2.8, 	1,  	'',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,	0,	'',0, 0]
	],
	[7, 'PAKIET EKONOMICZNY - MIESZANY', 0,
		[205, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,	1, 'pieces', 	0.22, 3],
		[206,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[858,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[809,  'White mineral plaster', 								2.80, 1, 	'', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,	0,	'',0, 0],
		[815	,	'Acrylic coloured plaster - very bright',							 	2.8, 	1,  	'',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,	0,	'',0, 0]

	],
	[8, 'STO-ISPO', 0,
		[260, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[107, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3, [102,103,104,101,107] ],
		[0,   'Styrofoam joints (standard length)',				4.00,	1, 'pieces', 	0.22, 3],
		[261,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[901,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[856,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[807,  'White mineral plaster', 								2.80, 1, 	'', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,	0,	'',0, 0],
		[816,	'Acrylic coloured plaster',							 	2.8, 	1,  	'',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,	0,	'',0, 0]

	],

	[21, 'WEBER - promocja', 1,
		[270, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[1401,'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3],
		[1410,'Styrofoam joints',							4.00, 1, '', 0, 1],
		[271,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[1420,'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[854,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[808, 'White mineral plaster', 								2.80, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[817,	'Acrylic coloured plaster',								2.8, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]
	],

	[22, 'BOLIX - promocja', 1,
		[201, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[1401,'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3],
		[1410,'Styrofoam joints',							4.00, 1, '', 0, 1],
		[202,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[1420,'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[853,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[802, 'White mineral plaster',								2.80, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[811,	'Acrylic coloured plaster',							2.8, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]
	],
	[23, 'ARSANIT - promocja', 1,
		[230, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[1401,'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3],
		[1410,'Styrofoam joints',							4.00, 1, '', 0, 1],
		[231,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[1420,'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[859,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[809, 'White mineral plaster',								2.80, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[819, 'Acrylic coloured plaster', 							2.80, 1, '',0 , 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]

	],

	[24, 'SKAŁA - promocja', 1,
		[250, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[1401,'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3],
		[1410,'Styrofoam joints',							4.00, 1, '', 0, 1],
		[251,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[1420,'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[850,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[806,  'White mineral plaster', 							2.80, 1, '', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,0,'',0, 0],
		[815,	'Acrylic coloured plaster',							2.8, 1, '',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,0,'',0, 0]
	],

	[28, 'BAUMIT - promocja', 1,
		[213, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[1401, 'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3,],
		[1410,   'Styrofoam joints (standard length)',				4.00,	1, '', 	0, 1],
		[213,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[1420,	'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[855,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[801,  'White mineral plaster', 								2.80, 1, 	'', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,	0,	'',0, 0],
		[810,	'Acrylic coloured plaster',							 	2.8, 	1,  	'',0, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,	0,	'',0, 0]
	],

	[27, 'PAKIET EKONOMICZNY - promocja', 1,
		[205, 'Glue mortar - a mix serving to Styrofoam fixing to the layer underneath', 	4.00, 25, 'kg', 0, 0],
		[1401,'Self extinguishing Styrofoam, thickness of <SPAN id="STYR_GR">100</SPAN> mm',1.00, 10, 'm<SUP>2</SUP>', 0, 3],
		[1410,'Styrofoam joints',							4.00, 1, '', 0, 1],
		[206,	'Plastering paste (for covered net)',				3.50, 25, 'kg', 0, 0],
		[1420,'Fibreglass net with welts',					1.10, 1, '', 0, 1],
		[858,	'Primer (isolating)',						0.20, 1, '', 0, 0],
		[-1,	'Base cost of 1 m<sup>2</sup> of isolation',					0,0,'',0, 0],
		[809,  'White mineral plaster', 								2.80, 1, 	'', 0, 0],
		[-2,	'Cost of 1 m<SUP>2</sup> in the system with mineral (not painted) plaster',	0,	0,	'',0, 0],
		[815,	'Acrylic coloured plaster - very bright',			 		2.8, 	1, '',3.20, 0],
		[-2,	'Cost of 1 m<SUP>2</SUP> in the system with acrylic coloured plaster in mass',	0,	0,	'',0, 0]
	]
	


];




// Global variables
//var PageCommand
//var MenuID

function printCennik() 
{
	window.open("Content26p.html", 'pop', "width=700, toolbar=no,location=no,directories=no, status=yes, menubar=no, scrollbars=yes,resizable=yes");
}

function drawCennik(bForPrint) {

	var i;
	//alert(_formatCurr((80.8 * 100) % 100))
	
	document.write('<TABLE Width=590 Border=1 cellspacing=0 rules="all" frame="all">');
	document.write('<COL width="*"><COL width=40><COL width=50><COL width=50><COL width=50>');

	for (i = 0; i < pwCennik.length; ++i)
	{
		_drawCennikSection(i, bForPrint);
	}
	document.write('</TABLE>');

}

function drawOneCennik(code){
	var i;
	
	document.write('<TABLE Width=560 Border=1 cellspacing=0 rules="all" frame="all">');
	document.write('<COL width="*"><COL width=40><COL width=50><COL width=50><COL width=50>');

	for (i = 0; i < pwCennik.length; ++i)
	{	
		//alert("=" + pwCennik[i][0])
		if (pwCennik[i][0] == code)
			{_drawCennikSection(i,0)}
	}
	document.write('</TABLE>');
}

function _drawCennikSection(section, bForPrint) {

	var itemMain;
	var itemSub;
	var i;

	itemMain= pwCennik[section];	
	if (itemMain.length > 5 && itemMain[0]<90)
	{
		//header
		document.write('<TR><TD id="C' + itemMain[0] + '" class="cennik_head" colspan=3>');
		document.write( itemMain[1]);
		if (itemMain[3]==0 || bForPrint) {
			document.write('</TD><TD class="cennik_link" colspan=2>&nbsp;');
		} else {
			document.write('</TD><TD class="cennik_link" colspan=2><IMG hspace=2 src="data/ikona_menu1.gif"><A target="_top" href="index.html?' +itemMain[3]+'">Offer description</A>');
		}
		document.write('</TD></TR>');
		document.write('<TR><TD class="cennik_colheadL">&nbsp;</TD><TD class="cennik_colhead">j.m.</TD><TD class="cennik_colhead">spec*</TD><TD class="cennik_colhead">hurt*</TD><TD class="cennik_colheadR">detal*</TD>');

		
		//body
		for (i=6; i<itemMain.length; i++)
		{
			itemSub = itemMain[i]
			document.write('<TR><TD class="cennik_txt">')
			document.write(itemSub[1] + '</TD>')	//nazwa
			document.write('<TD class="cennik_mid">' + itemSub[2] + '</TD>')  //jednostka
			for (j=3;j<=5;j++)
			{
				if (itemSub[j] == 0)
					document.write('<TD class="cennik_tel"><IMG src="data/ikona_tel.gif" alt="Cena na telefon. Proszę dzwonić pod 071-7937104 lub 0501-344885"></IMG></TD>');
				else if (itemSub[j] < 0)
					document.write('<TD class="cennik_tel"><IMG src="data/ikona_brak.gif" alt="Towar w chwili obecnej nie jest dostępny"></IMG></TD>');
				else
					document.write('<TD class="cennik_val">' + _formatCurr(itemSub[j]) + '</TD>');
			}
			document.write('</TR>')	
		}				

	}
}

function _formatCurr(nVal){
	var sRet
	nVal = Math.round(nVal*100) / 100;

	if (Math.round(nVal*100) % 100 == 0) 
		{sRet = "" + nVal + ".00"}
	else 
	{
		if (Math.round(nVal*100) % 10 == 0)
			{sRet = "" + nVal + "0"}
		else	
			{sRet = "" + nVal}
	}
	
	return sRet;	
}

//------------------------------------
//----------- kalkulatory ------------
//------------------------------------

var MAX_STYROTYP = 5;
var nUserRabat = 0;
var nStyroTyp = 0;
var nStyroGrub = 100;  //[mm]

function ParseFirmaCalcData() 
{
	var nCode=2;


	if (location.href.indexOf("?") == -1) {
		nStyroTyp  = 0
		nUserRabat = -1
		nStyroGrub  = 100
		return 1
	}
	
	// Parse any command line arguments
	urlQuery = location.href.split("?")

	urlTerms = urlQuery[1].split(",")
	if (urlTerms[0] != null) 
		nCode = parseInt(urlTerms[0])
	
	if (urlTerms[1] != null) 
		{nUserRabat = urlTerms[1]}
	else
		{nUserRabat = -1};

	if (urlTerms[2] != null) 
		{nStyroTyp  = urlTerms[2]}
	else
		{nStyroTyp  = 0};

	if (urlTerms[3] != null) 
		{nStyroGrub  = urlTerms[3]}
	else
		{nStyroGrub  = 100};

	
	
	return nCode;
}


function _GetFirmaRec(nFirma){
	
	for (var i = 0; i < pwFirmy.length; ++i)
		if (pwFirmy[i][0] == nFirma)
			return pwFirmy[i];
		
	return null;
}

function _GetKalkulatorRec(nFirma){

	for (var i = 0; i < pwKalkulator.length; ++i)
		if (pwKalkulator[i][0] == nFirma)
			return pwKalkulator[i];

	if (nFirma>20)  //jak nie znajszie kalkulatora promocyjnego
	{
		for (var i = 0; i < pwKalkulator.length; ++i)
			if (pwKalkulator[i][0] == nFirma-20)
				return pwKalkulator[i];
	}
	return null;
}

function _GetCennikPoz(nCode){

	var nSection = Math.floor(nCode /100)-1;
	//alert("code=" + nCode + ", sec=" + nSection);
	
	for (var i=6; i<pwCennik[nSection].length; i++)
	{
		//alert(pwCennik[nSection][i][0]);
		if (pwCennik[nSection][i][0] == nCode)
			return pwCennik[nSection][i];
	}
	return null;
}

function printCalc() {

	var nFirma;

	if (location.href.indexOf("?") == -1) 
		nFirma = 1
	else
	{
		// Parse any command line arguments

		urlQuery = location.href.split("?")

		urlTerms = urlQuery[1].split(",")
		if (urlTerms[0] != null) 
			nFirma = parseInt(urlTerms[0])
	}
		
	if (nFirma)
		window.open("Content27p.html?" + nFirma + "," + nUserRabat + "," + nStyroTyp + "," + nStyroGrub , 'pop', "width=700, toolbar=no,location=yes,directories=no, status=no, menubar=no, scrollbars=yes,resizable=yes");
}

function drawCalcFixed(bForPrint, nFixedRabat, nFirmaOffset)
{
	_drawCalc(bForPrint, nFixedRabat, nFirmaOffset)	
}

function drawCalc(bForPrint)
{
	_drawCalc(bForPrint, -1, 0)	
}

function _drawCalc(bForPrint, nFixedRabat, nFirmaOffset)
{
	var nFirma = ParseFirmaCalcData();
	var pFirma = _GetFirmaRec(nFirma);
	nFirma += nFirmaOffset;

	var pCalc = _GetKalkulatorRec(nFirma);
	var nLine=0;

	if ((pFirma || nFixedRabat>=0) && pCalc)
	{
		if (nFixedRabat<0)
		{
			if (nUserRabat<0)
				nUserRabat = pFirma[2]
			else if (nUserRabat > pFirma[3])
				nUserRabat = pFirma[3]
		}
		else
			nUserRabat = nFixedRabat;

		if (nStyroTyp<0 || nStyroTyp>=MAX_STYROTYP)
			nStyroTyp = 0

		if (nStyroGrub<30 || nStyroGrub>150)
			nStyroGrub = 100
		
		if (pCalc.length > 3)	
		{
			document.write('<TABLE Width=580 Border=1 cellspacing=0 rules="all" frame="all">');
			document.write('<COL width="*"><COL width=40><COL width=50><COL width=50><COL width=50>');
	
			//Header
			document.write('<TR><TD class="cennik_head" colspan=1>' + pCalc[1] + ' System</TD>');
			document.write('<TD class="cennik_link" colspan=4>');
			if (nFixedRabat<0)
				if (pFirma[2]==0)
					document.write('reduction* to ' + pFirma[3] + '%');
				else
					document.write('reduction* from ' + pFirma[2] + '% to ' + pFirma[3] + '%');
			else
				document.write('promotion reduction <B>' + nFixedRabat + '%</B>');

			document.write('</TD></TR>');
			if (bForPrint == 0)
			{
				//parametry
				document.write('<TR><TD colspan=5 class="cennik_param">');
				
				if ((pCalc[2] & 1) == 0)
				{
					//document.write('rodzaj styropianu&nbsp;&nbsp;<SELECT size="1" class="cennik_txt" onchange="alert(' + nFirma + ')">')
					document.write('Styrofoam type&nbsp;&nbsp;<SELECT size="1" class="cennik_txt" onchange="setStyroTyp(' + nFirma + ',this.value)">')
					document.write('<OPTION value="3">&nbsp;EPS 50 </OPTION>');
					document.write('<OPTION value="4">&nbsp;wall&nbsp;</OPTION>');
					document.write('<OPTION selected value="0">&nbsp;EPS 70 </OPTION>');   //wartość domyślna, z value=0
					document.write('<OPTION value="1" >&nbsp;EPS 100&nbsp;</OPTION>');
					document.write('<OPTION value="2">&nbsp;EPS 200&nbsp;</OPTION>');
					
	  		   		document.write('</SELECT>')
				
					document.write('&nbsp;&nbsp;');
				}
				document.write('&nbsp;&nbsp;thickness [mm]&nbsp;<SELECT size="1" class="cennik_txt" onchange="setStyroGrub(this.value, ' + nFirma + ')">')
				for (var r=30; r<=150; r+=10)
				{
					if (r == nStyroGrub)
						document.write('<OPTION selected value="' + r + '">&nbsp;' + r + '&nbsp;</OPTION>');
					else
						document.write('<OPTION value="' + r + '">&nbsp;' + r + '&nbsp;</OPTION>');
				}
	  		   	document.write('</SELECT>');

				if (nFixedRabat<0)
				{
					document.write('&nbsp;&nbsp;&nbsp;reduction [%]&nbsp;');
					document.write('<SELECT size="1" class="cennik_txt" onchange ="setRabat(this.value, ' + nFirma + ')">')
				
					for (var r=0; r<=pFirma[3]; r++)
					{
						if (r == nUserRabat)
							document.write('<OPTION selected value="' + r + '">&nbsp;' + r + '&nbsp;</OPTION>');
						else
							document.write('<OPTION value="' + r + '">&nbsp;' + r + '&nbsp;</OPTION>');
					}
		  		   	document.write('</SELECT>');
				}		
	
				document.write('</TD></TR>');
			}
			//nagłówki
			document.write('<TR><TD class="cennik_head1">Material name</TD>');
			document.write('<TD width=50 class="cennik_head1">Usage at 1m<SUP>2</SUP></TD>');
			document.write('<TD width=70 class="cennik_head1">Unit price <SUB>(catalogue)</SUB></TD>');
			document.write('<TD width=70 class="cennik_head1">Price<BR>with reduction<BR>');
			document.write('<SPAN id=RABAT class="cennik_head2">' + nUserRabat + '%</SPAN>');
			document.write('<TD width=70 class="cennik_head1">Implementation price of 1m<SUP>2</SUP></TD></TR>');
                        //alert("len=" + pCalc.length)
			for (var i = 3; i < pCalc.length; i++)
			{
				document.write('<TR>');
				_drawEmptyCalcLine(++nLine, pCalc[i], nFirma, bForPrint);
				document.write('</TR>');
			}
			document.write('</TABLE>');
			
			_insertCalculations(pCalc, nUserRabat);
		
		}
		else
		{
			document.write('-- System ' + pCalc[1] + ' -- brak definicji kalkulatora -- opcja w przygotowaniu --');	
		}		
	}
	else 
	{
		document.write('-- brak danych --');	
	}
}

function changeRabat(pm, nFirma){
	
	if (pm<0)
	{	
		nUserRabat += pm;
		if (nUserRabat<0)	nUserRabat=0;
	}
	else
	{
		var pFirma = _GetFirmaRec(nFirma);
		if (nUserRabat + pm > pFirma[3])
			alert('Dla firmy ' + pFirma[1] + ' rabat nie może przekroczyć wielkości ' + pFirma[3] + '%');
		else
			nUserRabat += pm
	}

	refreshCalculations(nFirma)

}

function setRabat(nRab, nFirma){
	
	nUserRabat = nRab;
	if (nUserRabat<0)	
		nUserRabat=0;
	else
	{
		var pFirma = _GetFirmaRec(nFirma);
		if (nUserRabat > pFirma[3])
			nUserRabat = pFirma[3];
	}
	
	refreshCalculations(nFirma)
 }


function changeStyroTyp(nFirma)
{
	nStyroTyp++;
	if (nStyroTyp >= MAX_STYROTYP)
		nStyroTyp = 0;
	
	refreshCalculations(nFirma)
}

function setStyroTyp(nFirma, nVal)
{
        nStyroTyp = nVal;
	if (nStyroTyp >= MAX_STYROTYP || nStyroTyp < 0)
		nStyroTyp = 0;
	
	refreshCalculations(nFirma)
}

function setStyroGrub(nVal, nFirma)
{
	nStyroGrub = nVal;
	if (nStyroGrub > 150 || nStyroGrub<30)
		nStyroGrub = 100;
	
	refreshCalculations(nFirma)
}



function refreshCalculations(nFirma)
{
	var pCalc = _GetKalkulatorRec(nFirma);

	_insertCalculations(pCalc, nUserRabat);
} 

function _drawEmptyCalcLine(nLine, pCalcLine, nFirma, bForPrint){
	
	switch (pCalcLine[0]) {
	case -1:
		document.write('<TD colspan=4 class="cennik_sum">'+pCalcLine[1]+ '</TD>');
		document.write('<TD id=SUM'+nLine+' class="cennik_sumval">0</TD>');
		break;
	case -2:
		document.write('<TD colspan=4 class="cennik_sum">'+pCalcLine[1]+ '</TD>');
		document.write('<TD id=SUM'+nLine+' class="cennik_sumval2">0</TD>');	
		break;
	case 0:
		document.write('<TD class="cennik_txt">'+pCalcLine[1]+ '</TD>');
		document.write('<TD id=ILE'+nLine+' class="cennik_mid">1</TD>');
		document.write('<TD id=CN'+nLine+' class="cennik_val">0</TD>');
		if (pCalcLine[6] & 1)
			document.write('<TD class="cennik_val1">(nd)</TD>');  //id=CNR'+nLine+' 
		else
			document.write('<TD id=CNR'+nLine+' class="cennik_val">0</TD>');
		document.write('<TD id=SUM'+nLine+' class="cennik_val"><B>0</B></TD>');
		break;
	default:
                var pCennikPoz = _GetCennikPoz(pCalcLine[0]);
		document.write('<TR><TD class="cennik_txt">'+pCalcLine[1]+ '<BR>');

		if (pCalcLine.length > 7)  // && bForPrint == 0)
		{
                        //document.write('<IMG class="cennik_pm" src="data/ikona_zm.bmp" onclick="changeStyroTyp(' + nFirma + ')" alt="kliknij aby zmienć rodzaj materiału"></IMG>');
			//document.write('<SPAN id=NAME'+nLine+' class="cennik_subtxt_link" onclick="changeStyroTyp(' + nFirma + ')" title="kliknij aby zmienć rodzaj materiału">' + pCennikPoz[1] +'</SPAN>');
			document.write('<SPAN id=NAME'+nLine+' class="cennik_subtxt_big">' + pCennikPoz[1] +'</SPAN>');

		} else {
                	document.write('<SPAN id=NAME'+nLine+' class="cennik_subtxt">' + pCennikPoz[1] +'</SPAN>');
                }

		document.write('</TD>');
		document.write('<TD id=ILE'+nLine+' class="cennik_mid">1</TD>');
		document.write('<TD id=CN'+nLine+' class="cennik_val">0</TD>');

		if (pCalcLine[6] & 1) {
                        document.write('<TD class="cennik_val1">(nd)</TD>');
                } else {
			document.write('<TD id=CNR'+nLine+' class="cennik_val">0</TD>');
		}

		document.write('<TD id=SUM'+nLine+' class="cennik_val"><B>0</B></TD>');

		break;

	}
	
	//document.write('<TD id=CN'+nLine+' class="cennik_val">'+_formatCurr(pCalcLine[5])+'</TD>');
}

function _insertCalculations(pCalc, nRabat) {


        var nLine=0;
	var cSum = 0;
	var cSubSum = 0;

      //alert(eval('document.getElementById("RABAT").innerHTML'));
	eval('document.getElementById("RABAT").innerHTML="' + nUserRabat+'%"');
      //alert("rab="+nUserRabat)  ;
        
	for (var i = 3; i < pCalc.length; i++)
	{
		pCalcLine = pCalc[i];
		nLine++;
				
		switch (pCalcLine[0]) {
		case -1:
			cSubSum = cSum;
			cSum = 0;
			_CalcSumLine(nLine, cSubSum, pCalcLine);
			break;
		case -2:
			_CalcSumLine(nLine, cSum + cSubSum, pCalcLine);
			cSum = 0;
			break;
		case 0:
			cSum += _CalcLineNC(nLine, nRabat, pCalcLine);
			break;
		default:
			cSum += _CalcLine(nLine, nRabat, pCalcLine);
		}
	};

	eval('document.getElementById("STYR_GR").innerHTML="<B>' + nStyroGrub+'</B>"');

	
};

function _CalcSumLine(nLine, nSum, pCalcLine)
{	
	eval('document.getElementById("SUM'+nLine+'").innerHTML="' + _formatCurr(Math.round(100 *nSum)/100)+'"');
}


function _CalcLineNC(nLine, nRabat, pCalcLine){
	
	var dzielnik = 1;
	var cena = 0;
	var cenaR = 0;
	var wartosc = 0;

	if (pCalcLine[3]> 0)  
	 	dzielnik = pCalcLine[3]

	if ((pCalcLine[6] & 3) == 3)  //linia ze styropianem o zmiennej grubości, modyfikujemy dzielnik podstawowy ustawiony dla wartości 100mm
		dzielnik *= (100 / nStyroGrub);

	 cena = Math.round(100 * pCalcLine[5] / dzielnik ) / 100;   

	 if (pCalcLine[6] & 1)  //wiersz bez rabataowania,
		cenaR = cena
	 else	
	 	cenaR = Math.round(100 * cena * (1-nRabat/100)) / 100;

	 wartosc = Math.round(100 * pCalcLine[2] * cenaR)/100;
		
	eval('document.getElementById("ILE'+nLine+'").innerHTML="' + pCalcLine[2] + ' ' + pCalcLine[4]+'"');
	//alert('document.all.ILE'+nLine+'.innerHTML="' + pCalcLine[2] + ' ' + pCalcLine[4]+'"');

	eval('document.getElementById("CN' +nLine+'").innerHTML="' + _formatCurr(cena)+'"');
	if ((pCalcLine[6] & 1) == 0)
		eval('document.getElementById("CNR'+nLine+'").innerHTML="' + _formatCurr(cenaR)+'"');
	eval('document.getElementById("SUM'+nLine+'").innerHTML="' + '<B>'+ _formatCurr(wartosc) + '</B>'+'"');

	return wartosc;

}

function _CalcLine(nLine, nRabat, pCalcLine){

	var pCennikPoz;

	if (pCalcLine.length>7)
	{	
		//alert("poz= " + pCalcLine[0] + " len = " + pCalcLine.length);
		pCennikPoz = _GetCennikPoz(pCalcLine[7][nStyroTyp]);
	}
	else
		pCennikPoz = _GetCennikPoz(pCalcLine[0]);
	
	var dzielnik = 1;
	var cena = 0;
	var cenaR = 0;
	var wartosc = 0;

	if (pCalcLine[3]> 0)  
	 	dzielnik = pCalcLine[3]

	if ((pCalcLine[6] & 3) == 3)  //linia ze styropianem o zmiennej grubości, modyfikujemy dzielnik podstawowy ustawiony dla wartości 100mm
		dzielnik *= (100 / nStyroGrub);
	

	 cena = Math.round(100 * pCennikPoz[6] / dzielnik ) / 100;   //pCennikPoz[6] to cena katalogowa
	 if (pCalcLine[6] & 1)  //wiersz nie rabatowany
		cenaR = cena
	 else	
	 	cenaR = Math.round(100 * cena * (1-nRabat/100))/100;
	 wartosc = Math.round(100 * pCalcLine[2] * cenaR)/100;
	
	eval('document.getElementById("NAME' +nLine+'").innerHTML="' + pCennikPoz[1]+'"');

	if (pCalcLine[4] == "")
		eval('document.getElementById("ILE'+nLine+'").innerHTML="' + pCalcLine[2] + ' ' + pCennikPoz[2]+'"');
	else
		eval('document.getElementById("ILE'+nLine+'").innerHTML="' + pCalcLine[2] + ' ' + pCalcLine[4]+'"');

	eval('document.getElementById("CN' +nLine+'").innerHTML="' + _formatCurr(cena)+'"');
	if ((pCalcLine[6] & 1) == 0)
		eval('document.getElementById("CNR'+nLine+'").innerHTML="' + _formatCurr(cenaR)+'"');
	eval('document.getElementById("SUM'+nLine+'").innerHTML="' + '<B>'+ _formatCurr(wartosc) + '</B>'+'"');

	return wartosc;
}

function DataCennika() {
        document.write('Price offer is valid till <U>' + pwCennikDate + '</U>.');
}


function InsertTodayDate() {
	var CurrDate = new Date();
	var rok = CurrDate.getYear();
	//uzupelnienie do błedu netscape
	var rok2 = "" + rok;
	var l = rok2.length;
	rok2 = rok2.substring(l-2,l);
	rok = "20" + rok2;
	//uzupelnienie do błedu netscape

	document.write( "" + CurrDate.getDate() +"-"+ (CurrDate.getMonth()+ 1) + "-" + rok);
}


-->
