/* **********************************************************************************
 * File:        global.js
 * Description: Defines JavaScript for Mid-Continent GA website
 * Revisions:   2009-12-13 [am] File created 
 *              2009-12-27 [am] Added WinPopup function
 * ********************************************************************************** */
 
 /* *****************************************
 * Function:    WinPopup
 * Description: Open a pop-up window with specified options and center in middle of the screen
 * Arguments:   pUrl   - URL to to load in new window
 *              pName  - Name of new window
 *              w      - Width of new window in pixels
 *              h      - Height of new window in pixels
 *              scroll - Whether to include scrollbars ('yes') or not ('no')
 * Return:      None
 * ***************************************** */
function WinPopup(pUrl,pName,w,h,scroll) {
	var settings = 'height='+h+',width='+w+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',scrollbars='+scroll+',resizable=yes';
	var win=window.open(pUrl,pName,settings);
	if(parseInt(navigator.appVersion)>=4) win.window.focus();
}