function getElementsByClass(searchClass, node, tag) { var classElements = new Array(); node==null ? node = document : node = document.getElementById(node); if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } function initGalery(){ hs.graphicsDir = 'js/highslide/graphics/'; hs.align = 'center'; hs.transitions = ['expand', 'crossfade']; hs.fadeInOut = true; hs.dimmingOpacity = 0.8; //hs.outlineType = 'rounded-white'; hs.captionEval = 'this.thumb.alt'; hs.marginBottom = 105 // make room for the thumbstrip and the controls hs.numberPosition = 'caption'; // Add the slideshow providing the controlbar and the thumbstrip hs.addSlideshow({ //slideshowGroup: 'group1', interval: 5000, repeat: false, useControls: true, overlayOptions: { className: 'text-controls', position: 'bottom center', relativeTo: 'viewport', offsetY: -60 }, thumbstrip: { position: 'bottom center', mode: 'horizontal', relativeTo: 'viewport' } }); // Add the simple close button hs.registerOverlay({ html: '
', position: 'top right', fade: 2 // fading the semi-transparent overlay looks bad in IE }); var images = getElementsByClass('Galery', 'content', 'a'); //alert(images.length); for(i=0; i