var locWin = null;

function popup(loc, wn, wf) {
	var w, url, winName, winFeatures;
	
	url = loc;
	winName = wn;
	winFeatures = wf;

	w = window.open(url, winName, winFeatures);
	w.focus();
}

function launch(n, loc, w, h) {
	var winName, winFeatures;
	
	winName = n;
	winFeatures = "width="+w+",height="+h+",toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,left=20,top=20,screenX=20,screenY=20";

	popup(loc, winName, winFeatures);
}

function openwindow2(link2, width1, height1, pagename) {
	day = new Date();
	id = day.getTime();

	x = (1024 - width1)/2, y = (768 - height1)/2;

	if (screen) {
        	y = (screen.availHeight - height1)/2;
	        x = (screen.availWidth - width1)/2;
	}

	// to popUp different window , replace 'RenewPopUp' with " + id + "

	eval("page" + pagename +  " = window.open(link2, '" + pagename + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width1 + ",height=" + height1 + ",screenX=" + x + ", screenY=" + y + ", top=" + y + ",left=" + x + "');");

	eval("page" + pagename + ".focus();");
//	pageEditUser.focus();


}

