if (typeof(ZtAssistant) == "undefined") { function ZtAssistant(opts, htmlContainer, PSCtrl) { this.opts = opts; this.ztVPivotData; this.htmlContainer = htmlContainer; this.PSCtrl = PSCtrl; //PortalStudio Control this.helpsList = []; this.helpsPos = -1; this.helpElement = null; this.helpPSTooltip = null; this.helpActive = false; this._inId = LibJavascript.AlfaKeyGen(5); this.scroll = { left: 0, top: 0 }; window[this._inId] = this; this.EnableAssistant = function() { if (this.helpActive == false) { this.helpActive = true; this.ExecuteAssistant(); } else { this.RemoveAssistant(); this.helpActive = false; } } this.IsActive = function() { return this.helpActive; } this._isHidden = function(el) { return (el.offsetParent === null) } this.IsEmpty = function() { return this.helpsList.length == 0; } this.Next = function() { if (!this.helpActive) return; if(this.helpsList.length > 0 && (this.helpsPos+1) < this.helpsList.length ) { this.RemoveAssistant(); var lctrl = this.helpsList[this.helpsPos]; this.helpsPos++; var ctrl = this.helpsList[this.helpsPos]; if( lctrl && ctrl && (lctrl.page != ctrl.page) ) { if ( this.opts && this.opts.GoToPage ) { this.opts.GoToPage(ctrl.page+1); return; } } if(!lctrl && ctrl) { if ( this.opts && this.opts.GoToPage ) { this.opts.GoToPage(ctrl.page+1); return; } } var hele = document.getElementById(ctrl.htmlId); if ( hele == null || this._isHidden(hele) ) { this.Next(); return; } this.Execute(ctrl); } else { this.helpsPos = -1; this.RemoveAssistant(); } } this.Previous = function() { if (!this.helpActive) return; if(this.helpsList.length > 0 && (this.helpsPos-1) < this.helpsList.length && (this.helpsPos-1 >=0 )) { this.RemoveAssistant(); var lctrl = this.helpsList[this.helpsPos]; this.helpsPos--; var ctrl = this.helpsList[this.helpsPos]; if( lctrl && ctrl && (lctrl.page != ctrl.page) ) { if ( this.opts && this.opts.GoToPage ) { this.opts.GoToPage(ctrl.page+1); return; } } if(!lctrl && ctrl) { if ( this.opts && this.opts.GoToPage ) { this.opts.GoToPage(ctrl.page+1); return; } } var hele = document.getElementById(ctrl.htmlId); if ( hele == null || this._isHidden(hele) ) { this.Previous(); return; } this.Execute(ctrl); } else { this.helpsPos = -1; this.RemoveAssistant(); } } this.SetScroll = function( top, left ) { this.scroll.top = top; this.scroll.left = left; } this.Scroll = function( top, left ) { this.SetScroll(top, left) this.ContinueAssistant(); } this.Execute = function( _ctrlE ) { if (!this.helpActive) return; this.helpElement = document.getElementById(_ctrlE.htmlId); var c = this.helpElement; var o = this.helpsList[this.helpsPos]; if( o && o.cssClass != undefined ) { LibJavascript.CssClassNameUtils.addClass( this.helpElement, o.cssClass ); } else { LibJavascript.CssClassNameUtils.addClass( this.helpElement, 'pstooltiphelp' ); } if(c) { var html = '