function openTab(tabName,elmnt,color) {
  
  var i, tabcontent, tablinks;
  tabcontent = document.getElementsByClassName("tabcontent");
  
  for (i = 0; i < tabcontent.length; i++) {
    tabcontent[i].style.display = "none";
  }
  tablinks = document.getElementsByClassName("tablink");
  for (i = 0; i < tablinks.length; i++) {
    tablinks[i].style.backgroundColor = "";
  }
  document.getElementById(tabName).style.display = "block";
  elmnt.style.backgroundColor = color;
  
//   elmnt.setAttribute("id", tabName);
// tabNameG=tabName;
}
document.addEventListener("DOMContentLoaded", function(event) {
  
  // alert(tabNameG );
  // document.getElementById(tabNameG).click()
    document.getElementById("defaultOpen").click();
 });
// // Get the element with id="defaultOpen" and click on it

function enableDisable($id,$class) {

  var checkBox = document.getElementById($id);

  // document.getElementById("logingpower_loginpage_bgimg").disabled=false;
  var fields = document.getElementsByClassName($class);

  if (checkBox.checked == true){
    for (let i = 0; i < fields.length; i++) {
      fields[i].disabled=false;;
    }
    // document.getElementsByClassName("page_enabled")[0].disabled=false;
    // // document.getElementsByClassName("page_enabled")[1].disabled=false;
    // document.getElementsByClassName("page_enabled")[2].disabled=false;
    // document.getElementsByClassName("page_enabled")[3].disabled=false;
    // document.getElementsByClassName("page_enabled")[4].disabled=false;
    // text.style.disabled=true ;
  } else {
    for (let i = 0; i < fields.length; i++) {
      fields[i].disabled=true;;
    }
    // document.getElementsByClassName("page_enabled")[0].disabled=true;
    // // document.getElementsByClassName("page_enabled")[1].disabled=true;
    // document.getElementsByClassName("page_enabled")[2].disabled=true;
    // document.getElementsByClassName("page_enabled")[3].disabled=true;
    // document.getElementsByClassName("page_enabled")[3].disabled=true;

     // text.style.disabled=false;
  }
}


