Ummm...alerts are considered obsolete and bad form and shouldn't be used except maybe for debugging.
Reason: Some browsers no allow users to turn them off. And almost surely all browsers will soon follow suit.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.