/******************************************************************************
*	client.js
*
*	Contains application client-side script for the SafeKids Web.
*
******************************************************************************/

// ControlKeyPress(field, e, btnId)
//	Took basic functionality of the old method, but tried to 
//	better handle the scripting DOM.
function AACCKeyPress(field, e, btnId)
{
	var keycode;
	var btn;

	if (!window.event && !e)	// just exit here
		return true;

	if (window.event)	// ie-type event capable
		keycode = window.event.keyCode;
	else
		keycode = e.which;

	if (keycode == 13)
	{
		// this is how we check for newer browser...
		if (document.getElementById)
		{
			btn = document.getElementById(btnId);

			if (btn)
			{
				btn.click();
				return false;
			}
		}
		else
		{
			// if we care about ns4, then change
			// this else clause to handle it.
		}
	}

	return true;
}

function popUp(URL)
{
	day=new Date();
	id=day.getTime();
	eval("page"+id+"=window.open(URL,'"+id+"');");
}

