Vn.Visits = new Class ({ Extends: Vn.Form ,activate: function () { this.$('date-to').value = new Date (); this.$('num-sessions').func = this.sessionsFunc; this.onSessionsClick (); } ,showStep: function (stepId) { if (this.currentStep) this.currentStep.style.display = 'none'; this.currentStep = this.$(stepId); this.currentStep.style.display = 'inline'; } ,onRefreshClick: function () { this.model.refresh (); } ,onSessionsClick: function () { this.showStep ('sessions-step'); this.model = this.$('sessions'); } ,onVisitsClick: function () { this.showStep ('visits-step'); this.model = this.$('visits'); } ,sessionsFunc: function () { return 1; } });