// opens new window for showing enlarged images

function image_view(title,folder,file,width,height,scroll) {
	// set default scrollbars to not show
	scroll_param='scrollbars=no,';

	// pass uri as absolute
	var abs_uri = 'http://www.litterbug.net/image.php?title=' + encodeURI(title) + '&folder=' + encodeURI(folder) + '&file=' + encodeURI(file);
	//alert(abs_uri); // debug

	// create new window object (opens new window)
	if ((!width) && (!height))
	{
		var win_image = window.open(abs_uri,'image','width=460,height=480,statusbar=no,resizable=no,personalbar=0,toolbar=0');
		win_image.resizeTo(460,480);
	}
	else {
		// open longer window for show posters/ads
		width += 20;
		height += 110;
		
		// add scrollbars if requested (for long documents)
		if (scroll=='yes')
		{
			scroll_param='scrollbars=yes,';
		}
		var win_image = window.open(abs_uri,'image','width='+width+',height='+height+','+scroll_param+'statusbar=no,resizable=yes,personalbar=0,toolbar=0');
		win_image.resizeTo(width,height);

		
	}
	// move new window to the top of the stack
	win_image.focus();
}