﻿if(!window.ComponentArt_ComboBox_Keyboard_Loaded||window.ComponentArt_ComboBox_ReLoad){ComponentArt_ComboBox.prototype.EnsureKeyIndex=function(){if(this.SelectedIndex>=0){var _1=document.getElementById(this.Id+"_item_"+this.SelectedIndex);if(_1){if(this.KeyboardIndex<0||_1!=_1.parentNode.childNodes[this.KeyboardIndex]){for(var i=0;i<_1.parentNode.childNodes.length;i++){if(_1.parentNode.childNodes[i]==_1){this.KeyboardIndex=i;break;}}}}else{this.KeyboardIndex=-1;}}else{this.KeyboardIndex=-1;}};ComponentArt_ComboBox.prototype.GetIndexFromKeyIndex=function(_3,_4){if(this.RunningMode==1){return _3;}else{if(_4.childNodes.length-1<_3){return -1;}else{return _4.childNodes[_3].id.split("_item_")[1];}}};ComponentArt_ComboBox.prototype.SelectItemByKeyIndex=function(_5){var _6=document.getElementById(this.Id+"_DropDownContent");if(_6){var _7=this.GetIndexFromKeyIndex(_5,_6);if(_7>=0){this.SelectItemByIndex(_7);}}this.KeyboardIndex=_5;};ComponentArt_ComboBox.prototype.HandleKeyPageUp=function(){this.EnsureKeyIndex();if(this.KeyboardIndex>0){this.SelectItemByKeyIndex(Math.max(0,this.KeyboardIndex-this.DropDownPageSize));}};ComponentArt_ComboBox.prototype.HandleKeyPageDown=function(){this.EnsureKeyIndex();var _8=document.getElementById(this.Id+"_DropDownContent");if(this.KeyboardIndex<_8.childNodes.length-1){this.SelectItemByKeyIndex(Math.min(_8.childNodes.length-1,this.KeyboardIndex+this.DropDownPageSize));}};ComponentArt_ComboBox.prototype.HandleKeyHome=function(){this.EnsureKeyIndex();this.SelectItemByKeyIndex(0);};ComponentArt_ComboBox.prototype.HandleKeyEnd=function(){this.EnsureKeyIndex();var _9=document.getElementById(this.Id+"_DropDownContent");this.SelectItemByKeyIndex(_9.childNodes.length-1);};ComponentArt_ComboBox.prototype.HandleKeyDown=function(){this.EnsureKeyIndex();var _a=document.getElementById(this.Id+"_DropDownContent");if(this.KeyboardIndex<_a.childNodes.length-1){this.SelectItemByKeyIndex(this.KeyboardIndex+1);}else{if(this.Data.length<this.ItemCount){this.HandleScroll();}}};ComponentArt_ComboBox.prototype.HandleKeyUp=function(){this.EnsureKeyIndex();if(this.KeyboardIndex>0){this.SelectItemByKeyIndex(this.KeyboardIndex-1);}};ComponentArt_ComboBox.prototype.HandleKeyEnter=function(){};ComponentArt_ComboBox.prototype.InitKeyboard=function(){window._q137=this;this.KeyboardIndex=-1;ComponentArt_RegisterKeyHandler(this,"Esc",this.Id+".Collapse()");ComponentArt_RegisterKeyHandler(this,"(",this.Id+".HandleKeyDown()");ComponentArt_RegisterKeyHandler(this,"&",this.Id+".HandleKeyUp()");ComponentArt_RegisterKeyHandler(this,"$",this.Id+".HandleKeyHome()");ComponentArt_RegisterKeyHandler(this,"#",this.Id+".HandleKeyEnd()");ComponentArt_RegisterKeyHandler(this,"Ctrl+'",this.Id+".HandleKeyPageDown()");ComponentArt_RegisterKeyHandler(this,"Ctrl+%",this.Id+".HandleKeyPageUp()");document.onkeydown=ComponentArt_HandleKeyPress;};window.ComponentArt_ComboBox_Keyboard_Loaded=true;}

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();