images_rotator = { images:null, timeout:null, time:5000, currentIndex:-1, autoStart:false, initialize:function() { this.images = new Array(); }, add:function(cmsImage){ this.images.push(cmsImage); }, start:function(){ window.clearTimeout(this.timeout); this.showNext(); }, stop:function(){ window.clearTimeout(this.timeout); }, showNext:function(){ var index = this.currentIndex + 1; if(index > (this.images.length - 1)) index = 0; bgManager.show(this.images[index]); this.currentIndex = index; this.timeout = window.setTimeout('images_rotator.showNext();', this.time); } }; images_rotator.initialize(); $(function(){ if(images_rotator.images.length != 0 && images_rotator.autoStart) images_rotator.start(); }); $(function(){ if(images_rotator) images_rotator.start(); mainMenu.close(true); mainMenu.setMouseSentitivity(true); }); 
