added appCacheManager.js
added app cache event listeners
tweaked the scope
changed scope for the event handlers. They work correctly now.