function openPopup( windowName, windowWidth, windowHeight, windowUrl ) {
	windowProperties = "toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no";
	windowProperties += ", width="+windowWidth;
	windowProperties += ", height="+windowHeight;

	openedWindow = window.open( windowUrl, windowName, windowProperties);
	openedWindow.resizeTo(windowWidth,windowHeight);
	openedWindow.moveTo( (self.screen.availWidth/2 - windowWidth/2 ), (self.screen.availHeight/2 - windowHeight/2 ) );
	if( window.focus ) {
		openedWindow.focus();
	}

	if( windowName != 'araProgram' && windowName != 'araClose' ) {
		if( top.frames[0] != null ) {
			top.frames[0].araPopups[windowName] = openedWindow;
		}
	}
}function openUserWindow( windowUrl, windowProps, windowWidth, windowHeight, bla) {
	windowProperties = windowProps;
	windowName = "Team Distance Runners";
	openedWindow = window.open( windowUrl, windowName, windowProperties);
	openedWindow.resizeTo(windowWidth,windowHeight);
	openedWindow.moveTo( (self.screen.availWidth/2 - windowWidth/2 ), (self.screen.availHeight/2 - windowHeight/2 ) );
	if( window.focus ) {
		openedWindow.focus();
	}

	if( windowName != 'araProgram' && windowName != 'araClose' ) {
		if( top.frames[0] != null ) {
			top.frames[0].araPopups[windowName] = openedWindow;
		}
	}
}

function openWindow( windowWidth, windowHeight, windowUrl ) {
	openPopup( 'araPopup' , windowWidth, windowHeight, windowUrl );
}
function openProgram( windowUrl ) {
	openPopup( 'araProgram', (self.screen.availWidth-100), (self.screen.availHeight-100), windowUrl );
}
function openHelp( windowUrl ) {
	openPopup( 'araHelp', 550, 550, windowUrl );
}
function openManager( windowName, windowWidth, windowHeight, windowUrl ) {
	openPopup( windowName, windowWidth, windowHeight, windowUrl );
}
