function openAWindow( pageToLoad, winName, width, height, center) {
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}

	args = "width=" + width + "," 
	+ "height=" + height + "," 
	+ "location=0," 
	+ "menubar=0,"
	+ "resizable=1,"
	+ "scrollbars=1,"
	+ "status=0," 
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","     //IE Only
	+ "top=" + yposition;           //IE Only

	window.open( pageToLoad,winName,args );
}
// stop hiding -->


<!-- hide this script from non-javascript-enabled browsers
function openAPhotoWindow( pageToLoad, winName, width, height, center) {
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}

	args = "width=" + width + "," 
	+ "height=" + height + "," 
	+ "location=0," 
	+ "menubar=0,"
	+ "resizable=1,"
	+ "scrollbars=0,"
	+ "status=0," 
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","     //IE Only
	+ "top=" + yposition;           //IE Only

	window.open( pageToLoad,winName,args );
}

function openWindow(urlPage, winName, winWidth, winHeight, winResize, winScroll, winCenter) {
	// Set Window POSITION to center screen
	var xPos, yPos
	xPos=0; yPos=0;
	if ((parseInt(navigator.appVersion) >= 4 ) && (winCenter)){
		xPos = (screen.width - winWidth) / 2;
		yPos = (screen.height - winHeight) / 2;
	}

	// Set Window PARAMETERS
	var winPrm
	winPrm = ""
	+ "width=" + winWidth + "," 
	+ "height=" + winHeight + "," 
	+ "resizable=" + winResize + ","
	+ "scrollbars=" + winScroll + ","

	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "menubar=0,"
	+ "status=1," 
	+ "hotkeys=0,"
	+ "location=0," 

	+ "left=" + xPos + ","     //IE Only
	+ "top=" + yPos;           //IE Only
	+ "screenx=" + xPos + ","  //NN Only
	+ "screeny=" + yPos + ","  //NN Only

	
	window.open(urlPage, winName, winPrm);
}
// stop hiding -->


//Close popup window and refresh parent
function refreshParent() {
  window.opener.location = "Requests.aspx";

  if (window.opener.progressWindow)
		
 {
    window.opener.progressWindow.close()
  }
  window.close();
}

function CloseAndRefreshInvoices() {
  opener.location = "Requests.aspx";
  window.close();
}
