            var tInterval = 5000; //1000 equals 1 second
            var tPausetime = 5000; //stop ms when icon is clicked
            var tTheatres = [];
            var tTimer,tCurrent=-1;
            var timgArray = new Array('1-','2-','3-','4-','5-');
            var ttimgArrayinternal = "var timgArrayinternal = new Array('" + timgArray.join("','") + "');";
            
                
            $(document).ready(function(){
                //$(document).pngFix(); 
                init();
                
            });
            
            function injectClick(){
            
                for(var i=0;i<timgArray.length;i++){
                   
                    var cImg = $("#click" + i + " img");
                    
                    cImg.attr("rollover",timgArray[i]);
                    cImg.attr("cID",i);
                    cImg.attr("src","images/" +  timgArray[i] + "off.gif");
                    
                    cImg.mouseover(function() {
                        this.setAttribute("src", "images/" + this.getAttribute("rollover") + "on.gif");
                    }).mouseout(function() {
                        this.setAttribute("src", "images/" +  this.getAttribute("rollover") + "off.gif");
                    });
                }
            }
            
            function imgClick(which){
                if(tCurrent == which) return;
                
                injectClick();
                window.clearInterval(tTimer);
                var cImg = $("#click" + which + " img");
                cImg.attr("src","images/" +  timgArray[which] + "on.gif");
                
                cImg.mouseover(function() {
                        this.setAttribute("src", "images/" + this.getAttribute("rollover") + "on.gif");
                    }).mouseout(function() {
                        this.setAttribute("src", "images/" +  this.getAttribute("rollover") + "on.gif");
                    });
                slideft(tCurrent,which);
                tCurrent = which;
                tTimer = window.setTimeout("slideTimer()",tPausetime);
            }
            
            function resumeTimer(){
               tTimer = window.setTimeout('',tInterval);
            }
            
            function init(){
                tTheatres = $(".banner ._slide");
                tTheatres.each(function(t,item ){
                   $("#"+item.getAttribute("id")).hide();
                   var offsets = $("#banner").offset();
                   $("#"+item.getAttribute("id")).attr("style","position:absolute;display:none;");
                    });
               
               $(".banner ._slide:first").fadeIn("medium");
               $("#click0 img").attr("src", "images/" + timgArray[0]+"on.gif" );
               injectClick(0);
               slideft(tTheatres.length,0);
               
               tTimer = window.setTimeout('slideTimer()',tInterval);
            }
            
            function slideTimer(){
                   
                   tCurrent++;
                   
                    var tPrevious = tCurrent-1;
    
                     if(tPrevious == -1){tPrevious = tTheatres.length-1;};
    
                     if(tCurrent == tTheatres.length){
                     tCurrent = 0;
                     }
                   injectClick();
                   slideft(tPrevious,tCurrent);
                   tTimer = window.setTimeout('slideTimer()',tInterval);
            }
            
            function slideft(from,to)
            {
                //console.debug(from + ":" + to);
                $("#click" + from + " img").attr("src", "images/" + timgArray[from]+"off.gif" );
                $("#click" + to + " img").attr("src", "images/" + timgArray[to]+"on.gif" );
                $("#banner0"+from).fadeOut("medium");
                $("#banner0"+to).fadeIn("medium");
            }
            
            function slideto(to){
                tTimer.stop();
                slideft(tCurrent,to);
            }
