function show(c,i){
	var category = new Array("vrati","balkoni","prozorci","parapeti","ogradi","mebeli","konstrukcii","pechki");
	var img = new Image;
	img.src = "images/"+category[c]+"/"+i+".jpg";
		
	var w = window.open('','view','status=no,toolbar=no,menubar=no,location=no');
	
	var wstr='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
	wstr = wstr+'<html xmlns="http://www.w3.org/1999/xhtml">';
	wstr = wstr+'<head>';
	wstr = wstr+'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	wstr = wstr+'<title></title>';
	wstr = wstr+'<script language="javascript" type="text/javascript" src="js/core.js"></script>';
	wstr = wstr+'<style>body{margin:2px; padding:2px; background:#fff; text-align:center; vertical-align:middle;} img{border:1px solid #333333; background:#fff; padding:4px;}</style>';
	wstr = wstr+'</head>';

	wstr = wstr+'<body>';
	wstr = wstr+'<a href="javascript:window.close();"><img id="imag" src="'+img.src+'" onLoad="resizeit(this)" border="0" /></a>';
	wstr = wstr+'</body>';
	wstr = wstr+'</html>';	
		
		w.document.open();
		w.document.write(wstr);
		w.document.close;
		return true;
	}
	
function resizeit(imo){
	
	var screenW = screen.width;
	var screenH = screen.height;
	
	var iw = imo.width;
	var ih = imo.height;
	
	var sw = 60; // 40 px width plus
	var sh = 70; // 30 px height plus

	var ww = eval(iw + sw);
	var wh = eval(ih + sh);

	window.resizeTo(ww,wh);

	window.moveTo(((screenW/2)-(ww/2)),((screenH/2)-(wh/2)));
	return true;
}