<!--
// This file adds onsubmit-like functionality to Netscape Navigator form processing
// Specifically, it catches "Enter" key presses.
//
// !!Be sure to set "_szFormStr" to the form name to hook!!
//
// This file REQUIRES the version.js file to have been already included.
//
var _szFormStr = "";

function HookKey(evt)
{
	if (is_nav && is_nav4up)
	{
		var keyChar = evt.which; 
        
		if (keyChar == '13')		// Enter/Return key??
		{
			if (validate("string", _szFormStr))  // not empty??
			{
				var _oFormObj = eval(_szFormStr);
			
				if (checkform(_oFormObj))
					_oFormObj.submit();
			}
			
			routeEvent(evt);
		}
	}
}


// immediate execution code to capture keys on Nav.
function HookForm()
{
	if (is_nav && is_nav4up)
	{
		window.captureEvents(Event.KEYPRESS);
		window.onkeypress = HookKey;
	}
}
//-->
