var popup_uid_name = 0;

function openWin(wUri, wName, wWidth, wHeight, Scroll, wMenu, Resize) {
	if(wName==''){
		popup_uid_name++;
		wName=popup_uid_name;
	}
//	if (wWidth > 700){
//		wWidth = 700; Scroll = 1;
//		if (wHeight < 500){
//			wHeight = wHeight + 16;
//		}
//	}
//        if (wHeight > 600){
//		wHeight = 600; Scroll = 1;
//		if (wWidth < 700){
//			wWidth = wWidth + 16;
//		}
//	}
	var resizable = (Resize==0) ? 0 : 1;
	var scrollBars = (Scroll!=0) ? 1 : 0;
	var menuBars = (wMenu) ? 1 : 0;
	var positionLeft = (screen.width - wWidth)/2;
	var positionTop = (screen.height - wHeight)/2;
	var myW = window.open(wUri,wName,'width='+wWidth+',height='+wHeight+',top='+positionTop+',left='+positionLeft+',location=0,menubar='+menuBars+',resizable=1,scrollbars='+scrollBars+',status=0,titlebar=0,toolbar=0,directories=0,hotkeys=0')
	myW.focus();
}

function openWin2(wUri, wName, wWidth, wHeight, Scroll, wMenu) {
 var scrollBars = (Scroll!=0) ? 1 : 0;
 var menuBars = (wMenu) ? 1 : 0;
 var positionLeft = (screen.width - wWidth)/2;
 var positionTop = (screen.height - wHeight)/2;
 var myW = window.open(wUri,wName,'width='+wWidth+',height='+wHeight+',top='+positionTop+',left='+positionLeft+',location=0,menubar='+menuBars+',resizable=0,scrollbars='+scrollBars+',status=0,titlebar=0,toolbar=0,directories=0,hotkeys=0')
 myW.focus();
}