/**
 * Utilities for standard window actions
 * 
 */
function WindowUtils() { // optionally pass a querystring to parse
}

/**
 * Opens a popup window
 */
WindowUtils.prototype.popup = function(url, w, h, name, params) {

	var width = 800;
	var height = 600;
	var screenw = screen.availWidth;
	var screenh = screen.availHeight;
	
	width = w;
	height = h;

	var leftPos = (screenw-width)/2, topPos = (screenh-height)/2;
	if (params == null) {
		var params = "toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=" + width + ",height=" + height + ",top=" + topPos + ",left=" + leftPos;
	}
	newWindow=window.open(url,name, params);
	if (newWindow.opener == null) newWindow.opener = self;
	newWindow.focus();

	//return (newWindow);
}