
	/*
	
	find forms that have more than one submit button, and try to set the keypress 
	event on the text box to hook up to the submit button.
	
	*/
	var _frms = document.getElementsByTagName("form");
	for (var i=0; i<_frms.length; i++)
	{
		var _frm = _frms[i];
		
		var _txt = [];
		var _sub = [];
		var __inps = _frm.getElementsByTagName("input");
		
		for (var j=0; j<__inps.length; j++)
		{
			if (__inps[j].type == "text")
				_txt.push(__inps[j]);
			
			if (__inps[j].type == "submit" && __inps[j].className == "go")
				_sub.push(__inps[j]);
		}
		
		
		if (_txt.length == _sub.length)
		{
			 for (var j=0; j<_txt.length;j++)
			 {
				var txt = _txt[j];
				txt.target=_sub[j];
				
				txt.onkeydown =  function (e)
				{
					if (!e)
					{
						e=event;
					}
					
					if ( e.keyCode == 13)
					{
						this.target.click();
					}
				}
			 }
		}
	}