
function Popup() {

	var screenHeight = screen.availHeight;
	var screenWidth = screen.availWidth;

	var windowHeight = null;
	var windowWidth = null;
	var windowUrl = null;
	
	this.setWindowHeight = function(h) {
		windowHeight = h;
	}
	
	this.setWindowWidth = function(w) {
		windowWidth = w;
	}

	this.setWindowUrl = function(url) {
		windowUrl = url;
	}

	this.openWindow = function() {
		var left = (screenWidth / 2) - (windowWidth / 2);
		var top = (screenHeight / 2) - (windowHeight / 2);		
		var mywindow = open(""+windowUrl,"popup","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+windowWidth+",height="+windowHeight+",left="+left+",top="+top);
		mywindow.focus();
	}
}