//commons

function comsOpenPopup(pstrURL, pstrWindowName) {

	var pobjWindow, pintTop, pintLeft;
	
	pintTop = (screen.availHeight/2-200);
	pintLeft = (screen.availWidth/2-275);

	if (navigator.appName == 'Microsoft Internet Explorer') {
		pobjWindow = window.open(pstrURL, pstrWindowName, "directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, height=400, width=550,top="+pintTop+",left="+pintLeft);
	}	else {
		pobjWindow = window.open(pstrURL, pstrWindowName,'resizable,scrollbars,height=400,width=550');
	}
	pobjWindow.focus();
}

function comsOpenPopupSize(pstrURL, pstrWindowName, pintWidth, pintHeight, pstrResize, pstrScroll) {
	var pobjWindow, pintTop, pintLeft;
	
	pintTop = (screen.availHeight/2-(pintHeight/2));
	pintLeft = (screen.availWidth/2-(pintWidth/2));
	
	if (pintWidth>screen.availWidth*0.95) {
		pintWidth=screen.availWidth*0.95;
	}
	if (pintHeight>screen.availHeight*0.95) {
		pintHeight=screen.availHeight*0.95;
	}

	pobjWindow = window.open(pstrURL, pstrWindowName, "directories=no, location=no, menubar=no, resizable="+ pstrResize +", scrollbars="+ pstrScroll +", status=no, toolbar=no, height="+pintHeight+", width="+pintWidth+", top="+pintTop+", left="+pintLeft);
	pobjWindow.focus();
}

function comsOpenWindowSize(pstrURL, pstrWindowName, pintWidth, pintHeight, pstrResize, pstrScroll) {
	var pobjWindow, pintTop, pintLeft;
	
	pintTop = (screen.availHeight/2-(pintHeight/2));
	pintLeft = (screen.availWidth/2-(pintWidth/2));

	if (pintWidth>screen.availWidth*0.95) {
		pintWidth=screen.availWidth*0.95;
	}
	if (pintHeight>screen.availHeight*0.95) {
		pintHeight=screen.availHeight*0.95;
	}

	pobjWindow = window.open(pstrURL, pstrWindowName, "directories=no, location=no, menubar=yes, resizable="+ pstrResize +", scrollbars="+ pstrScroll +", status=yes, toolbar=yes, height="+pintHeight+", width="+pintWidth+", top="+pintTop+", left="+pintLeft);
	pobjWindow.focus();
}