﻿//DESCRIPTION 
//--------------------------------------------------
//Submits a form when the enterkey is pressed in the 
//control which has this function attached to its
//onkeypress event.
//
//PARAMETERS 
//--------------------------------------------------
//element	-	The element that should execute its
//				click event when Enter is hit
function submitOnEnterKey(elementID) 
{    
    if (event.keyCode == 13) 
    {        		
        event.cancelBubble = true;
        event.returnValue = false;
		
        //execute the click event of specified element
        document.getElementById(elementID).click(); 
    }
}


