function showErrorMessage(id, message) {
    var element = document.getElementById(id);
    element.innerHTML = message;
    element.style.display = 'block'; 
    setTimeout(function() {
        element.style.display = 'none';
    }, 3000);
}
/**
*   Function that displays an error message that will dissapear after 3 seconds. 
* @param: id - the id of the element where the message will be dispalyed
* @param: message - the error message that will be displayed
*/
Function that displays an error message that will dissapear after 3 seconds.
Function that displays an error message that will dissapear after 3 seconds .
function showErrorMessage(id, message) {
    var element = document.getElementById(id);
    element.innerHTML = message;
    element.style.display = 'block'; 
    setTimeout(function() {
        element.style.display = 'none';
    }, 3000);
}
function showErrorMessage ( id , message ) { var element = document . getElementById ( id ) ; element . innerHTML = message ; element . style . display = 'block' ; setTimeout ( function ( ) { element . style . display = 'none' ; } , 3000 ) ; }
Function that displays an error message that will dissapear after 3 seconds.
Function that displays an error message that will dissapear after 3 seconds .