According to this article Google Chrome 15 has a fullscreen JavaScript API.
I have tried to make it work but failed. I have also searched for official documentation
In Google's closure library project , there is a module which has do the job , below is the API and source code.
Closure library fullscreen.js API
Closure libray fullscreen.js Code