Added version 3, with embedded javascript (just alerts)