var preview;

// inicijalizacija
function init() {
}

window.onload = init;

function doPreview(slika, picWidth, picHeight) {
	metrika =  'left=' + ((screen.width - picWidth) / 2) + ', top=' + ((screen.height - picHeight - 35) / 2) + ',';
	metrika += 'width=' + picWidth + ',height=' + picHeight;
	metrika += ',scrollbars=0,resizable=0, directories=0, status=0, menubar=0, location=0, toolbar=0';
 
	strHTML = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN" "DTD/xhtml1-transitional.dtd">' +
			  '<html>' + 
			  '<head>' +
			  '<title>NAKOVO.ORG.YU</title>' +
			  '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">' +
			  '<meta http-equiv="imagetoolbar" content="no">' +
			  '<!--<link rel="stylesheet" type="text/css" href="style/style.w.css">-->' +
			  '</head>' +
			  '<body style="margin:0px;overflow:hidden;">' +
			  '<div id="frame">' +
			  '<a href="javascript:window.close();">' +
			  '<img src="pictures/' + slika + '" border="0" alt="Zatvori prozor / Close Window">' +
			  '</a>' +
			  '</div>' +
			  '</body>' +
			  '</html>';
			  
	if (!preview || preview.closed) {
		preview = window.open("", "preview", metrika);
		preview.document.open();
		preview.focus();
		preview.document.write(strHTML);
		preview.document.close();
	} else {
		preview.close();
		preview = window.open("", "preview", metrika);
		preview.document.open();
		preview.focus();
		preview.document.write(strHTML);
		preview.document.close();
	}
}