function popup(pageSource, winName, wHeight, wWidth, winProp) {

	var screenWdth = screen.width;
	var screenHght = screen.height;
	var defaultHeight = 300;
	var defaultWidth = 500;
	var newPopup, winLeft, winWidth;
	var winProperties = winProp;
	winProperties += (winProp == null || winProp == "") ? "" : ",";

	if (wHeight == null) {
		winHeight = defaultHeight;
	} else {
		winHeight = Math.ceil(wHeight);
	}

	if (wWidth == null) {
		winWidth = defaultWidth;
	} else {
		winWidth = Math.ceil(wWidth);
	}

	winProperties += 'height=' + winHeight + ',width=' + winWidth;

	if (screenWdth/screenHght > 800/600) {
		winLeft = Math.ceil((screenWdth/2 - winWidth)/2);
	} else {
		winLeft = Math.ceil((screenWdth - winWidth)/2);
	}

	var winTop = Math.ceil((screenHght - winHeight)/2);
	winProperties += ',left=' + winLeft + ',top=' + winTop;

	newPopup = window.open(pageSource, winName, winProperties);

}

function quickPopup(src, winName) {

	popup(src, winName, 500, 550, 'directories=0,location=0,menubar=0,resizable=0,status=0,toolbar=0,scrollbars=1');

}
