function showPicture(url, title, width, height, sb)
{
	width++;
	height++;
	
	swidth = screen.width;
	sheight = screen.height;
	
	x = (swidth - width) / 2;
	y = (sheight - height) / 2;

	sbars = sb ? 'yes' : 'no';
	wnd=window.open('', title, 'toolbar=no,scrollbars=' + sbars + ',width=' + width + ',height=' + height + ', top=' + y + ', left=' + x);
	wnd.name = title;
	wnd.document.write("<body style='margin:0px'><img src='" + url + "'></body>");
    
	return false;
}

function showFlash(url, title, width, height)
{
	padding=10;
	margin=20;
	border=1;
	
	hdelta = 2 * (padding + margin + border);
	vdelta = hdelta;
	
	wwidth = width + hdelta;
	wheight = height + vdelta;
	
	swidth = screen.width;
	sheight = screen.height;
	
	x = (swidth - wwidth) / 2;
	y = (sheight - wheight) / 2;
	
	wnd=window.open('', '_blank', 'toolbar=no,scrollbars=no,resizeable=no,status=no,width=' + wwidth + ',height=' + wheight + ', top=' + y + ', left=' + x);
	doc=wnd.document;
	doc.write('<head><title>' + title + '</title><link rel="stylesheet" type="text/css" href="styles/flashPreview.css"></head>');
	doc.write('<body>');
	doc.write('<div id="preview">');
	doc.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">');
	doc.write('<param name="movie" value="' + url + '">');
	doc.write('<param name="quality" value="high">');
	doc.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
	doc.write('</object>');

	doc.write('</div>');
	doc.write('</body>');
	
	return false;
}
