mywin = null;
var unLoad;
var surl;
//
// Open the popup window
//
// params
//      url	The popup window URL
//      width	The width of popup window
//      url	The Height of popup window
//      scrollableBoolean	Is the scrolbar showing?
//
function openwindow(url, width, height, scrollableBoolean) {
									 if (height==375) scrollableBoolean=1; // FORCE SCROLLBAR FOR E-SURVEY 
	surl = url;
	(scrollableBoolean==0) ? scrollable="no": scrollable="yes";
	if (url != "") {
		if (!mywin) {
			mywin = window.open(url,"mywin", "status=no, scrollbars=" + scrollable + ", resizable=yes, width=" + width + ", height=" + height + ",screenX=10,screenY=10,top=10,left=10");
			unLoad = (function () {mywin = null;});
			mywin.onunload = unLoad;
		}
		else {
			if (mywin.closed) {
				mywin = null;
				openwindow(surl, width, height, scrollableBoolean);
			}
			mywin.focus();
			mywin.location.href = url;
		}
	} 					
}

function openwindow(x, y) {
  window.open(x,y,'status=no,scrollbars=no,resizable=yes,width=380,height=460');
}