// Get the Sidebar
var mySidebar = document.getElementById("mySidebar");
var overlayBg = document.getElementById("myOverlay");
function w3_open() {
  if (mySidebar.style.display === 'block') {
    mySidebar.style.display = 'none';
    overlayBg.style.display = "none";
  } else {
    mySidebar.style.display = 'block';
    overlayBg.style.display = "block";
  }
}
function w3_close() {
  mySidebar.style.display = "none";
  overlayBg.style.display = "none";
}
function accesform() {
  var x = document.getElementById("accesform");
  if (x.className.indexOf("w3-show") == -1) {  
    x.className += " w3-show";
  } else { 
    x.className = x.className.replace(" w3-show", "");
  }
}
function subCategorii() {
  var x = document.getElementById("subCategorii");
  if (x.className.indexOf("w3-show") == -1) {  
    x.className += " w3-show";
  } else { 
    x.className = x.className.replace(" w3-show", "");
  }
}
window.onscroll = function() {myFunction()};
var navbar = document.getElementById("navbar");
var sticky = navbar.offsetTop;
function myFunction() {
  if (window.pageYOffset >= sticky) {
    navbar.classList.add("w3-top")
  } else {
    navbar.classList.remove("w3-top");
  }
}

$(function() {
    $('#checkTenable').click(function() {
        if ($(this).is(':checked')) {
            $('#checkGenable').removeAttr('disabled');
        } else {
            $('#checkGenable').attr('disabled', 'disabled');
            $('#ischeckenable').attr('disabled', 'disabled');
        }
    });
    
    $('#checkGenable').click(function() {
        if ($(this).is(':checked')) {
            $('#ischeckenable').removeAttr('disabled');
        } else {
            $('#ischeckenable').attr('disabled', 'disabled');
        }
    });
});

function onClick(element) {
  document.getElementById("img01").src = element.src;
  document.getElementById("modal01").style.display = "block";
}