// display a new browser window
function DisplayWindowResize(url,h,w, WinName, WinScroll)
{
	// Declaration of Variables
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	// Check if Window Name has been left out of the function call
	// Test for undefined or null variables
	if (!WinName)
	{
		// Set variable becuase it is used
		WinName = '';
	}
	
	// Test for undefined or null variables
	if (!WinScroll)
	{
		// Set variable becuase it is used
		WinScroll = 'Yes';
	}
	
	// Dispaly new browser window
	popupWindow =
		eval("window.open('"+url+"', '"+WinName+"', 'width="+w+",height="+h+
		",top="+wint+",left="+winl+
		",menubar=no,toolbar=no,location=center,scrollbars="+WinScroll+
		",resizable=yes,status=yes,location=no')");
}

function DisplayStats (CurrentForm, location)
{
	// Declaration of Local Variables
	var strMessage;
	
	strMessage = '';
	
	if (CurrentForm.MonthStats.value == '')
	{
		strMessage = strMessage + '     * Must select a month.' + '\n';
	}
	
	if (CurrentForm.YearStats.value == '')
	{
		strMessage = strMessage + '     * Must select a year.' + '\n';
	}
	
	if (strMessage == '')
	{
		DisplayWindowResize('/Statistics' + location + '/awstats' + CurrentForm.MonthStats.value + CurrentForm.YearStats.value + '/index.html', 600, 1000);
	}
	else
	{
		alert('Please fix the following: ' + '\n' + strMessage);
	}
}
