Update script.js

merged showSuccess() and showFailure() into showMessage adding a second param for the class attribute