var cheditorPath = "../"; var lightBoxCssPath = cheditorPath + "css/imageUtil.css"; var lightBoxIconPath = cheditorPath + "icons/imageutil/"; var lightBoxPath = cheditorPath + "utils/imageUtil.js"; function runLightbox() { var head = document.getElementsByTagName('head'); var css = head[0].appendChild(document.createElement('link')); css.setAttribute('type', 'text/css'); css.setAttribute('rel', 'stylesheet'); css.setAttribute('media', 'all'); css.setAttribute('href', lightBoxCssPath); hs.iconsPath = lightBoxIconPath; var img = document.images; var container = document.getElementById('lightbox-container'); if (typeof container == 'undefined') { return; } for (var i=0; i