/*	forms.js
	A collection of generic methods for making life with forms easier.
	May (and will often) include methods that exist because of browser bugs,
	and we will eventually want to better organize those.
*/

// IE-style only, since FireFox doesnt need "help" and just ignores this. gleaned from: http://www.thefutureoftheweb.com/blog/submit-a-form-in-ie-with-enter
// note: we USED to have the OPPOSITE problem - IE worked fine, NN needed help.  Now we dont and no one was using this method, so it has changed.
function FormSubmitOnEnter( event, form )
{
	// note: this is IE style, but FF doesnt complain so..
	if( event && event.keyCode == 13 )
	{
		form.submit();
		return false;
	}
	else
	{
		return true;
	}
}

// typically used in <body onload=> for page auto-focusing
function FormSetFocus( fieldID )
{
	element = document.getElementById( fieldID );
	if( element )
		element.focus();
}
