var cI = 1;

	function t_windowS(pictureURL)
	{
		picturePath = '_img/products/';
		
		var	t_ImageObject = new Image(850,640);
		t_ImageObject.src = '' + picturePath + pictureURL;
		
		windowWidth = t_ImageObject.width+20;
		windowHeight = t_ImageObject.height+20;
		
		windowParameters = '';
		windowParameters += 'channelmode=no, directories=no, fullscreen=no, height='+windowHeight+', location=no';
		windowParameters += ', menubar=no, resizable=yes, scrollbars=no, status=no, statusbar=no, titlebar=no, width='+windowWidth;
		windowParameters += ', innerHeight='+windowHeight+', innerWidth='+windowWidth;
		
		window.open(t_ImageObject.src, '_blank', windowParameters);
		
	}
	
	function t_divS(action, p2)
	{
		
		picturePath = '_img/products/';
		pictures = 22;
		
		var a = new Array();
		a[1] = picturePath + 'b1.jpg';
		a[2] = picturePath + 'b2.jpg';
		a[3] = picturePath + 'b3.jpg';
		a[4] = picturePath + 'b4.jpg';
		a[5] = picturePath + 'n1.jpg';
		a[6] = picturePath + 'n2.jpg';
		a[7] = picturePath + 'n3.jpg';
		a[8] = picturePath + 'c1.jpg';
		a[9] = picturePath + 'c2.jpg';
		a[10] = picturePath + 'c3.jpg';
		a[11] = picturePath + 'w1.jpg';
		a[12] = picturePath + 'w2.jpg';
		a[13] = picturePath + 'w3.jpg';
		a[14] = picturePath + 'd1.jpg';
		a[15] = picturePath + 'd2.jpg';
		a[16] = picturePath + 'd3.jpg';
		a[17] = picturePath + 'pn.jpg';
		a[18] = picturePath + 'pc.jpg';
		a[19] = picturePath + 'pw.jpg';
		a[20] = picturePath + 'pd.jpg';
		a[21] = picturePath + 'adez.jpg';
		a[22] = picturePath + 'amo.jpg';
	
		if(action == 'hide')
		{
				document.getElementById('showWindow').style.display = 'none';
			}

		if(action == 'show')
		{
				document.getElementById('showWindow').style.display = 'block';
				if(Math.round(p2)>0 && Math.round(p2)<=pictures)
					cI = p2;
				else
					cI = 1;
				document.getElementById('currentImage').src = a[Math.round(cI)];
			
			}
		if(action == 'next')
		{
			cI++;
			if(Math.round(cI)>pictures)
				cI = 1;
			document.getElementById('currentImage').src = a[Math.round(cI)];
			}

		if(action == 'prev')
		{
			cI--;
			if(Math.round(cI)<1)
				cI = 1;
			document.getElementById('currentImage').src = a[Math.round(cI)];
			}
	
	}