function getHost() {
	return window.location.protocol + "//" + window.location.host + "/";
}
	
function popup(reqPage, width, height) {		
	win = window.open(getHost() + reqPage, '', 'scrollbars=no, resizable=no, toolbar=no, width=' + width + ', height=' + height + ', left=0, top=0');
}

function popupScroll(reqPage, width, height) {		
	win = window.open(getHost() + reqPage, '', 'scrollbars=yes, resizable=no, toolbar=no, width=' + width + ', height=' + height + ', left=0, top=0');
}
	
function popupCenter(reqPage, width, height) {
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2;
	win = window.open(getHost() + reqPage, '', 'scrollbars=no, resizable=no, toolbar=no, width=' + width + ', height=' + height + ', left=' + left + ', top=' + top);
}

function popupScroll(reqPage, width, height) {		
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2;
	win = window.open(getHost() + reqPage, '', 'scrollbars=yes, resizable=no, toolbar=no, width=' + width + ', height=' + height + ', left=' + left + ', top=' + top);
}

function popupCustom(reqPage, winname, properties) {		
	win = window.open(getHost() + reqPage, winname, properties);
}

function popupCenterCustom(reqPage, winname, properties, width, height) {
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2;
	win = window.open(getHost() + reqPage, winname, properties + ', width=' + width + ', height=' + height + ', left=' + left + ', top=' + top);
}	
