Reworked for future window alert/confirm/prompt functions, with fallback for webOS 1-3.x for alert, and console error messages saying confirm and prompt aren't supported on old devices.