ar nr_img_all = img_all.length;

    // register click to eack span-li
    if(nr_img_all > 0) {
      for(var i=0; i<nr_img_all; i++) {
        img_all[i].addEventListener('click', function(e){
          if(CKEditorFuncNum !== null) window.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum, e.target.src);
          window.close();
        }, false);
      }
    }
  }
}

ajaxSend('', ajaxCallback);    // get data from php
// ]]>
</script>
</body>
</html>