function openPrintPreviewWin(page) {

	var yes = 1;
	var no = 0;

	var width = 800;
	var height = 600;
	var chasm = screen.availWidth;
	var mount = screen.availHeight;

	var menubar = no;      // The File, Edit, View Menus
	var scrollbars = yes;   // Horizontal and vertical scrollbars
	var locationbar = no;  // The location box with the site URL
	var resizable = yes;    // Can the window be resized?
	var statusbar = no;    // Status bar (with "Document: Done")
	var toolbar = no;      // Back, Forward, Home, Stop toolbar

  // special fix for Mac:
  if (navigator.userAgent.indexOf("Mac") != -1) { toolbar = yes; }

	windowprops = "WIDTH=" + chasm*2/3 + ",HEIGHT=" + mount/2 + ",LEFT=" + chasm/6 + ",TOP=" + mount/4;

	windowprops += (menubar ? ",menubar=yes" : ",menubar=no") +
		(scrollbars ? ",scrollbars=yes" : ",scrollbars=no") +
		(locationbar ? ",locationbar=yes" : ",locationbar=no") +
		(resizable ? ",resizable=yes" : ",resizable=no") +
		(statusbar ? ",status=yes" : ",status=no") +
		(toolbar ? ",toolbar=yes" : ",toolbar=no");

	//id_param = id.toString();

	var PrintPrevWindow = window.open(page, "PrintPreviwWin", windowprops);

	if ((document.window != null) && (!PrintPrevWindow.opener)) {
		PrintPrevWindow.opener = document.window;
		PrintPrevWindow.focus();
	}
	else {
		if (PrintPrevWindow.blur) {PrintPrevWindow.focus();}
	}

}
