var __aspxLBIPostfixes=['I','T'];var __aspxLBIIdSuffix="LBI";var __aspxLTableIdSuffix="_LBT";var __aspxLEVISuffix="VI";var __aspxLBDSuffix="D";ASPxClientListEdit=_aspxCreateClass(ASPxClientEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.SelectedIndexChanged=new ASPxClientEvent();this.items=[];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);},GetSelectedIndexInternal:function(){return this.savedSelectedIndex;},SetSelectedIndexInternal:function(index){this.savedSelectedIndex=index;},OnFocus:function(index){if(!this.isInitialized)return;if(_aspxIsExists(this.RaiseFocus)){this.RaiseFocus();}},OnLostFocus:function(index){if(!this.isInitialized)return;if(_aspxIsExists(this.RaiseLostFocus)){this.RaiseLostFocus();}},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.listTable=null;this.heightCorrected=false;this.sampleItemTextCell=null;this.width="";this.deletedItems=[];this.insertedItems=[];this.itemsValue=[];},Initialize:function(){this.freeUniqIndex=this.GetItemCount();for(var i=0;i<this.GetItemCount();i++)this.GetItemRow(i).ListBoxId=this.name;this.SelectIndex(this.GetSelectedIndexInternal(),true);this.InitializeDisplayed();ASPxClientEdit.prototype.Initialize.call(this);},InitializeDisplayed:function(){if(!this.heightCorrected&&this.IsDisplayed()){this.CorrectSizes();this.EnsureSelectedItemVisible();}},IsDisplayed:function(){var element=this.GetMainElement();while(element!=null&&element.tagName!="BODY"){if(!_aspxGetElementDisplay(element))return false;element=_aspxGetParentNode(element);}return true;},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(!this.IsItemVisible(index))this.ScrollItemToTop(index);},IsItemVisible:function(index){var scrollDiv=this.GetScrollDivElement();var row=this.GetItemRow(index);var topVisible=false;var bottomVisible=false;if(row!=null){topVisible=row.offsetTop>scrollDiv.scrollTop;bottomVisible=row.offsetTop+row.offsetHeight<scrollDiv.scrollTop+scrollDiv.clientHeight;}return(topVisible&&bottomVisible);},ScrollItemToTop:function(index){var scrollDiv=this.GetScrollDivElement();scrollDiv.scrollTop=this.GetItemTopOffset(index);},GetItemTopOffset:function(index){var row=this.GetItemRow(index);return(row!=null)?row.offsetTop: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(){return document.getElementById(this.name+"_"+__aspxLBDSuffix);},GetItemCount:function(){if(this.itemsValue.length>this.items.length)return this.itemsValue.length;else if(this.itemsValue.length!=this.items.length)return this.items.length;return 0;},GetItemIndexByRowID:function(id){var listTable=this.GetListTable();for(var i=0;i<listTable.rows.length;i++){if(listTable.rows[i].id==id)return i;}return-1;},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(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()){var value=null;if(this.itemsValue.length>this.items.length)value=this.itemsValue[index];else if(this.itemsValue.length!=this.items.length)value=this.items[index].value;value=this.PrepareItemValue(value);return value;}return null;},PrepareItemValue:function(value){return(typeof 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;},GetValue:function(){return this.GetItemValue(this.GetSelectedIndexInternal());},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(id){var index=this.GetItemIndexByRowID(id);if(this.SelectIndex(index,false)){this.RaisePersonalStandardValidation();this.OnValueChanged();}},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=aspxGetStyleController();controller.DeselectElementBySrcElement(itemSelected);controller.SelectElementBySrcElement(itemSelection);this.SetSelectedIndexInternal(index);this.UpdateHiddenInputs(index);if(!initialize)this.SetHoverElement(itemSelection);return true;}return false;},SetHoverElement:function(element){aspxGetStyleController().SetCurrentHoverElementBySrcElement(element);},UpdateHiddenInputs:function(index){var element=this.GetInputElement();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);},Initialize:function(){this.constructor.prototype.Initialize.call(this);},GetInputElement:function(index){return this.GetInputElementInternal(_aspxIsExists(index)?index:0);},GetInputElementInternal:function(index){return this.GetChild("_RB"+index+"_I");},GetItemValue:function(index){if(index>-1&&index<this.items.length){if(this.items[index].value==""&&this.convertEmptyStringToNull)return null;else return this.items[index].value;}return null;},GetValue:function(){return this.GetItemValue(this.GetSelectedIndexInternal());},SetSelectedIndexInternal:function(index){ASPxClientListEdit.prototype.SetSelectedIndexInternal.call(this,index);var element=this.GetInputElementInternal(index);if(_aspxIsExistsElement(element))element.checked=true;},SetValue:function(value){var itemsCount=this.GetItemCount();for(var i=0;i<itemsCount;i++){if(this.GetItemValue(i)==value){this.SetSelectedIndexInternal(i);break;}}if(i==itemsCount)this.SetSelectedIndexInternal(-1);}});function aspxLEBFocus(name,index){var leb=aspxGetControlCollection().Get(name);if(leb!=null)leb.OnFocus(index);}
function aspxLEBLostFocus(name,index){var leb=aspxGetControlCollection().Get(name);if(leb!=null)leb.OnLostFocus(index);}
function aspxLEBSelectedIndexChanged(name,index){var rbl=aspxGetControlCollection().Get(name);if(rbl!=null)rbl.OnSelectedIndexChanged(index);return true;}
function aspxLBIClick(evt){var element=_aspxGetEventSource(evt);while(element!=null&&element.tagName!="BODY"){if(_aspxIsExists(element.ListBoxId)){var lb=aspxGetControlCollection().Get(element.ListBoxId);if(lb!=null)lb.OnItemClick(element.id);break;}
element=_aspxGetParentNode(element);}}