﻿// JScript File

/***
* Function to click the correct button when the enter key is pressed
***/
function doClick(buttonName,e) {
    var key;

    //Handle IE and FF
    if(window.event) {
       
        key = window.event.keyCode;
    } else {
        key = e.which;
    }
    
    if (key == 13) {
        //Get the button the user wants to have clicked
        var btn = document.getElementById(buttonName);
        if (btn != null) {
            btn.click();
            event.keyCode = 0;
        }
    }
    
}// end doClick()


