moving some javascript to js file.
Merge branch 'master' of https://github.com/guanzo/CHCYF