﻿// JScript File
Type.registerNamespace('Custom.UI');
var x;
Custom.UI.AutoCompleteBehavior = function Sys$UI$AutoCompleteBehavior(element) {
    /// <param name="element" type="Sys.UI.DomElement"></param>
    var e = Function._validateParams(arguments, [
        {name: "element", domElement: true}
    ]);
    if (e) throw e;

    Custom.UI.AutoCompleteBehavior.initializeBase(this, [element]);
}

    function Sys$UI$AutoCompleteBehavior$get_completionInterval() {
        /// <value type="Number"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._completionInterval;
    }
    function Sys$UI$AutoCompleteBehavior$set_completionInterval(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: Number}]);
        if (e) throw e;

        this._completionInterval = value;
    }

    function Sys$UI$AutoCompleteBehavior$get_completionList() {
        /// <value type="Sys.UI.DomElement"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._completionListElement;
    }
    function Sys$UI$AutoCompleteBehavior$set_completionList(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: Sys.UI.DomElement}]);
        if (e) throw e;

        this._completionListElement = value;
    }

    function Sys$UI$AutoCompleteBehavior$get_completionSetCount() {
        /// <value type="Number"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._completionSetCount;
    }
    function Sys$UI$AutoCompleteBehavior$set_completionSetCount(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: Number}]);
        if (e) throw e;

        this._completionSetCount = value;
    }

    function Sys$UI$AutoCompleteBehavior$get_minimumPrefixLength() {
        /// <value type="Number"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._minimumPrefixLength;
    }
    function Sys$UI$AutoCompleteBehavior$set_minimumPrefixLength(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: Number}]);
        if (e) throw e;

        this._minimumPrefixLength = value;
    }
    
    function Sys$UI$AutoCompleteBehavior$get_noMinimumPrefix() {
        /// <value type="Boolean"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._noMinimumPrefix;
    }
    function Sys$UI$AutoCompleteBehavior$set_noMinimumPrefix(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]);
        if (e) throw e;

        this._noMinimumPrefix = value;
    }
    
    function Sys$UI$AutoCompleteBehavior$get_separatorChar() {
        /// <value type="String"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._separatorChar;
    }
    function Sys$UI$AutoCompleteBehavior$set_separatorChar(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: String}]);
        if (e) throw e;

        this._separatorChar = value;
    }
    
    function Sys$UI$AutoCompleteBehavior$get_cssList(){
         /// <value type="String"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._cssList;
    }
    function Sys$UI$AutoCompleteBehavior$set_cssList(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: String}]);
        if (e) throw e;

        this._cssList = value;
    }
    
    function Sys$UI$AutoCompleteBehavior$get_cssItem(){
         /// <value type="String"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._cssItem;
    }
    function Sys$UI$AutoCompleteBehavior$set_cssItem(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: String}]);
        if (e) throw e;

        this._cssItem = value;
    }
    
    function Sys$UI$AutoCompleteBehavior$get_cssHoverItem(){
         /// <value type="String"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._cssHoverItem;
    }
    function Sys$UI$AutoCompleteBehavior$set_cssHoverItem(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: String}]);
        if (e) throw e;

        this._cssHoverItem = value;
    }
    

    function Sys$UI$AutoCompleteBehavior$get_serviceMethod() {
        /// <value type="String"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._serviceMethod;
    }
    function Sys$UI$AutoCompleteBehavior$set_serviceMethod(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: String}]);
        if (e) throw e;

        this._serviceMethod = value;
    }

    function Sys$UI$AutoCompleteBehavior$get_serviceURL() {
        /// <value type="String"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._serviceURL;
    }
    function Sys$UI$AutoCompleteBehavior$set_serviceURL(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: String}]);
        if (e) throw e;

        this._serviceURL = value;
    }

    function Sys$UI$AutoCompleteBehavior$get_enableCaching() {
        /// <value type="Boolean"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return this._enableCaching;
    }
    function Sys$UI$AutoCompleteBehavior$set_enableCaching(value) {
        var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]);
        if (e) throw e;

        this._enableCaching = value;
    }


    function Sys$UI$AutoCompleteBehavior$_get_path() {
        return this.get_serviceURL();
    }

    function Sys$UI$AutoCompleteBehavior$get_timeout() {
        /// <value type="Number"></value>
        if (arguments.length !== 0) throw Error.parameterCount();
        return 0;
    }

    function Sys$UI$AutoCompleteBehavior$dispose() {
        if(!this._timer) { Custom.UI.AutoCompleteBehavior.callBaseMethod(this, 'dispose'); return; }
        
        this._timer = null;

        var element = this.get_element();
        $removeHandler(element, "focus", this._focusHandler);
        $removeHandler(element, "blur", this._blurHandler);
        $removeHandler(element, "keydown", this._keyDownHandler);
        $removeHandler(this._completionListElement, 'mousedown', this._mouseDownHandler);
        $removeHandler(this._completionListElement, 'mouseup', this._mouseUpHandler);
        $removeHandler(this._completionListElement, 'mouseover', this._mouseOverHandler);
        
        this._tickHandler = null;
        this._focusHandler = null;
        this._blurHandler = null;
        this._keyDownHandler = null;
        this._mouseDownHandler = null;
        this._mouseUpHandler = null;
        this._mouseOverHandler = null;
        
        Custom.UI.AutoCompleteBehavior.callBaseMethod(this, 'dispose');
    }

    function Sys$UI$AutoCompleteBehavior$initializeTimer(timer) {
        timer.set_interval(this._completionInterval);
        timer.add_tick(this._tickHandler);
    }

    function Sys$UI$AutoCompleteBehavior$initializeTextBox(element) {
        element.autocomplete = "off";
        $addHandler(element, "focus", this._focusHandler);
        $addHandler(element, "blur", this._blurHandler);
        $addHandler(element, "keydown", this._keyDownHandler);
    }

    function Sys$UI$AutoCompleteBehavior$initializeCompletionList(element) {
        var completionListStyle = element.style;
        if ( this._cssList != '' ) 
        {
            this._completionListElement.className = this._cssList;
        } 
        else
        {
             completionListStyle.backgroundColor = 'window';
            completionListStyle.color = 'windowtext';
            completionListStyle.border = 'solid 1px buttonshadow';
            completionListStyle.cursor = 'default';
        }
        completionListStyle.visibility = 'hidden';       
        completionListStyle.unselectable = 'unselectable';
        completionListStyle.overflow = 'hidden';
        var elementBounds = Sys.UI.DomElement.getBounds(this.get_element());        
        //completionListStyle.width = (elementBounds.width - 2) + 'px';
        completionListStyle.width="230px";
        $addHandler(element, "mousedown", this._mouseDownHandler);
        $addHandler(element, "mouseup", this._mouseUpHandler);
        $addHandler(element, "mouseover", this._mouseOverHandler);
    }

    function Sys$UI$AutoCompleteBehavior$initialize() {
        Custom.UI.AutoCompleteBehavior.callBaseMethod(this, 'initialize');

        this._tickHandler = Function.createDelegate(this, this._onTimerTick);
        this._focusHandler = Function.createDelegate(this, this._onGotFocus);
        this._blurHandler = Function.createDelegate(this, this._onLostFocus);
        this._keyDownHandler = Function.createDelegate(this, this._onKeyDown);
        this._mouseDownHandler = Function.createDelegate(this, this._onListMouseDown);
        this._mouseUpHandler = Function.createDelegate(this, this._onListMouseUp);
        this._mouseOverHandler = Function.createDelegate(this, this._onListMouseOver);
        
        this._timer = new Sys.Timer();
        this.initializeTimer(this._timer);
        
        var element = this.get_element();
        this.initializeTextBox(element);
                
        if (!this._completionListElement) {
            this._completionListElement = document.createElement('DIV');
            document.body.appendChild(this._completionListElement);
        }
        
        this.initializeCompletionList(this._completionListElement);
        
        var popupControl = new Sys.UI.Control(this._completionListElement);
        this._popupBehavior = new AjaxControlToolkit.PopupBehavior(this._completionListElement);
        this._popupBehavior.set_parentElement(element);
        this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.BottomLeft);
        this._popupBehavior.initialize();
        popupControl.initialize();
    }

    function Sys$UI$AutoCompleteBehavior$_hideCompletionList() {
        this._popupBehavior.hide();
        this._completionListElement.innerHTML = '';
        this._selectIndex = -1;
    }

    function Sys$UI$AutoCompleteBehavior$_highlightItem(item) {
        /// <param name="item"></param>
        var e = Function._validateParams(arguments, [
            {name: "item"}
        ]);
        if (e) throw e;        
        var children = this._completionListElement.childNodes;
        
        for (var i = 0; i < children.length; i++) {
            var child = children[i];
            if (child !== item) {
                child.style.backgroundColor = 'window';
                child.style.color = 'windowtext';
            }
           else 
                _selectIndex=i;//set selected index on mouse over of completion list.
        }
        item.style.backgroundColor = 'highlight';
        item.style.color = 'highlighttext';
    }

    function Sys$UI$AutoCompleteBehavior$_onListMouseDown(ev) {   
        if (ev.target !== this._completionListElement) {                  
            if(navigator.appName=="Netscape")
            {
                if(_selectIndex===0)
                    this._setText(x);
                else
                    this._setText(this._completionListElement.childNodes[_selectIndex].innerHTML);
            }
             else
                this._setText(this._completionListElement.childNodes[_selectIndex].innerText);
        }
    }

    function Sys$UI$AutoCompleteBehavior$_onListMouseUp(ev) {
        this.get_element().focus();
    }

    function Sys$UI$AutoCompleteBehavior$_onListMouseOver(ev) {
        var item = ev.target;
        this._selectIndex = -1;
        this._highlightItem(item);
    }

    function Sys$UI$AutoCompleteBehavior$_onGotFocus(ev) {
        this._timer.set_enabled(true);
    }

    function Sys$UI$AutoCompleteBehavior$_onKeyDown(ev) {    
        var k = ev.keyCode ? ev.keyCode : ev.rawEvent.keyCode;
        if (k === Sys.UI.Key.esc) {
            this._hideCompletionList();
            ev.preventDefault();
        }
        else if (k === Sys.UI.Key.up) {
            if (this._selectIndex > 0) {
                this._selectIndex--;
                this._highlightItem(this._completionListElement.childNodes[this._selectIndex]);
                ev.preventDefault();
            }
        }
        else if (k === Sys.UI.Key.down) {        
            if (this._selectIndex < (this._completionListElement.childNodes.length - 1)) {
                this._selectIndex++;              
                this._highlightItem(this._completionListElement.childNodes[this._selectIndex]);
                ev.preventDefault();
            }
        }
        else if (k === Sys.UI.Key["enter"] || k===9) {                                
            if (this._selectIndex !== -1) { 
                if(location.href.indexOf('/Presentation/')>=1)
                {
                    if(document.getElementById("txtTags")==null)
                    {
                        this._hideCompletionList();
                        return;
                    }
                }           
                if(this.get_element().value!=null)
                {
                    if(this.get_element().value.length>0)
                    {                    
                        if(this._completionListElement.childNodes.length>0)
                        {    
                            if(this._selectIndex===0)                        
                                this._setText(x);//to solve firefox problem.                   
                            else
                                this._setText(this._completionListElement.childNodes[this._selectIndex].innerHTML);
                        }
                        else
                        {
                             ev.preventDefault();
                             return;
                        }
                    }
                }                         
                ev.preventDefault();               
                return;
            }
             else//Added by dipti to select the 1st item on pressing enter key.
            {             
               if(this._completionListElement.childNodes.length>0)
               {  
                 this._setText(this._completionListElement.childNodes[0].innerText);                
                 ev.preventDefault();
               }
            }                                          
             if(k === Sys.UI.Key["enter"])
             {
                 if(location.href.indexOf('/Presentation/')>=1)
                 {
                    if (navigator.appName == 'Microsoft Internet Explorer' && k === Sys.UI.Key["enter"])
                        document.getElementById("btnSubmitTagsIE").click();                   
                    else if(navigator.appName == 'Netscape' && k === Sys.UI.Key["enter"])               
                        document.getElementById("btnSubmitTagsFireFox").click();    
                 }   
                 
                 try
                 {          
//                 if(location.href.indexOf('Upload-Presentation')>=1)
//                     document.getElementById("imgUploadButton").click();
                  }
                  catch(ex)
                  {
                    //alert(ex);
                  }   
             }       
        }       
        if (k !== Sys.UI.Key.tab) {
            this._timer.set_enabled(true);
            }       
    }

    function Sys$UI$AutoCompleteBehavior$_onLostFocus() {
        this._timer.set_enabled(false);
        this._hideCompletionList();
    }

    function Sys$UI$AutoCompleteBehavior$_onMethodComplete(result, context, methodName) {
        this._update(context, result,  true);
    }
    function Sys$UI$AutoCompleteBehavior$_onMethodFailed(err, response, context) {
            }

    function Sys$UI$AutoCompleteBehavior$_onTimerTick(sender, eventArgs) {
        if (this._serviceURL && this._serviceMethod) {
            var sep='';
            var sep1='';
            var sep2='';
             if(location.href.indexOf('/Presentation/')>=1)
                {
                    //to prevent javascript error if previous postback is not completed.
                    if(document.getElementById("divInsertTags").style.display=='none')                                      
                        return;                                                          
                } 
             if( this.get_element()==null)
                    return; 
             var text = this.get_element().value;
             sep1=text.lastIndexOf(";");           
             sep2=text.lastIndexOf(this._separatorChar); 
             if(sep1>sep2)
                sep=sep1;
              else
                sep=sep2;               
            /**************************************************/
            //if ( text.lastIndexOf(this._separatorChar) > -1 ) 
            if(sep >-1)
            {
                // found separator char in the text
                //var pos = text.lastIndexOf(this._separatorChar);
                var pos=sep;
                pos++;
                text = text.substring(pos, (text.length));
                text = text.trim();
            }            
            
            if ( text.trim().length < this._minimumPrefixLength ) {
                this._update('', null,  false);
                //return;//commented so that dropdown appears after deleting text and reentering 1st character.
            }
            
            /**************************************************/
            
            var updateText = false;
            if ( this._noMinimumPrefix && !this._popupOpened ) updateText = true;
            else if ( !this._noMinimumPrefix && this._currentPrefix != text ) updateText = true;
            else if ( this._noMinimumPrefix && this._popupOpened && this._currentPrefix != text ) updateText = true;
            
            if (updateText) {
                this._currentPrefix = text;
                if (this._cache && this._cache[text]) {
                    this._update(text, this._cache[text],  false);
                    return;
                }
                Sys.Net.WebServiceProxy.invoke
                    (this._serviceURL, this._serviceMethod, false,
                    { prefixText : this._currentPrefix, count: this._completionSetCount },
                    Function.createDelegate(this, this._onMethodComplete),
                    Function.createDelegate(this, this._onMethodFailed),
                    text);
            }
        }
    }

    function Sys$UI$AutoCompleteBehavior$_setText(text) {
        this._timer.set_enabled(false);
        this._currentPrefix = text;
        var element = this.get_element();
        
        var control = element.control;        
        if (control && Sys.UI.TextBox.isInstanceOfType(control)) {
            control.set_text(text);
        }
        else {
            //element.value = text;
            var currentValue = element.value;
             var sep='';
            var sep1='';
            var sep2='';
            var text=element.value;
            sep1=text.lastIndexOf(";");           
              sep2=text.lastIndexOf(this._separatorChar); 
              if(sep1>sep2)
                sep=sep1;
              else
                sep=sep2;
            if ( sep > -1 )             
            {
            //if ( currentValue.lastIndexOf(this._separatorChar) > -1 ) 
            //{
                // found separator char in the text
                //var pos = currentValue.lastIndexOf(this._separatorChar);
                var pos=sep;
                pos++;
                currentValue = currentValue.substring(0, pos) +' ' + this._currentPrefix;
            } 
            else 
            {
                // no separator char found
               //currentValue = text;
               currentValue=this._currentPrefix;
            }
            // Change MalSmith 1/15/2007
            element.value = currentValue + this._separatorChar;
        }
        
        this._hideCompletionList();
    }

    function Sys$UI$AutoCompleteBehavior$_update(prefixText, completionItems, cacheResults) 
    {
      try
      {
        if (cacheResults && this.get_enableCaching()) 
        {
            if (!this._cache) 
            {
                this._cache = {};
            }
            this._cache[prefixText] = completionItems;
        }

        this._completionListElement.innerHTML = '';
        this._selectIndex = -1;
        if (completionItems && completionItems.length) {
            for (var i = 0; i < completionItems.length; i++) {
                var itemElement = document.createElement('div');
                itemElement.appendChild(document.createTextNode(completionItems[i]));
                itemElement.__item = '';
                 if ( this._cssItem != '' ) 
                {
                    itemElement.className =this._cssItem;
                }
                else
                {
                    var itemElementStyle = itemElement.style;
                    itemElementStyle.padding = '1px';
                    itemElementStyle.textAlign = 'left';
                    itemElementStyle.textOverflow = 'ellipsis';
                    itemElementStyle.backgroundColor = 'window';
                    itemElementStyle.color = 'windowtext';
                }
                this._completionListElement.appendChild(itemElement);
            }
            //Added by dipti to select the first item in list.
             this._selectIndex=0;             
             this._highlightItem(this._completionListElement.childNodes[0]);
             //Make selected characters bold in dropdown list.
              prefixText= prefixText.replace(/^\s+/, '');
              prefixText=prefixText.replace(/\s+$/, '');
              if(prefixText.length>=1)
              {
                var s=this._completionListElement.childNodes[0].firstChild.nodeValue.substring(0,prefixText.length);                   
                x=this._completionListElement.childNodes[0].firstChild.nodeValue;
                this._completionListElement.childNodes[0].innerHTML='<b>' +s +'</b>'+ this._completionListElement.childNodes[0].firstChild.nodeValue.substring(prefixText.length);                              
                //reset width to prevent extending of list in firefox.
                var completionListStyle = this._completionListElement.style;
                completionListStyle.width="230px";
              }
            if(location.href.indexOf('/Presentation/')>=1)
            {             
                if(document.getElementById("divInsertTags").style.display=='block' && document.getElementById("divInsertTags") && typeof(document.getElementById("divInsertTags").value) != "undefined")
                {
                    this._popupBehavior.show();
                    this._popupOpened = true;
                }  
            }
            else
            {
                this._popupBehavior.show();
                this._popupOpened = true;
            }            
        }
        else 
        {
            this._popupBehavior.hide();
            this._popupOpened = false;
        }
        
      }
      catch(ex)
      {
        
      }  
        
        
    }
