Updated function.js

*Deleted garbage code.
*UTF-8 encoding for supporting multiple languages.