function burst(url, target, width, height) {
	if (width > window.screen.width - 50) width = window.screen.width - 50;
	if (height > window.screen.height - 100) height = window.screen.height - 100;

	var x = (window.screen.width - width) / 2;
	var y = (window.screen.height - height) / 3;
	var toolbar = (target == 'printer') ? 'yes' : 'no';
	var foo = window.open(url, target, 'width='+width+',height='+height+',left='+x+',top='+y+',menubar=no,toolbar='+toolbar+',location=no,scrollbars=yes,resizable=yes,status=yes');
	foo.focus();
	return 0;
}

function gallery_select(checked) {
	var gform = document.getElementById("gallery_form");
	var confirm = gform.confirm.checked;

	for (i = 0; i < gform.length; i++) {
		if (gform.elements[i].type == "checkbox")
			gform.elements[i].checked = checked;
	}

	gform.confirm.checked = confirm;

	return 0;
}
