
var isIE;
var fillName; 
if (navigator.appName == "Microsoft Internet Explorer"){isIE = true;}

function CallisEnter(buttonName)
{ 
	//Capture Netscape events 
	if(!isIE)
	{
		document.captureEvents (Event.KEYDOWN);
	}
	fillName = buttonName;

	document.onkeydown = isEnter
}

function isEnter(evt)
{
	var theButtonPressed;
	if (isIE)
	{
		theButtonPressed = window.event.keyCode;
	}
	else
	{
		theButtonPressed = evt.which;
	}
	if (theButtonPressed == 13)
	{
		// 'textarea' fields simply disable the Submit event by sending 'disableSubmit'
		// all others click the button 'fillName'
		if(fillName != "disableSubmit")
		{
			if(isIE)
			{
				with(event)
				{
					cancelBubble = true;
					returnValue = false;
				}
			}
			document.getElementById(fillName).click();		
		}
	}
}
