var __aspxDropDownIdSuffix="_DDD";ASPxClientDropDownEdit=_aspxCreateClass(ASPxClientButtonEditBase,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.DropDown=new ASPxClientEvent();this.CloseUp=new ASPxClientEvent();this.ddHeightCache=__aspxInvalidDimension;this.ddWidthCache=__aspxInvalidDimension;this.dropDownButtonIndex=-1;this.droppedDown=false;aspxGetDropDownCollection().Add(this);},Initialize:function(){var pc=this.GetPopupControl();if(_aspxIsExists(pc))pc.allowCorrectYOffsetPosition=false;this.AssignClientAttributes();ASPxClientEdit.prototype.Initialize.call(this);},AssignClientAttributes:function(){var element=this.GetDropDownButton();if(_aspxIsExistsElement(element))_aspxPreventElementDragAndSelect(element,true);element=this.FindInputElement();if(_aspxIsExistsElement(element))element.autocomplete="off";},GetDropDownButton:function(){return this.GetButton(this.dropDownButtonIndex);},GetPopupControl:function(){return aspxGetControlCollection().Get(this.name+__aspxDropDownIdSuffix);},GetDropDownInnerControlName:function(suffix){var pc=this.GetPopupControl();if(_aspxIsExists(pc))return this.GetPopupControl().name+"_"+suffix;return "";},GetDropDownHeight:function(){return 0;},GetDropDownWidth:function(){return 0;},ShowDropDownArea:function(){var pc=this.GetPopupControl();var element=this.GetMainElement();var pcwElement=pc.GetWindowElement(-1);_aspxSetElementDisplay(pcwElement,true);var height=this.GetDropDownHeight();var width=this.GetDropDownWidth();if(this.ddHeightCache!=height||this.ddWidthCache!=width){pc.SetSize(width,height);this.ddHeightCache=height;this.ddWidthCache=width;}
pc.popupVerticalOffset=-_aspxGetClientTop(element);pc.ShowAtElement(element);if(_aspxIsExists(this.RaiseDropDown))this.RaiseDropDown();aspxGetDropDownCollection().RegisterDroppedDownControl(this);this.droppedDown=true;},HideDropDownArea:function(){var pc=this.GetPopupControl();if(!_aspxIsExists(pc))return;pc.Hide();if(_aspxIsExists(this.RaiseCloseUp))this.RaiseCloseUp();aspxGetDropDownCollection().UnregisterDroppedDownControl(this);this.droppedDown=false;},OnDropDown:function(evt){if(this.droppedDown)this.HideDropDownArea();else this.ShowDropDownArea();return true;},OnDocumentMouseDown:function(){this.HideDropDownArea();},OnDocumentMouseUp:function(){},OnDDButtonMouseMove:function(evt){},OnCloseUp:function(evt){this.HideDropDownArea();},OnTextChanged:function(){this.ParseValue();}});ASPxClientDropDownCollection=_aspxCreateClass(ASPxClientCollection,{constructor:function(){this.constructor.prototype.constructor.call(this);this.droppedControlName="";},OnDDButtonMouseMove:function(evt){var dropDownControl=this.Get(this.droppedControlName);if(_aspxIsExists(dropDownControl))dropDownControl.OnDDButtonMouseMove(evt);},OnDocumentMouseDown:function(evt){var srcElement=_aspxGetEventSource(evt);var dropDownControl=this.Get(this.droppedControlName);if(_aspxIsExists(dropDownControl)&&_aspxGetParentById(srcElement,dropDownControl.GetMainElement().id)==null&&_aspxGetParentById(srcElement,dropDownControl.GetPopupControl().GetWindowElementId(-1))==null)dropDownControl.OnDocumentMouseDown();},OnDocumentMouseUp:function(evt){var dropDownControl=this.Get(this.droppedControlName);if(_aspxIsExists(dropDownControl))dropDownControl.OnDocumentMouseUp();},RegisterDroppedDownControl:function(dropDownControl){var previousDropDownControl=this.Get(this.droppedControlName);if(_aspxIsExists(previousDropDownControl))previousDropDownControl.HideDropDownArea();this.droppedControlName=dropDownControl.name;},UnregisterDroppedDownControl:function(dropDownControl){if(this.droppedControlName==dropDownControl.name)this.droppedControlName="";}});ASPxClientDateEdit=_aspxCreateClass(ASPxClientDropDownEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.DateChanged=new ASPxClientEvent();this.dateFormatter=new DateFormatter();this.date=null;this.dateOnError="u";this.calendarName="";},ShowDropDownArea:function(){var cal=this.GetCalendar();if(_aspxIsExists(cal))cal.SetValue(this.date);ASPxClientDropDownEdit.prototype.ShowDropDownArea.call(this);},GetCalendar:function(){var name=this.GetDropDownInnerControlName(this.calendarName);return aspxGetControlCollection().Get(name);},GetFormattedDate:function(){if(!this.date)return "";return this.dateFormatter.Format(this.date);},RaiseValueChangedEvent:function(){var processOnServer=ASPxClientEdit.prototype.RaiseValueChangedEvent.call(this);if(_aspxIsExists(this.RaiseDateChanged))processOnServer=this.RaiseDateChanged()||processOnServer;return processOnServer;},OnCalendarSelectionChanging:function(date){this.HideDropDownArea();this.ChangeDate(date);},ParseValue:function(){var value=ASPxClientButtonEditBase.prototype.GetValue.call(this);if(value==null||value==""){this.ChangeDate(null);}else{var date=this.ParseDate(value);if(!date){switch(this.dateOnError){case "n":this.ChangeDate(null);break;case "t":this.ChangeDate(new Date());break;default:ASPxClientButtonEditBase.prototype.SetValue.call(this,this.GetFormattedDate());break;}}else this.ChangeDate(date);}},ParseDate:function(str){return this.dateFormatter.Parse(str);},GetValue:function(){return this.date;},GetValueString:function(){return(this.date==null)?null:ASPxClientCalendar.GetInvariantDateString(this.date);},SetValue:function(date){this.date=date;ASPxClientButtonEditBase.prototype.SetValue.call(this,this.GetFormattedDate());},ChangeDate:function(date){var oldDate=this.date;this.SetValue(date);if(!ASPxClientCalendar.AreDatesEqual(oldDate,date)){this.RaisePersonalStandardValidation();this.OnValueChanged();}}});__aspxCCValueInputSuffix="VI";ASPxClientComboBox=_aspxCreateClass(ASPxClientDropDownEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.SelectedIndexChanged=new ASPxClientEvent();this.isDropDownListStyle=true;this.dropDownHeight="";this.dropDownWidth="";this.listBoxControlName="";},Initialize:function(){if(!this.isDropDownListStyle&&__aspxIE){var mainElement=this.GetMainElement();var element=this.FindInputElement();_aspxPreventElementDragAndSelect(element,true);_aspxPreventElementDragAndSelect(mainElement,true);_aspxAttachEventToElement(mainElement,"mousemove",_aspxCBPreventSelection);}
this.RemoveRaisePSValidationFromListBox();this.RedirectStandardValidators();this.UpdateValueInput();var buttonElement=this.GetDropDownButton();if(_aspxIsExists(buttonElement))_aspxAttachEventToElement(buttonElement,"mousemove",_aspxCBDDButtonMMove);this.InitDropDownSize();ASPxClientDropDownEdit.prototype.Initialize.call(this);},EnableStyleControllerForDDButton:function(){var element=this.GetDropDownButton();if(_aspxIsExists(element)){var controller=aspxGetStyleController();this.ReplaceElementControlStyleItem(controller.hoverItems,element,this.ddButtonHoverStyle);this.ReplaceElementControlStyleItem(controller.pressedItems,element,this.ddButtonPressedStyle);this.ReplaceElementControlStyleItem(controller.selectedItems,element,this.ddButtonSelectedStyle);}},DisableStyleControllerForDDButton:function(){var element=this.GetDropDownButton();if(_aspxIsExists(element)){var controller=aspxGetStyleController();this.ddButtonHoverStyle=this.ReplaceElementControlStyleItem(controller.hoverItems,element,null);this.ddButtonPressedStyle=this.ReplaceElementControlStyleItem(controller.pressedItems,element,null);this.ddButtonSelectedStyle=this.ReplaceElementControlStyleItem(controller.selectedItems,element,null);}},ReplaceElementControlStyleItem:function(items,element,newStyleItem){var styleItem=items[element.id];items[element.id]=newStyleItem;return styleItem;},RemoveRaisePSValidationFromListBox:function(){var listBox=this.GetListBoxControl();if(_aspxIsExists(listBox))listBox.RaisePersonalStandardValidation=function(){};},RedirectStandardValidators:function(){var valueInput=this.GetValueInput();if(_aspxIsExistsElement(valueInput)&&_aspxIsExists(valueInput.Validators)){for(var i=0;i<valueInput.Validators.length;i++)valueInput.Validators[i].controltovalidate=valueInput.id;}},DropDownButtonPush:function(){if(__aspxIE||__aspxOpera)this.DropDownButtonPushCommon();else this.DropDownButtonPushMozilla();},DropDownButtonPop:function(){if(__aspxIE||__aspxOpera)this.DropDownButtonPopCommon();else this.DropDownButtonPopMozilla();},DropDownButtonPushCommon:function(){if(this.droppedDown)return;var buttonElement=this.GetDropDownButton();if(_aspxIsExists(buttonElement)){var controller=aspxGetStyleController();controller.SetCurrentHoverElement(null);var element=controller.GetPressedElement(buttonElement);if(_aspxIsExists(element))controller.DoSetPressedState(element);}},DropDownButtonPopCommon:function(){if(!this.droppedDown)return;var buttonElement=this.GetDropDownButton();if(_aspxIsExists(buttonElement)){var controller=aspxGetStyleController();var element=controller.GetPressedElement(buttonElement);if(_aspxIsExists(element))controller.DoClearPressedState(element);}},DropDownButtonPushMozilla:function(){if(this.droppedDown)return;this.DisableStyleControllerForDDButton();var controller=aspxGetStyleController();controller.savedCurrentPressedElement=null;},DropDownButtonPopMozilla:function(){if(!this.droppedDown)return;this.EnableStyleControllerForDDButton();var controller=aspxGetStyleController();var buttonElement=this.GetDropDownButton();if(_aspxIsExists(buttonElement)){var element=controller.GetPressedElement(buttonElement);if(_aspxIsExists(element))controller.DoClearPressedState(element);controller.currentPressedElement=null;element=controller.GetHoverElement(buttonElement);if(_aspxIsExists(element))controller.SetCurrentHoverElement(element);}},FindItemIndexByText:function(lb,text){if(!_aspxIsExists(lb))return;for(var i=0;i<lb.GetItemCount();i++){if(lb.GetItem(i).text==text)return i;}return-1;},GetValueInputToValidate:function(){return this.GetValueInput();},GetValueInput:function(){return document.getElementById(this.name+"_"+__aspxCCValueInputSuffix);},GetListBoxControl:function(){var name=this.GetDropDownInnerControlName(this.listBoxControlName);return aspxGetControlCollection().Get(name);},GetListBoxScrollDivElement:function(){return this.GetListBoxControl().GetScrollDivElement();},GetDropDownHeight:function(){return(this.ddHeightCache!=__aspxInvalidDimension)?this.ddHeightCache:this.InitListBoxHeight();},GetDropDownWidth:function(){return(this.ddWidthCache!=__aspxInvalidDimension)?this.ddWidthCache:this.InitListBoxWidth();},SetText:function(text){var lb=this.GetListBoxControl();var index=this.FindItemIndexByText(lb,text);this.SelectIndex(index);this.SetTextInternal(text);},SetTextInternal:function(text){ASPxClientDropDownEdit.prototype.SetValue.call(this,text);},GetValue:function(){var lb=this.GetListBoxControl();if(!_aspxIsExists(lb))return null;var text=ASPxClientDropDownEdit.prototype.GetValue.call(this);var index=this.FindItemIndexByText(lb,text);lb.SelectIndex(index,false);return(index==-1?text:lb.GetValue());},SetValue:function(value){var lb=this.GetListBoxControl();lb.SetValue(value);var item=lb.GetSelectedItem();var text=_aspxIsExists(item)?item.text:value;this.SetTextInternal(text);this.UpdateValueInput();},UpdateValueInput:function(){var input=this.GetValueInput();var value=this.GetValue();input.value=value!=null?value:"";},InitDropDownSize:function(){var pc=this.GetPopupControl();if(_aspxIsExists(pc)&&this.IsDisplayed()){var pcwElement=pc.GetWindowElement(-1);if(_aspxIsExists(pcwElement)){_aspxSetElementDisplay(pcwElement,true);this.ddHeightCache=this.InitListBoxHeight();this.ddWidthCache=this.InitListBoxWidth();pc.SetSize(this.ddWidthCache,this.ddHeightCache);}}},InitListBoxHeight:function(){var lbScrollDiv=this.GetListBoxScrollDivElement();var height=this.dropDownHeight;var lb=this.GetListBoxControl();if(height==""){var listHeight=lb.GetListTableHeight();var itemCount=lb.GetItemCount();if(itemCount>7)height=((listHeight/itemCount)*7)+"px";else height=itemCount==0?"0px":listHeight+"px";lbScrollDiv.style.height=height;return lbScrollDiv.offsetHeight;}
var lbMainElement=lb.GetMainElement();lbMainElement.style.height="";lbScrollDiv.style.height="";lbMainElement.style.height=height;var trueLbOffsetHeight=lbMainElement.offsetHeight;var trueLbClientHeight=lbMainElement.clientHeight;lbScrollDiv.style.height=lbMainElement.clientHeight+"px";lbHeightCorrection=lbMainElement.offsetHeight-trueLbOffsetHeight;lbScrollDiv.style.height=(trueLbClientHeight-lbHeightCorrection)+"px";return lbMainElement.offsetHeight;},InitListBoxWidth:function(){var mainElement=this.GetMainElement();var lb=this.GetListBoxControl();var lbMainElement=lb.GetMainElement();var lbScrollDiv=this.GetListBoxScrollDivElement();var lbTable=lb.GetListTable();lbMainElement.style.width="";lbScrollDiv.style.width="100%";if(this.dropDownWidth!=""){lbMainElement.style.width=this.dropDownWidth;lbScrollDiv.style.width=lbMainElement.clientWidth+"px";var difference=lbTable.offsetWidth-lbScrollDiv.clientWidth;if(!__aspxIE&&difference>0){lbMainElement.style.width=(lbMainElement.offsetWidth+difference)+"px";lbScrollDiv.style.width=(lbMainElement.clientWidth)+"px";}}else{var pc=this.GetPopupControl();var width=lbTable.offsetWidth;if((!__aspxIE||__aspxIE55)&&!((__aspxMozilla&&!__aspxFirefox)&&pc.enableAnimation))width+=lb.GetVerticalScrollBarWidth();lbScrollDiv.style.width=width+"px";var widthDifference=mainElement.offsetWidth-lbMainElement.offsetWidth;if(widthDifference>0){lbScrollDiv.style.width=(width+widthDifference)+"px";var twoBorderSize=(lbMainElement.offsetWidth-lbMainElement.clientWidth);lbMainElement.style.width=(width+widthDifference+twoBorderSize)+"px";}}return lbScrollDiv.offsetWidth;},SelectIndex:function(index){var lb=this.GetListBoxControl();var isSelectionChanged=lb.SelectIndex(index,false);var item=lb.GetSelectedItem();var text=_aspxIsExists(item)?item.text:"";if(isSelectionChanged)ASPxClientDropDownEdit.prototype.SetValue.call(this,text);return isSelectionChanged;},ShowDropDownArea:function(){this.DropDownButtonPush();var lb=this.GetListBoxControl();if(!_aspxIsExists(lb)||lb.GetItemCount()==0)return;var pc=this.GetPopupControl();if(__aspxMozilla&&pc.enableAnimation)this.DisableLBDivOverflow();ASPxClientDropDownEdit.prototype.ShowDropDownArea.call(this);if(__aspxMozilla&&pc.enableAnimation)window.setTimeout(_aspxCBMozillaOverflowOn,pc.animationMaxDelay/2,this.name);var text=ASPxClientDropDownEdit.prototype.GetValue.call(this);var lbItem=lb.GetSelectedItem();var lbText=lbItem!=null?lbItem.text:"";if(text!=lbText&&text!=null&&lbText!=""){var newSelectedIndex=this.FindItemIndexByText(lb,text);lb.SelectIndex(newSelectedIndex,false)}
lb.EnsureSelectedItemVisible();},HideDropDownArea:function(){this.DropDownButtonPop();ASPxClientDropDownEdit.prototype.HideDropDownArea.call(this);},EnableLBDivOverflow:function(){var divElement=this.GetListBoxScrollDivElement();divElement.style.overflow="auto";},DisableLBDivOverflow:function(){var divElement=this.GetListBoxScrollDivElement();divElement.style.overflow="hidden";},OnDocumentMouseUp:function(){this.DropDownButtonPop();},OnDDButtonMouseMove:function(evt){return(this.droppedDown?_aspxCancelBubble(evt):true);},OnDropDown:function(evt){var lb=this.GetListBoxControl();if(lb.GetItemCount()>0){ASPxClientDropDownEdit.prototype.OnDropDown.call(this,evt);return this.droppedDown?_aspxCancelBubble(evt):true;}return true;},OnCloseUp:function(evt){var evt=_aspxGetEvent(evt);if(__aspxFirefox&&evt.type=="mouseup"&&_aspxGetEventSource(evt).tagName=="DIV")return;ASPxClientDropDownEdit.prototype.OnCloseUp.call(this,evt);},OnSelectChanged:function(){this.HideDropDownArea();var lb=this.GetListBoxControl();var item=lb.GetSelectedItem();var text=_aspxIsExists(item)?item.text:"";this.SetTextInternal(text);this.UpdateValueInput();this.OnChange();},OnChange:function(){this.RaisePersonalStandardValidation();this.OnValueChanged();},ParseValue:function(){this.SetText(ASPxClientButtonEditBase.prototype.GetValue.call(this));this.OnChange();},RaiseValueChangedEvent:function(){var processOnServer=ASPxClientEdit.prototype.RaiseValueChangedEvent.call(this);if(_aspxIsExists(this.RaiseSelectedIndexChanged))processOnServer=this.RaiseSelectedIndexChanged()||processOnServer;return processOnServer;}});var __aspxDropDownCollection=null;function aspxGetDropDownCollection(){if(__aspxDropDownCollection==null)__aspxDropDownCollection=new ASPxClientDropDownCollection();return __aspxDropDownCollection;}
_aspxAttachEventToDocument("mousedown",aspxDropDownDocumentMouseDown);function aspxDropDownDocumentMouseDown(evt){return aspxGetDropDownCollection().OnDocumentMouseDown(evt);}
_aspxAttachEventToDocument("mouseup",aspxDropDownDocumentMouseUp);function aspxDropDownDocumentMouseUp(evt){return aspxGetDropDownCollection().OnDocumentMouseUp(evt);}
function aspxDDTextChanged(name){var edit=aspxGetControlCollection().Get(name);if(edit)edit.OnTextChanged();}
function aspxDDDropDown(name,evt){if(_aspxGetIsLeftButtonPressed(evt)){var dd=aspxGetControlCollection().Get(name);if(_aspxIsExists(dd))return dd.OnDropDown(evt);}}
function aspxDDCloseUp(name,evt){var dd=aspxGetControlCollection().Get(name);dd.OnCloseUp(evt);}
function aspxEdDECSelectionChanging(name,evt){var dateEdit=aspxGetControlCollection().Get(name);if(dateEdit)dateEdit.OnCalendarSelectionChanging(evt.date);}
function aspxCBIClick(name,evt){var cb=aspxGetControlCollection().Get(name);if(cb!=null)cb.OnSelectChanged();}
function _aspxCBMozillaOverflowOn(name){var cb=aspxGetControlCollection().Get(name);cb.EnableLBDivOverflow();}
function _aspxCBDDButtonMMove(evt){return aspxGetDropDownCollection().OnDDButtonMouseMove(evt);}
function _aspxCBPreventSelection(evt){if(aspxGetDropDownCollection().droppedControlName!="")_aspxClearSelection();}