How to do a Full screen (F11 Function) javascript toggle

I have this code for full screen but it is not setting the height and width to 100% and it is not toggling –

function switchToFullScreen() {
    var el = document.documentElement
    ,rfs = // for newer Webkit and Firefox
    el.requestFullScreen
    || el.webkitRequestFullScreen
    || el.mozRequestFullScreen
    || el.msRequestFullScreen;
    if(typeof rfs!="undefined" && rfs){
       rfs.call(el);
    } else if(typeof window.ActiveXObject!="undefined"){
    // for Internet Explorer
       var wscript = new ActiveXObject("WScript.Shell");
       if (wscript!=null) {
           wscript.SendKeys("{F11}");
        }

My JavaScript code URL is here and site URL is this

You can notice on site when clicking on the full screen icon