moved js code in footer.tpl for admin into footer.js