function preview(what, w, h, scrollbars) {
	if (!what) return;
	if (!w) w = 630;
	if (!h) h = 630;
	scrollbars = scrollbars ? 1 : 0;
	scr_w = screen.width;
	scr_h = screen.height;
	l = (scr_w - w) / 2;
	t = (scr_h - h) / 2;
	popup = window.open(what, "window_id", "width=" + w + "px,height=" + h + "px,left=" + l + "px,top=" + t + "px,scrollbars=" + scrollbars + ",location=0,toolbar=0,resizable=1,menubar=0,status=0,dependent=1");
	popup.focus();
}

function popupPage(w,h,URL) {
var l = 75;
var t = 75;

var windowprops = "location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes" +
",left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;
popup = window.open(URL,"MenuPopup",windowprops);
}


function change_display(id) {	var o = document.getElementById(id);	if (o) {		if (o.style.display == "none") {			o.style.display = "";		} else {			o.style.display = "none";		}	}	return true;}


if (typeof($) !== "undefined" && typeof($.fancybox) !== "undefined") {
	$(function() {
		$("a.fancy").attr("rel", "fancy").fancybox();
	});
}

