created show message function
changed showmessage function to use div instead of alert boxes
hide messages when no longer relevant
improved styling of message div