//Resizes and positions window and refreshes opener page
function refreshResizeCenterWindow(width, height)
{
	window.opener.location = window.opener.location;
	resizeCenterWindow(width, height);
}

//Resize and position window
function resizeCenterWindow(width, height) 
{
	var w=width
	var h=height
	var t
	var l
   	window.resizeTo(w,h);
   	l = screen.width / 2 - w/2
   	t = screen.height / 2 - h/2
   	
   	window.moveTo(l,t);
   	window.focus();     
}

//Opens a pop up window
function PopUpWindow(sUrl,iHeight,iWidth,bToolBar,bStatus,bScrollBar,bResizeable,sWindowName)
{
	var features      = "height=" + iHeight + ",width=" + iWidth + ",toolbar=" + bToolBar + ",status=" + bStatus + ",scrollbars=" + bScrollBar + ",resizable=" + bResizeable
	var window_handle = window.open(sUrl,sWindowName,features);
    window_handle.focus();
}