Custom.UI.AutoCompleteBehavior.prototype = {
    _popupOpened: false,
    _serviceURL: null,
    _serviceMethod: null,
    _minimumPrefixLength: 3,     
    _completionSetCount: 10,
    _completionInterval: 50,
    _completionListElement: null,
    _separatorChar: ',',
    _cssList:null,
    _cssItem:null,
    _cssHoverItem:null,
    _noMinimumPrefix: false,
    _popupBehavior: null,
    _timer: null,
    _cache: null,
    _currentPrefix: null,
    _selectIndex: null,
    _focusHandler: null,
    _blurHandler: null,
    _keyDownHandler: null,
    _mouseDownHandler: null,
    _mouseUpHandler: null,
    _mouseOverHandler: null,
    _tickHandler: null,
    _enableCaching: true,
    
    get_completionInterval: Sys$UI$AutoCompleteBehavior$get_completionInterval,
    set_completionInterval: Sys$UI$AutoCompleteBehavior$set_completionInterval,
    
    get_completionList: Sys$UI$AutoCompleteBehavior$get_completionList,
    set_completionList: Sys$UI$AutoCompleteBehavior$set_completionList,
    
    get_completionSetCount: Sys$UI$AutoCompleteBehavior$get_completionSetCount,
    set_completionSetCount: Sys$UI$AutoCompleteBehavior$set_completionSetCount,
    
    get_minimumPrefixLength: Sys$UI$AutoCompleteBehavior$get_minimumPrefixLength,
    set_minimumPrefixLength: Sys$UI$AutoCompleteBehavior$set_minimumPrefixLength,
    
    get_noMinimumPrefix: Sys$UI$AutoCompleteBehavior$get_noMinimumPrefix,
    set_noMinimumPrefix: Sys$UI$AutoCompleteBehavior$set_noMinimumPrefix,
    
    get_separatorChar: Sys$UI$AutoCompleteBehavior$get_separatorChar,
    set_separatorChar: Sys$UI$AutoCompleteBehavior$set_separatorChar,
    
    get_cssList: Sys$UI$AutoCompleteBehavior$get_cssList,
    set_cssList: Sys$UI$AutoCompleteBehavior$set_cssList,
    
    get_cssItem: Sys$UI$AutoCompleteBehavior$get_cssItem,
    set_cssItem: Sys$UI$AutoCompleteBehavior$set_cssItem,
    
    get_cssHoverItem: Sys$UI$AutoCompleteBehavior$get_cssHoverItem,
    set_cssHoverItem: Sys$UI$AutoCompleteBehavior$set_cssHoverItem,
    
    get_serviceMethod: Sys$UI$AutoCompleteBehavior$get_serviceMethod,
    set_serviceMethod: Sys$UI$AutoCompleteBehavior$set_serviceMethod,
    
    get_serviceURL: Sys$UI$AutoCompleteBehavior$get_serviceURL,
    set_serviceURL: Sys$UI$AutoCompleteBehavior$set_serviceURL,
    
    get_enableCaching: Sys$UI$AutoCompleteBehavior$get_enableCaching,
    set_enableCaching: Sys$UI$AutoCompleteBehavior$set_enableCaching,
    
    _get_path: Sys$UI$AutoCompleteBehavior$_get_path,
    get_timeout: Sys$UI$AutoCompleteBehavior$get_timeout,

    dispose: Sys$UI$AutoCompleteBehavior$dispose,
    
    initializeTimer: Sys$UI$AutoCompleteBehavior$initializeTimer,
    
    initializeTextBox: Sys$UI$AutoCompleteBehavior$initializeTextBox,
    
    initializeCompletionList: Sys$UI$AutoCompleteBehavior$initializeCompletionList,
    
    initialize: Sys$UI$AutoCompleteBehavior$initialize,
    
    _hideCompletionList: Sys$UI$AutoCompleteBehavior$_hideCompletionList,
    
    _highlightItem: Sys$UI$AutoCompleteBehavior$_highlightItem,
    
    _onListMouseDown: Sys$UI$AutoCompleteBehavior$_onListMouseDown,
    
    _onListMouseUp: Sys$UI$AutoCompleteBehavior$_onListMouseUp,
    
    _onListMouseOver: Sys$UI$AutoCompleteBehavior$_onListMouseOver,

    _onGotFocus: Sys$UI$AutoCompleteBehavior$_onGotFocus,
    
    _onKeyDown: Sys$UI$AutoCompleteBehavior$_onKeyDown,
    
    _onLostFocus: Sys$UI$AutoCompleteBehavior$_onLostFocus,
    
    _onMethodComplete: Sys$UI$AutoCompleteBehavior$_onMethodComplete,
    _onMethodFailed: Sys$UI$AutoCompleteBehavior$_onMethodFailed,
    
    _onTimerTick: Sys$UI$AutoCompleteBehavior$_onTimerTick,
    
    _setText: Sys$UI$AutoCompleteBehavior$_setText,
    
    _update: Sys$UI$AutoCompleteBehavior$_update    
}
Custom.UI.AutoCompleteBehavior.descriptor = {
    properties: [   {name: 'completionInterval', type: Number},
                    {name: 'completionList', type: Sys.UI.DomElement},
                    {name: 'completionSetCount', type: Number},
                    {name: 'minimumPrefixLength', type: Number},
                    {name: 'serviceMethod', type: String},
                    {name: 'serviceURL', type: String},
                    {name: 'appURL', type: String },
                    {name: 'enableCaching', type: Boolean } ,
                    {name: 'separatorChar', type: String}, 
                    {name: 'cssList', type:String},
                    {name: 'cssItem', type:String},
                    {name: 'cssHoverItem', type:String},                  
    ]
}
Custom.UI.AutoCompleteBehavior.registerClass('Custom.UI.AutoCompleteBehavior', Sys.UI.Behavior);

if (Sys && Sys.Application) { Sys.Application.notifyScriptLoaded(); }

