// window.js

// Define a function to create new window popup
function openPopup(url,target,pW,pH) {
	new_window_width = pW;                                   // width of new window
	new_window_height = pH;                                  // height of new window

	screen_height = getScreenHeight();
	screen_width = getScreenWidth();

	new_window_top = (screen_height / 2) - (new_window_height / 2);
    new_window_left = (screen_width / 2) - (new_window_width / 2);

	popupWin = window.open(url, target, "toolbar=no,location=no,scrollbars=no,width=" + new_window_width + ",height=" + new_window_height + ",left=" + new_window_left + ",top=" + new_window_top);
	popupWin.focus(); 

	return popupWin;
}
