        //<!--
        // change speed of slide here
        var slide_in_speed = 600;  // millisecond duration of slide into view
        var slide_out_speed = 600;// millisecond duration of slide out of view
        var glideLyrs = new Array();
        var activeId = 1;
        var lastId = "";
        var max = 10; //CHILDNODES
        var stop = 0;
        var first = 1;
        var autoCycleTime = 5000;

        function initGlideLayers() {
          
          max = $("#glider > div").size()
            
        
          
          // arguments: id, left=0 (offset calculated based on width), top
          for(i = 1; i <= max; i++){
            glideLyrs[i] = new dynObj('glideDiv'+i, 560, 0);
          }
    
          for (var i=1; glideLyrs[i]; i++) {
                // hold original left position
                if(i != 0){
                    glideLyrs[i].xOff = 560;
                } else {
                    glideLyrs[i].xOff = 0;
                }
          }
          glideLyrs[1].shiftTo( 1, null, slide_in_speed, -1);
          
          if(1 < max ){
            setTimeout('autoMagic()', autoCycleTime);
          }
        }
    
        function autoMagic(){

            if(stop != 1)
            {
                moverId = activeId+1;
                if(moverId > max){
                    moverId = 1;
                }
                if(moverId < 1){
                    moverId = max;
                }

                slide(moverId);
             
                document.getElementById("btnPlay").style.display = "none";
                document.getElementById("btnStop").style.display = "inline";
              
                setTimeout('autoMagic()', autoCycleTime);
            }else{
                document.getElementById("btnStop").style.display = "none";
                document.getElementById("btnPlay").style.display = "inline";
            }
        }
    
        function slide(id) {
            var oldLyr, newLyr;
            newLyr = dynObj.getInstance('glideDiv'+id);
            newLyr.slideTo(1, null, slide_in_speed, -1);
            oldLyr = dynObj.getInstance('glideDiv'+activeId);
            oldLyr.slideTo(-560, null, slide_out_speed, -1);
            oldLyr.onSlideEnd = function() {
                  oldLyr.shiftTo(560, 0);
                  this.onSlideEnd = function() { if (this.el) this.el = null }
            }
            activeId = id;
        }
        
        function movNext()
        {
            if (activeId < max) {
                slideSingle(activeId+1);  
            } else {
                slideSingle(1);  
            }
        }
        
        function movBack()
        {
            if (activeId > 1) {
                slideSingle(activeId-1);  
            } else {
                slideSingle(max-1);  
            }
        }
        
        function slideSingle(id) {
            var oldLyr, newLyr;
            newLyr = dynObj.getInstance('glideDiv'+id);
            oldLyr = dynObj.getInstance('glideDiv'+activeId);
            if(activeId > id){
                newLyr.shiftTo(-560, 0);
                newLyr.slideTo(1, null, slide_in_speed, -1);
                oldLyr.slideTo(560, null, slide_out_speed, -1);
                oldLyr.onSlideEnd = function() {
                    oldLyr.shiftTo(560, 0);
                    this.onSlideEnd = function() { if (this.el) this.el = null }
                }
            }else if(activeId < id){
                newLyr.shiftTo(560, 0);
                newLyr.slideTo(1, null, slide_in_speed, -1);
                oldLyr.slideTo(-560, null, slide_out_speed, -1);
                oldLyr.onSlideEnd = function() {
                    oldLyr.shiftTo(-560, 0);
                    this.onSlideEnd = function() { if (this.el) this.el = null }
                }
            }
            
            activeId = id;
        }
