Upgrade API for newer browsers

Upgraded fullscreen api to work in newer safari versions also updated "document.cancelFullscreen" to newer api "exitFullscreen". Code still works in older versions of firefox which still use cancelFullscreen.