function openScreenshot( strScreenshot )
{
	window.open( strScreenshot, '', 'width=571,height=460,resizeable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no' );

	return false;
}

function warningForum( p_text )
{
	return checkForMatch( p_text, "Please don't use the forum to schedule matches, as:\r\n\r\n* you're not guaranteed players will be e-mailed\r\n* times will not displayed in their time zone\r\n\r\nPlease use the Timetable tab instead" );
}

function warningAcceptReject( p_text )
{
	return checkForMatch( p_text, "Please don't use the message area to mention time, as times will not be displayed in each player's own time zone.\r\n\r\nPlease use the Reschedule button instead" );
}

function warningSchedule( p_text )
{
	return checkForMatch( p_text, "Please don't use the message area to mention time, as times will not be displayed in each player's own time zone.\r\n\r\nPlease use the dropdown boxes instead" );
}

function checkForMatch( p_text, p_message )
{
	var keyword;
	var keywords = new Array( "pm", "EST" );
	var text = p_text.toLowerCase();

	for ( var iLoop = 0; iLoop < keywords.length; iLoop++ )
	{
		keyword = keywords[iLoop];

		if ( text.indexOf( keyword + " " ) == -1 && text.substr( text.length - keyword.length ) != keyword )
			continue;

		alert( p_message );
		return false;
	}

	return true;
}
