span)) document.getElementById(current_span).removeAttribute('id');
            e.target.parentNode.setAttribute('id', current_li);
            li_name = e.target.childNodes[0].nodeValue;
            title_dir = e.target.title;

            ajaxSend('imgdr='+ title_dir, ajaxCallback);    // get data from php
          }
        }, false);
      }
    }

    // get images and register click to eack img, to acces window.parent.CKEDITOR.tools.callFunction()
    var img_all = imgs.querySelectorAll('img');
    v