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.webkitRequestFullScreen
    || el.mozRequestFullScreen
    || el.msRequestFullScreen;
    if(typeof rfs!="undefined" && rfs){;
    } else if(typeof window.ActiveXObject!="undefined"){
    // for Internet Explorer
       var wscript = new ActiveXObject("WScript.Shell");
       if (wscript!=null) {

My JavaScript code URL is here and site URL is this

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