added js-code to new file compareManager.js