window.onload = function() {
    option = 1;
}

function changeOption(id) {
    hideall();
    
    switch (id) {
        case 1:
          show("opt_vollic_off");
          show("opt_hosted");
          show("opt_inabox");
          show("opt_preinstall");
          document.getElementById("cb1").className = "selected";
          document.getElementById("cb2").className = "centretab";
          document.getElementById("cb3").className = "righttab";
        break;
        case 2:
          show("opt_vollic");
          show("opt_hosted");
          show("opt_inabox");
          show("opt_preinstall");
          document.getElementById("cb1").className = "lefttab";
          document.getElementById("cb2").className = "selected centretab";
          document.getElementById("cb3").className = "righttab";
        break;
        case 3:
          show("opt_vollic");
          show("opt_hosted");
          show("opt_inabox_off");
          show("opt_preinstall_off");        
          document.getElementById("cb1").className = "lefttab";
          document.getElementById("cb2").className = "centretab";
          document.getElementById("cb3").className = "selected";
        break;
        default:
        break;
    }
}

function hideall() {
    hide("opt_vollic");
    hide("opt_hosted");
    hide("opt_inabox");
    hide("opt_preinstall");
    hide("opt_vollic_off");
    hide("opt_hosted_off");
    hide("opt_inabox_off");
    hide("opt_preinstall_off");
}

function show(id) {
    if (document.getElementById(id).style.display == 'none') {
        document.getElementById(id).style.display = 'block';
    }
}

function hide(id) {
    if (document.getElementById(id).style.display != 'none') {
        document.getElementById(id).style.display = 'none';
    }
}