Took javascript function calls out of html