Final javascript.js

All elements work now.