response.match(/ERROR from PHP:/))  imgs.innerHTML = '<h2>'+ content +'</h2>';
  else {
    // add new menu in current clicked list
    if(document.getElementById(current_li)) document.getElementById(current_li).innerHTML = '<span title="'+ title_dir +'" id="'+ current_span +'">'+ li_name +'</span>'+ content.menu;
    imgs.innerHTML = content.imgs;
    regEv();
  }
}

// to register events
function regEv() {
  if(document.getElementById('menu')) {
    // get menu LIs
    var lists = document.getElementById(