First revision

Added a list to define the alert boundaries at the beginning of script.
Added some basic error checking.