moved sample javascript from demo.php to js/main.js