function previewImage(imgID, width, height, lang)
{
	var scale = width/height;
	
	if(width > 800)
	{
		width = 800;
		height = width/scale;
	}
	
	var newwindow = window.open("include/previewImage.php5?img="+imgID+"&lang="+lang, '', 'scrollbars=yes,width='+parseInt(width + 50) + ',height='+parseInt(height + 100));
	
	if(window.focus)
		newwindow.focus()
}