function popup( filename, params, width, height, resizable, scrollbars, windowName, centered )
{
	if ( width == 0 ) width = screen.availWidth - 20;
	if ( height == 0 ) height = screen.availHeight - 20;
	if ( centered == true ) {
		topX = (screen.availWidth/2)-(width/2);
		topY = (screen.availHeight/2)-(height/2);
	} else {
		topX = 20;
		topY = 20;
	}
	if ( params != "" ) params = "?" + params;
	window.open( filename + params, windowName, "resizable=" + resizable + ",scrollbars=" + scrollbars + ",top=" + topY + ", left=" + topX + ",width=" + width + ",height=" + height);
}

PopUp = function( width, height )
{
	this.page = "";
	this.params = "";
	this.width = width;
	this.height = height;
	this.resizable = "yes";
	this.scrollbars = "auto";
	this.windowName = "win" + new Date().getMilliseconds();
	this.centered = true;
}

PopUp.prototype.getPageLink = function()
{
	return this.page + (this.params != "" ? "?" + this.params : "");
}