removed another frowny face; moved window timeout on error to showAlert() function