/**
* Function to handle the launching of a new window 
* 
* @param string url
* @param string name
* @param string width
* @param string height
* @param string scrollbars
* @param string resizable
* @returns window object
*/
function NewWindow(url, name, width, height, scrollbars, resizable,centered)
{
	if ( centered == true ) {
		var ypos = (screen.height - h) / 2;
		var xpos = (screen.width - w) / 2;
		
	} 
	
	var features = "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resizable=" + resizable;
	if ( centered == true ) {
		features += ",top=" + ypos + ",left=" + xpos;
		
	}
	
	var win_ref = window.open(url, name, features);
	if ( parseInt(navigator.appVersion) >= 4 ) {
		win_ref.window.focus();
		
	}
	
	return win_ref;
	
}//end NewWindow