function CAUReportPopUp( pageUrl )
{
	window.open( 
		pageUrl, 
		null,
		"directories = no, " +
		"left = 0, " + 
		"location = no, " +
		"menubar = yes, " +
		"resizable = yes," +
		"scrollbars = yes," +
		"status = no, " +
		"titlebar = no, " +
		"toolbar = no, " +
		"top = 0, " +
		"width = 800, " +
		"height = 600" );
} // end CAUReportPopUp

function frmProcessing( btnID )
{
	var oBtn = document.getElementById( btnID );
	
	if( oBtn.className != "btnPillWait" )
	{
		oBtn.className		= "btnPillWait";	
		oBtn.onclick		= null;
		oBtn.onmouseout		= null;
		oBtn.onmouseover	= null;
		oBtn.value			= "";
		
		return true;
	} // end if( oBtn.className != "btnPillWait" )
	else
	{
		alert( 'Your request is being processed. One moment please.' );
		return false;
	} // end else: if( oBtn.className != "btnPillWait" )
} // end frmProcessing

function HasSpam( sender, args )
{
	if( sender != null && args != null )
	{
		var arrInvalid = new Array();
		arrInvalid[0] = "http";
		arrInvalid[1] = "href";
		arrInvalid[2] = "www";
		
		var bValid = true;
		var sValue = args.Value.toLowerCase();			
		
		for( var i = 0; i < arrInvalid.length; i++ )
		{
			if( sValue.indexOf( arrInvalid[i], 0 ) != -1 )
			{
				bValid = false;
				break;
			} // end if( sValue.indexOf( ...
		} // end for( var i = 0; i < arrInvalid.length; i++ )
		
		args.IsValid = bValid;
	} // end if( sender != null && args != null )
} // end HasSpam

function HideObjects( oIDs )
{
	for( var i = 0; i < oIDs.length; i++ )
	{
		document.getElementById( oIDs[i] ).style.display = 'none';
	} // end for( var i = 0; i < oIDs.length; i++ )
} // end HideObjects

function ReplaceObjectHtml( oID, sHtml )
{
	document.getElementById( oID ).innerHTML = sHtml;
} // end ReplaceObjectHtml

function SetClasses( oIDs, sClass )
{
	for( var i = 0; i < oIDs.length; i++ )
	{
		document.getElementById( oIDs[i] ).className = sClass;
	} // end for( var i = 0; i < oIDs.length; i++ )
} // end SetClasses

function TextAreaMaxLength( obj, nMaxLen, e )
{
	var bOk = false;
	
	if( obj.value != null )
	{
		var nKeyCode;
		
		if( window.event )
		{
			nKeyCode = event.keyCode;
		} // end if( window.event )
		else
		{
			nKeyCode = e.keyCode;
		} // end else: if( window.event )
		
		switch( nKeyCode )
		{
			case 8:
			case 46:
				bOk = true;
				break;
			default:
				bOk = ( obj.value.length < nMaxLen );
				break;
		} // end switch( nKeyCode )
		
		if( obj.value.length > nMaxLen )
		{
			obj.value = obj.value.substring( 0, nMaxLen );
		} // end if( obj.value.length > nMaxLen )
	} // end if( obj.value != null )
	
	return bOk;
} // end TextAreaMaxLength

function ToggleDisplay( oID )
{
	var object = document.getElementById( oID );
		
	if( object.style.display == 'block' )
	{
		object.style.display = 'none'
	} // end if( object.style.display == 'block' )
	else
	{
		object.style.display = 'block';
	} // end else: if( object.style.display == 'block' )
} // end ToggleDisplay

function ToggleLinkText( object, sText1, sText2 )
{
	if( object.innerHTML == sText1 )
	{
		object.innerHTML = sText2;
	} // end if( object.innerHTML == sText1 )
	else
	{
		object.innerHTML = sText1;
	} // end else: if( object.innerHTML == sText1 )
} // end ToggleLinkText