///
/// Ensure that the correct submit button / link is fired with the enter key press 
/// - similar code in the header control
/// 
function stopEnterEvent()
{	

		var myActiveElement = document.activeElement;
		var activeElement = myActiveElement.id.toString();
		
		//alert(activeElement);
		var allowSubmit;
		
		if( activeElement == "Header1_btnSearch" )
		{
			allowSubmit = true;
		}
		else if ( activeElement == "header1_btnSearch" )
		{
			allowSubmit = true;
		}
		else
		{
			allowSubmit = false;
		}
			
			// DisAllow / Allow submit 
			if ( event.keyCode == 13 && !allowSubmit )
			{
			     window.event.returnValue = false;
			}
			else
			{
				window.event.returnValue = true;
			}		
}

// NOTE: FinalSalaryCalculator.js and GrowthPlanCalculator.js contain  
// stopEnterEvent() functions that check the button or link with focus and
// allow / disallow submit

