function popUpWin(loadURL, winName, winWidth, winHeight, winScroll, winResize)
{
	var win = null;

/*	//default resize if not set to disable resize
	if(resizeOn = ''){
		resizeOn = 'no'
	}

	//default scrollOn if not set to disable scroll bars
	if(scrollOn = ''){
		scrollOn = 'no'
	}	
*/
	var win_left = (screen.width - winWidth)/2;				//calculates left position of popup to center
	var win_top = (screen.height - winHeight)/2;     		//calculates top position of popup to center
	var settings = '\'Height=' + winHeight + ',';    		//height in pixels
	   settings += 'width=' + winWidth + ',';      		//width in pixels 
	   settings += 'top=' + win_top + ',';      		//top position of popup
	   settings += 'left=' + win_left + ',';    		//left position of popup
	   settings += 'scrollbars=' + winScroll + ',';	//yes|no
	   settings += 'resizable=' + winResize + ',';       	//yes|no
		 settings += 'status=' + 'yes\'' ;
	
	//TODO: got to add status and toolbars as customisable settings
	
	//opens popup with settings specified	   
	if(loadURL != ''){
		win = window.open(loadURL, winName, settings);      
	}
	else{
		alert('you must provide a URL for the popUp window to load.')
	}

	//focus on popup if browser version is 4 or higher
	if(parseInt(navigator.appVersion) >= 4){
		win.window.focus();		
	} 
	
	//return a reference to the new window opened
	return win
}

