function winResizeAndCenter() {
	openWinImgWidth = openWin.document.images['openWinImg'].width;
	openWinImgHeight = openWin.document.images['openWinImg'].height;
	w = openWinImgWidth + 100;
	h = openWinImgHeight + 120;
	//
	openWin.resizeTo( w, h );
	openWin.moveTo( screen.width / 2 - w / 2, screen.height / 2 - h / 2 );
}
//
function show(url) {
	//
	filename = url.substr( url.lastIndexOf('/') + 1, url.length );
	if ( url.indexOf('portfolio_') > 0) {
		portfolioname = url.substr( url.indexOf('portfolio_'), url.length );
		portfolioname = portfolioname.substr( 0, portfolioname.indexOf('/') + 1 );
	} else portfolioname = '';
	openWin = window.open ('','','resizable=yes, scrollbars=yes');
	openWinContent = '<html><head><title></title><link href="portfolio.css" rel="stylesheet" type="text/css" /></head><body><table class="wholeScreen"><tr><td>';
	openWinContent += '<img id="openWinImg" src="images/' + portfolioname + filename + '" onClick="window.close()" alt="Затвори" title="Затвори" />';
	openWinContent += '</td></tr></table></body></html>';
	openWin.document.write(openWinContent);
	//
	openWin.document.title = filename;
	openWin.moveTo( 0, 0 );
	openWin.resizeTo( screen.width, screen.height );
//		openWin.document.onload = winResizeAndCenter();
}