var __aspxItemAttrsSeparator="::";var __aspxItemsSeparator=";;";var __aspxLoadRangeItemsCallbackPrefix="LBCRI";var __aspxLBIPostfixes=['I','T'];var __aspxLBIIdSuffix="LBI";var __aspxLBSIIdSuffix=__aspxLBIIdSuffix+"-1";var __aspxLBBSIdSuffix="_BS";var __aspxLTableIdSuffix="_LBT";var __aspxLEVISuffix="_VI";var __aspxLBDSuffix="_D";var __aspxLBOnClick=new Function("e","aspxLBIClick(e)");ASPxClientListEdit=_aspxCreateClass(ASPxClientEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.SelectedIndexChanged=new ASPxClientEvent();this.savedSelectedIndex=-1;this.readOnly=false;},RaiseValueChangedEvent:function(){var processOnServer=ASPxClientEdit.prototype.RaiseValueChangedEvent.call(this);if(_aspxIsExists(this.RaiseSelectedIndexChanged))processOnServer=this.RaiseSelectedIndexChanged()||processOnServer;return processOnServer;},FindInputElement:function(){return document.getElementById(this.name+__aspxLEVISuffix);},GetValue:function(){return this.GetItemValue(this.GetSelectedIndexInternal());},GetSelectedIndexInternal:function(){return this.savedSelectedIndex;},SetSelectedIndexInternal:function(index){this.savedSelectedIndex=index;},OnSelectedIndexChanged:function(index){var selectedIndex=this.GetSelectedIndexInternal();if(!this.readOnly&&(index!=selectedIndex)){this.SetSelectedIndexInternal(index);this.OnValueChanged();}}});ASPxClientListBox=_aspxCreateClass(ASPxClientListEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.APILockCount=0;this.freeUniqIndex=-1;this.isComboBoxList=false;this.isHasFakeRow=false;this.isSyncEnabled=true;this.ownerName="";this.listTable=null;this.heightCorrected=false;this.sampleItemTextCell=null;this.width="";this.hasSampleItem=false;this.hoverClass="";this.hoverCss="";this.selectedClass="";this.selectedCss="";this.allowMultipleCallbacks=false;this.isCallbackMode=false;this.callbackPageSize=-1;this.bottomSpace=0;this.ownerControl=null;this.SampleItem=null;this.scrollDivElement=null;this.scrollPageSize=4;this.deletedItems=[];this.insertedItems=[];this.itemsValue=[];},Initialize:function(){this.freeUniqIndex=this.GetItemCount();this.InitKeyboardInput();this.InitializeItemsAttributes();this.GenerateHoverSelected();this.SelectIndex(this.GetSelectedIndexInternal(),true);this.InitializeDisplayed();ASPxClientEdit.prototype.Initialize.call(this);},InitializeDisplayed:function(){if(!this.heightCorrected&&this.IsDisplayed()){this.CorrectSizes();this.InitializePageSize();this.EnsureSelectedItemVisible();this.CallbackSpaceInit();if(!this.isComboBoxList&&__aspxIE7)this.CorrectWidth();}},CallbackSpaceInit:function(){if(this.isCallbackMode){if(this.GetItemCount()==this.callbackPageSize)this.SetBottomScrollSpacingVisibility(true);var divElement=this.GetScrollDivElement();_aspxAttachEventToElement(divElement,"scroll",aspxLBScroll);}},InitializeItemsAttributes:function(){var listTable=this.GetListTable();if(this.isHasFakeRow&&_aspxIsExists(this.ClearItems))this.ClearItems();listTable.ListBoxId=this.name;var rows=listTable.rows;var count=rows.length;var rowIdConst=this.name+"_";if(this.hasSampleItem)this.InitializeItemAttributes(this.GetSampleItem(),rowIdConst+__aspxLBSIIdSuffix,false);rowIdConst+=__aspxLBIIdSuffix;for(var i=0;i<count;i++)this.InitializeItemAttributes(rows[i],rowIdConst+i,true);},InitializeItemAttributes:function(row,rowId,assignEvents){var cells=row.cells;var textCellId=rowId+__aspxLBIPostfixes[1];if(cells.length==2){cells[0].id=rowId+__aspxLBIPostfixes[0];cells[1].id=textCellId;}else cells[0].id=textCellId;if(assignEvents){if(this.isComboBoxList){_aspxAttachEventToElement(row,"mouseup",__aspxLBOnClick);if(__aspxFirefox)_aspxAttachEventToElement(row,"mousedown",_aspxPreventEvent);}else _aspxAttachEventToElement(row,"click",__aspxLBOnClick);}},InitializePageSize:function(){var divElement=this.GetScrollDivElement();var listTable=this.GetListTable();var rows=listTable.rows;var count=rows.length;if(_aspxIsExists(divElement)&&count>0)this.scrollPageSize=Math.round(divElement.clientHeight/rows[0].offsetHeight)-1;},InitKeyboardInput:function(){var kbInput=this.FindInputElement();if(_aspxIsExistsElement(kbInput)){kbInput.autocomplete="off";_aspxAttachKBSupportEventsToElement(kbInput,this.name);}},GenerateHoverSelected:function(){var count=this.GetItemCount();var state=aspxGetStateController();var nameConst=this.name+"_"+__aspxLBIIdSuffix;var name="";var postf0=__aspxLBIPostfixes[0];var postf1=__aspxLBIPostfixes[1];var elementName0="";var elementName1="";var stateHoverClass=null;var stateSelectClass=null;var i=this.hasSampleItem?-1:0;for(;i<count;i++){name=nameConst+i;elementName0=name+postf0;elementName1=name+postf1;stateHoverClass=new ASPxStateItem(name,this.hoverClass,this.hoverCss,__aspxLBIPostfixes,null,null,__aspxHoverItemKind);stateSelectClass=new ASPxStateItem(name,this.selectedClass,this.selectedCss,__aspxLBIPostfixes,null,null,__aspxSelectedItemKind);state.hoverItems[elementName0]=stateHoverClass;state.selectedItems[elementName0]=stateSelectClass;state.hoverItems[elementName1]=stateHoverClass;state.selectedItems[elementName1]=stateSelectClass;}},CorrectSizes:function(){if(this.isComboBoxList)return;this.CorrectHeight();this.CorrectWidth();},CorrectHeight:function(){if(this.heightCorrected)return;this.heightCorrected=true;var mainElement=this.GetMainElement();var divElement=this.GetScrollDivElement();var defaultHeight=_aspxGetCurrentStyle(divElement).height;divElement.style.height="0px";mainElement.style.height=defaultHeight;var height=mainElement.offsetHeight;divElement.style.height="";var extrudedeHeight=mainElement.offsetHeight;var heightCorrection=extrudedeHeight-height;if(heightCorrection>0){var divHeight=divElement.offsetHeight;divElement.style.height=(divHeight-heightCorrection)+"px";extrudedeHeight=mainElement.offsetHeight;var paddingsHeightCorrection=extrudedeHeight-height;if(paddingsHeightCorrection>0)divElement.style.height=(divHeight-heightCorrection-paddingsHeightCorrection)+"px";}else if(!__aspxIE55){divElement.style.height=height+"px";}},CorrectWidth:function(){var divElement=this.GetScrollDivElement();if(__aspxIE){var mainElement=this.GetMainElement();var scrollBarWidth=this.GetVerticalScrollBarWidth();mainElement.style.width="";divElement.style.width="100%";if(!__aspxIE55)divElement.style.paddingRight="0px";if(this.width!=""){mainElement.style.width=this.width;divElement.style.width="0px";var widthCorrectrion=__aspxIE55?0:scrollBarWidth;divElement.style.width=(mainElement.clientWidth-widthCorrectrion)+"px";}else{var widthCorrectrion=__aspxIE55?scrollBarWidth:0;if(this.IsListBoxWidthLessThenList())widthCorrectrion-=scrollBarWidth;divElement.style.width=(mainElement.clientWidth+widthCorrectrion)+"px";}if(!__aspxIE55)divElement.style.paddingRight=scrollBarWidth+"px";}else{if(this.width==""){var listTable=this.GetListTable();var mainElement=this.GetMainElement();if(listTable.offsetWidth!=0||!__aspxMozilla){divElement.style.width=(listTable.offsetWidth+this.GetVerticalScrollBarWidth())+"px";if(__aspxFirefox)mainElement.style.width=divElement.offsetWidth+"px";}}}},EnsureSelectedItemVisible:function(){var index=this.GetSelectedIndexInternal();if(index!=-1)this.MakeItemVisible(index);},MakeItemVisible:function(index){if(!this.IsItemVisible(index))this.ScrollItemToTop(index);},IsItemVisible:function(index){var scrollDiv=this.GetScrollDivElement();var itemElement=this.GetItemElement(index);var topVisible=false;var bottomVisible=false;if(itemElement!=null){topVisible=itemElement.offsetTop>scrollDiv.scrollTop;bottomVisible=itemElement.offsetTop+itemElement.offsetHeight<scrollDiv.scrollTop+scrollDiv.clientHeight;}return(topVisible&&bottomVisible);},ScrollItemToTop:function(index){var scrollDiv=this.GetScrollDivElement();scrollDiv.scrollTop=this.GetItemTopOffset(index);},ScrollToItemVisible:function(index){if(!this.IsItemVisible(index)){var scrollDiv=this.GetScrollDivElement();var scrollTop=scrollDiv.scrollTop;var scrollDivHeight=scrollDiv.clientHeight;var itemOffetTop=this.GetItemTopOffset(index);var itemHeight=this.GetItemHeight(index);var itemAbove=scrollTop>itemOffetTop;var itemBelow=scrollTop+scrollDivHeight<itemOffetTop+itemHeight;if(itemAbove)scrollDiv.scrollTop=itemOffetTop;else if(itemBelow){var scrollPaddings=scrollDiv.scrollHeight-this.GetListTable().offsetHeight-this.bottomSpace;scrollDiv.scrollTop=itemOffetTop+itemHeight-scrollDivHeight+scrollPaddings;}}},GetItemElement:function(index){var itemElement=this.GetItemRow(index);return __aspxSafari?itemElement.cells[0]:itemElement;},GetItemTopOffset:function(index){var itemElement=this.GetItemElement(index);return(itemElement!=null)?itemElement.offsetTop:0;},GetItemHeight:function(index){var itemElement=this.GetItemElement(index);return(itemElement!=null)?itemElement.offsetHeight:0;},IsListBoxWidthLessThenList:function(){var divElement=this.GetScrollDivElement();var listTable=this.GetListTable();var listTabelWidth=listTable.style.width;var isLess=false;listTable.style.width="";isLess=listTable.offsetWidth<divElement.offsetWidth;listTable.style.width=listTabelWidth;return isLess;},GetScrollDivElement:function(){if(!_aspxIsExistsElement(this.scrollDivElement))this.scrollDivElement=document.getElementById(this.name+__aspxLBDSuffix);return this.scrollDivElement;},GetItemCount:function(){var lbt=this.GetListTable();if(_aspxIsExists(lbt))return this.GetListTable().rows.length;return 0;},GetItemIndexByValue:function(value){for(var i=this.GetItemCount()-1;i>=0;i--){if(this.GetItemValue(i)==value)break;}return i;},GetItemCell:function(index,isImageCell){var itemRow=this.GetItemRow(index);return(itemRow!=null?this.GetItemRowCell(itemRow,isImageCell):null);},GetItemImageCell:function(index){return this.GetItemCell(index,true);},GetItemTextCell:function(index){return this.GetItemCell(index,false);},GetItemRow:function(index){var listTable=this.GetListTable();if(_aspxIsExists(listTable)){if(0<=index&&index<listTable.rows.length)return listTable.rows[index];}return null;},GetItemRowCell:function(rowElement,isImageCell){var cells=__aspxIE?rowElement.childNodes:rowElement.cells;if(isImageCell)return cells.length==2?cells[0]:null;return cells.length==1?cells[0]:cells[1];},GetItemValue:function(index){if(0<=index&&index<this.GetItemCount()){return this.PrepareItemValue(this.itemsValue[index]);}return null;},PrepareItemValue:function(value){return(String.prototype.isPrototypeOf(value)=="string"&&value==""&&this.convertEmptyStringToNull)?null:value;},GetListTable:function(){if(!_aspxIsExistsElement(this.listTable))this.listTable=_aspxGetElementById(this.name+__aspxLTableIdSuffix);return this.listTable;},GetListTableHeight:function(){return this.GetListTable().offsetHeight;},SetValue:function(value){var index=this.GetItemIndexByValue(value);this.SelectIndex(index,false);},GetVerticalScrollBarWidth:function(){var divElement=this.GetScrollDivElement();var overflowYReserv=this.GetVerticalOverflow(divElement);this.SetVerticalOverflow(divElement,"auto");var borderWidthWithScroll=divElement.offsetWidth-divElement.clientWidth;if(__aspxIE7)return borderWidthWithScroll;this.SetVerticalOverflow(divElement,"hidden");var borderWidthWithoutScroll=divElement.offsetWidth-divElement.clientWidth;this.SetVerticalOverflow(divElement,overflowYReserv);return borderWidthWithScroll-borderWidthWithoutScroll;},GetVerticalOverflow:function(element){if(__aspxIE)return element.style.overflowY;return element.style.overflow;},SetVerticalOverflow:function(element,value){if(__aspxIE)element.style.overflowY=value;else element.style.overflow=value;},OnItemClick:function(index){this.SelectIndexInternal(index);this.EnsureSelectedItemVisible();this.SetFocus();},SelectIndex:function(index,initialize){var selectedIndex=this.GetSelectedIndexInternal();var isValidIndex=(-1<=index&&index<this.GetItemCount());if((selectedIndex!=index&&isValidIndex&&!this.readOnly)||initialize){if(!initialize)this.SetHoverElement(null);var itemSelection=this.GetItemTextCell(index);var itemSelected=this.GetItemTextCell(selectedIndex);var controller=aspxGetStateController();controller.DeselectElementBySrcElement(itemSelected);controller.SelectElementBySrcElement(itemSelection);this.SetSelectedIndexInternal(index);this.UpdateHiddenInputs(index);if(!initialize)this.SetHoverElement(itemSelection);return true;}return false;},SelectIndexInternal:function(index){if(this.SelectIndex(index,false)){this.RaisePersonalStandardValidation();this.OnValueChanged();}},ShowLoadingPanel:function(){if(!this.isComboBoxList){var loadingParentElement=this.GetScrollDivElement().parentNode;this.loadingDivElement=this.CreateLoadingDiv(loadingParentElement);this.loadingPanelElement=this.CreateLoadingPanelWithAbsolutePosition(loadingParentElement);}},HideLoadingPanel:function(){if(!this.isComboBoxList){if(_aspxIsExistsElement(this.loadingPanelElement)){this.loadingPanelElement.parentNode.removeChild(this.loadingPanelElement);this.loadingPanelElement=null;}if(_aspxIsExistsElement(this.loadingDivElement)){this.loadingDivElement.parentNode.removeChild(this.loadingDivElement);this.loadingDivElement=null;}}},AddItemsFromCallbackResult:function(result){var isBottomScrollSpacerVisible=false;if(result!=""){this.BeginUpdate();var itemStrings=result.split(__aspxItemsSeparator);for(var i=0;i<itemStrings.length;i++){var itemStringAttrs=itemStrings[i].split(__aspxItemAttrsSeparator);this.AddItem(itemStringAttrs[1],itemStringAttrs[0],itemStringAttrs[2]);}
this.EndUpdate();isBottomScrollSpacerVisible=(itemStrings.length==this.callbackPageSize);}
this.SetBottomScrollSpacingVisibility(isBottomScrollSpacerVisible);},FormatCallbackArg:function(prefix,arg){if(arg==null)return "";if(!_aspxIsExists(arg.length)&&_aspxIsExists(arg.value)){arg=arg.value;}if(arg==null||arg=="")return "";return prefix+"|"+arg.length+';'+arg+';';},InCallback:function(){var callbackOwner=this.GetCallbackOwnerControl();if(callbackOwner!=null)return callbackOwner.InCallback();return ASPxClientListEdit.prototype.InCallback.call(this);},GetCallbackOwnerControl:function(){if(this.ownerName!=""&&!_aspxIsExists(this.ownerControl))this.ownerControl=aspxGetControlCollection().Get(this.ownerName);return this.ownerControl;},GetCallbackArguments:function(){var args=_aspxIsExists(this.GetCustomCallbackArg)?this.GetCustomCallbackArg():"";var beginIndex=this.isCallbackMode?this.GetItemCount():0;var endIndex=this.isCallbackMode?(beginIndex+this.callbackPageSize-1):-1;args+=this.FormatCallbackArg(__aspxLoadRangeItemsCallbackPrefix,beginIndex+":"+endIndex);return args;},LoadNextItemsOnCallback:function(){this.SendCallback();},GetBottomScrollSpacingElement:function(){return document.getElementById(this.name+__aspxLBBSIdSuffix);},IsScrollSpacerVisible:function(){var bottomSpaser=this.GetBottomScrollSpacingElement();if(_aspxIsExists(bottomSpaser))return _aspxGetElementDisplay(bottomSpaser);return false;},SetBottomScrollSpacingVisibility:function(visibility){var bottomSpaser=this.GetBottomScrollSpacingElement();if(_aspxIsExists(bottomSpaser)){var isVisible=_aspxGetElementDisplay(bottomSpaser);if(visibility){var divElement=this.GetScrollDivElement();this.bottomSpace=divElement.clientHeight;bottomSpaser.style.height=this.bottomSpace+"px";}else this.bottomSpace=0;if(isVisible!=visibility){_aspxSetElementDisplay(bottomSpaser,visibility);_aspxGetElementVisibility(bottomSpaser,visibility);}}},SendCallback:function(){if(!this.InCallback()){this.ShowLoadingPanel();var callbackOwner=this.GetCallbackOwnerControl();if(callbackOwner!=null)callbackOwner.SendCallback();else{var argument=this.GetCallbackArguments();this.CreateCallback(argument);}}},OnAfterCallback:function(){this.HideLoadingPanel();},OnCallback:function(result){this.AddItemsFromCallbackResult(result);this.OnAfterCallback();},OnCallbackError:function(result){this.OnAfterCallback();},OnScroll:function(){if(this.InCallback()||!this.IsScrollSpacerVisible())return;var divElement=this.GetScrollDivElement();var listTable=this.GetListTable();var scrollBottom=divElement.scrollTop+divElement.clientHeight;var isBottomSpaceVisible=(scrollBottom>listTable.clientHeight);if(isBottomSpaceVisible)this.LoadNextItemsOnCallback();},OnArrowUp:function(){this.SelectNeighbour(-1);return true;},OnArrowDown:function(){this.SelectNeighbour(1);return true;},OnPageUp:function(){this.SelectNeighbour(-this.scrollPageSize);return true;},OnPageDown:function(){this.SelectNeighbour(this.scrollPageSize);return true;},OnHomeKeyDown:function(){this.SelectNeighbour(-this.GetItemCount());return true;},OnEndKeyDown:function(){this.SelectNeighbour(this.GetItemCount());return true;},SelectNeighbour:function(step){var itemCount=this.GetItemCount();if(itemCount>0){var index=this.GetSelectedIndexInternal();var isFirstPageDown=index==-1&&step==this.scrollPageSize;index=isFirstPageDown?step:index+step;if((step<0&&index<0)||step<=-itemCount)index=0;if((step>0&&index>=itemCount)||step>=itemCount){index=itemCount-1;if(this.isCallbackMode&&this.IsScrollSpacerVisible())this.LoadNextItemsOnCallback();}
this.SelectIndexInternal(index);this.ScrollToItemVisible(index);}},FindInputElement:function(){return document.getElementById(this.name+"_KBS");},FindStateInputElement:function(){return document.getElementById(this.name+__aspxLEVISuffix);},OnSetFocus:function(isFocused){var focusElement=this.GetInputElement();focusElement.aspxKBSIFocused=isFocused;},SetHoverElement:function(element){aspxGetStateController().SetCurrentHoverElementBySrcElement(element);},UpdateHiddenInputs:function(index){var element=this.FindStateInputElement();if(_aspxIsExistsElement(element)){var value=this.GetItemValue(index);if(value==null)value="";element.value=value;}}});ASPxClientRadioButtonList=_aspxCreateClass(ASPxClientListEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.items=[];},InvalidateInputElement:function(){this.inputElement=null;},FindInputElement:function(){var index=this.GetSelectedIndexInternal();return this.GetItemElement(index);},GetItemElement:function(index){return _aspxGetElementById(this.name+"_RB"+index+"_I");},GetItemCount:function(){return this.items.length;},OnItemClick:function(index){if(this.GetSelectedIndexInternal()!=index){this.SelectIndex(index);this.OnValueChanged();}},OnItemClickReadonly:function(){var index=this.GetSelectedIndexInternal();if(index<0){var item=this.GetItemElement(0);item.checked=true;item.checked=false;}else{this.SelectIndex(index);}},SelectIndex:function(index){var selectedIndex=this.GetSelectedIndexInternal();var isValidIndex=(-1<=index&&index<this.GetItemCount());if(selectedIndex!=index&&isValidIndex&&!this.readOnly){if(index>-1){if(_aspxIsExists(this.GetItemElement(index)))this.GetItemElement(index).checked=true;else return false;}else{for(var i=0;i<this.items.length;i++){var itemIndex=this.items[i].index;if(_aspxIsExists(this.GetItemElement(itemIndex)))this.GetItemElement(itemIndex).checked=false;else return false;}}
this.SetSelectedIndexInternal(index);return true;}return false;},GetItemValue:function(index){if(index>-1&&index<this.items.length){if(String.prototype.isPrototypeOf(this.items[index].value)&&this.items[index].value==""&&this.convertEmptyStringToNull)return null;else return this.items[index].value;}return null;},SetValue:function(value){for(var i=0;i<this.items.length;i++){if(this.GetItemValue(i)==value){this.SelectIndex(i);return;}}
this.SelectIndex(-1);}});function aspxLBIClick(evt){var element=_aspxGetEventSource(evt);while(element!=null&&element.tagName!="BODY"){if(element.tagName=="TR"){var table=element.offsetParent;if(_aspxIsExists(table)&&_aspxIsExists(table.ListBoxId)){var lb=aspxGetControlCollection().Get(table.ListBoxId);if(lb!=null)lb.OnItemClick(element.rowIndex);break;}}
element=_aspxGetParentNode(element);}}
function aspxLBScroll(evt){var sourceId=_aspxGetEventSource(evt).id;if(sourceId.slice(-__aspxLBDSuffix.length)==__aspxLBDSuffix){var name=sourceId.slice(0,-2);var lb=aspxGetControlCollection().Get(name);if(lb!=null)lb.OnScroll();}}
function aspxERBLIClick(name,index){var list=aspxGetControlCollection().Get(name);if(list!=null)list.OnItemClick(index);}
function aspxERBLICancel(name){var list=aspxGetControlCollection().Get(name);if(list!=null)list.OnItemClickReadonly();}