// capture window keypress events
if ( !is.ie ) {
  	window.captureEvents(Event.KEYPRESS);
}

// check for page button clicks
if (is.ie) {
  	document.onkeypress = handleKeyPress;
} else {
  	window.onKeyPress = handleKeyPress;
}	

// Handle key press
function handleKeyPress(evnt) {
  	var iKeyCode;
  	if (!is.ie) {
  		iKeyCode = evnt.which;
  	} else {		
  		iKeyCode = event.keyCode;
  	}
  	
  	if (iKeyCode == 13) {
  		if (is.ie) {
			var src = window.event.srcElement;
			if (src.eventControl != null) {
				var myForm = document.forms[0];
				myForm.elements.item(src.eventControl).focus();
				myForm.elements.item(src.eventControl).click();
			}
		} else {
			if (evnt.target.getAttribute('eventControl') != null) {
				document.getElementById(evnt.target.getAttribute('eventControl')).focus();
				document.getElementById(evnt.target.getAttribute('eventControl')).click();
			}
  		}
  	}
}
