if(typeof Obout=="undefined"){Obout=function(){};Obout.Interface=function(){}}Obout.Interface.OboutDropDownList=function(v,x,p,m,u,h,g,b,y,w,t,d,a,k,q,c,r,i,s,z,e,l,j,n,o,f){this.ID=x;this.Type="OboutDropDownList";this.Container=document.getElementById(p);this.TopContainer=this.Container.firstChild;this.ItemsContainer=document.getElementById(m);this.TextBox=document.getElementById(u);this.ItemsInnerContainer=this.ItemsContainer.childNodes[1].childNodes[1];this.SelectedValueStorage=document.getElementById(h);this.SelectedValueStorage.name=v;this.SelectedIndexStorage=document.getElementById(g);this._text="";this._value="";this._selectedIndex=b;this._selectedIndexes=b;this.PreventTextBoxFocusing=false;this.PreventTextBoxBluring=false;this.ItemsContainerAppendedToBody=false;this.LastHighlightedItem=null;this.SelectedItem=null;this.AllowMultiSelection=i;this.MultiSelectionSeparator=e;this.Mode=z;this.AutoClose=s;this.IsClosed=true;this._openCount=0;if(typeof a=="function")this.onchange=a;else this.onchange=null;this.OnItemClick=k;this.AutoPostBack=q;if(typeof c=="function")this.PostBackTrigger=c;else this.PostBackTrigger=null;this.CssSettings=r;this.IsOver=false;this.IsPressed=false;this.IsActive=false;this.IsDisabled=!d;this.Width=y;this.Height=w;this.MenuWidth=t;this.NeedBackgroundIframe=false;this.BackgroundIframe=null;this.PreviousState=d?"N":"D";this.CreateOnlyClientObject=f;this.InitialSelectedIndex=null;this.InitAttempts=0;this.CrossBrowserFixesApplied=false;this.IsRightAligned=false;this.IsBottomAligned=false;this.AllowCloseOnResize=true;this.AttachedEventHandlers=[];this._controlsToEnable=l;this._controlsToDisable=j;this._disablingValues=n;this._enablingValues=o;this.ItemsContainerMovedToBody=false;this.PreviousParentWidth=0;this._initialStateHandled=false;this.init();this._initialized=true};Obout.Interface.OboutDropDownList.prototype.init=function(){var a=this;this.initOptionsCollection();Obout.Interface.OboutCore.show(this.TextBox,true);this.attachEventHandlers();this.IsDisabled&&this.disable();if(!this.AllowMultiSelection)this.handleInitialSelection();else window.setTimeout(Obout.Interface.OboutCore.createDelegate(this,this.handleInitialSelection),10);this.Height&&this.applyScrollingSettings();if(Obout.Interface.OboutCore.Browser.isIE6())this.NeedBackgroundIframe=true};Obout.Interface.OboutDropDownList.prototype.handleInitialSelection=function(){if(!this.AllowMultiSelection)if(this.SelectedValueStorage.value!=""){this.selectItemByValue(this.SelectedValueStorage.value,false);this.InitialSelectedIndex=this._selectedIndex}else this._selectedIndex>=0&&this.selectItemByIndex(this._selectedIndex,false,false,false);else if(this.SelectedValueStorage.value!="")for(var c=this.SelectedValueStorage.value.split(","),a=0;a<c.length;a++)this.selectItemByValue(c[a],false);else if(this._selectedIndexes!=-1){var b=this._selectedIndexes.split(",");this.setText("",false);this.setValue("",false);this.ForceTextAppend=true;for(var a=0;a<b.length;a++)this.selectItemByIndex(b[a],false,false,false,true,true,false);this.ForceTextAppend=false}};Obout.Interface.OboutDropDownList.prototype.initOptionsCollection=function(){this.options=[];this.options.DropDownList=this;this.options.add=this.addOption;this.options.remove=this.removeOption;this.options.clear=this.clearOptions};Obout.Interface.OboutDropDownList.prototype.attachTextBoxEventHandlers=function(){var a=this;this.TextBox.onblur=function(){a.setFlag("IsActive",false);a.handleTextBoxBlur()}};Obout.Interface.OboutDropDownList.prototype.attachEventHandlers=function(){var a=this;this.TopContainer.childNodes[0].onmouseover=function(){a.setFlag("IsOver");a.disableTextBoxBlurHandler()};this.TopContainer.childNodes[0].onmouseout=function(){a.setFlag("IsOver",false);a.enableTextBoxBlurHandler(false)};this.TopContainer.childNodes[0].onclick=function(){a.setFlag("IsActive");a.handleTopContainerClick(0)};this.TopContainer.childNodes[1].onmouseover=function(){a.setFlag("IsOver");a.disableTextBoxBlurHandler()};this.TopContainer.childNodes[1].onmouseout=function(){a.setFlag("IsOver",false);a.enableTextBoxBlurHandler(false)};this.TopContainer.childNodes[1].onclick=function(){a.setFlag("IsActive");a.handleTopContainerClick(1)};this.TopContainer.childNodes[2].onmouseover=function(){a.setFlag("IsOver");a.disableTextBoxBlurHandler()};this.TopContainer.childNodes[2].onmouseout=function(){a.setFlag("IsOver",false);a.enableTextBoxBlurHandler(false)};this.TopContainer.childNodes[2].onclick=function(){a.setFlag("IsActive");a.handleTopContainerClick(2)};this.TextBox.onfocus=function(){a.setFlag("IsActive");a.handleTextBoxFocus()};this.TextBox.onblur=function(){a.setFlag("IsActive",false);a.handleTextBoxBlur()};this.TextBox.onkeydown=function(b){return a.handleTextKeyPress(b)};this.ItemsContainer.onmouseover=function(){a.disableTextBoxBlurHandler()};this.ItemsContainer.onmouseout=function(){a.enableTextBoxBlurHandler(true);a.unhighlightLastHighlightedItem(false,true)};if(this.ItemsInnerContainer.childNodes)for(var e=0;e<this.ItemsInnerContainer.childNodes.length;e++){var c=this.ItemsInnerContainer.childNodes[e];c.className!="id"&&this.attachItemEventHandlers(c);var d={};d.text=this.getItemText(c);d.value=c.lastChild.innerHTML;d.enabled=c.className!="id";this.options.push(d)}try{if(typeof Sys!="undefined")Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager}catch(f){}var b=this.Container.parentNode;Obout.Interface.OboutCore.attachEventHandler(b,"resize",function(){a.closeOnParentResize()},this.AttachedEventHandlers);while(b){if(b.nodeName=="DIV")(Obout.Interface.OboutCore.getStyle(b,"overflow")=="auto"||Obout.Interface.OboutCore.getStyle(b,"overflow")=="hidden")&&Obout.Interface.OboutCore.attachEventHandler(b,"scroll",function(){a.close()},this.AttachedEventHandlers);b.nodeName=="DIV"||b.nodeName=="TD";b=b.parentNode}Obout.Interface.OboutCore.attachEventHandler(window,"resize",function(){a.closeOnResize()},this.AttachedEventHandlers);if(typeof ob_spl_isElementInsideSplitter=="function")ob_spl_isElementInsideSplitter(this.Container)!=null&&window.setTimeout(this.ID+".attachResizeHandler()",500)};Obout.Interface.OboutDropDownList.prototype.attachItemEventHandlers=function(b){var a=this;b.onmouseover=function(){a.handleItemOver(this)};b.onmouseout=function(){a.handleItemOut(this)};b.onclick=function(b){a.selectItem(this,true,true,b)}};Obout.Interface.OboutDropDownList.prototype.attachResizeHandler=function(){var b=this,a=null;if(typeof ob_spl_OnSplitterResize=="function")a=ob_spl_OnSplitterResize;ob_spl_OnSplitterResize=function(){a&&a();b.close()}};Obout.Interface.OboutDropDownList.prototype.applyCrossBrowserFixes=function(){var c=Obout.Interface.OboutCore.Browser.isIE(),a=Obout.Interface.OboutCore.Browser.isIE6(),b=Obout.Interface.OboutCore.Browser.isIEWithDoctype();if(c){if(a||!a&&!b)if(parseInt(this.Height)<this.ItemsInnerContainer.previousSibling.firstChild.offsetHeight){this.ItemsInnerContainer.previousSibling.firstChild.style.height=this.Height;this.ItemsInnerContainer.nextSibling.firstChild.style.height=this.Height}if(a){this.ItemsInnerContainer.previousSibling.style.height=this.ItemsInnerContainer.offsetHeight+"px";this.ItemsInnerContainer.nextSibling.style.height=this.ItemsInnerContainer.offsetHeight+"px";if(this.ItemsInnerContainer.previousSibling.offsetHeight<this.ItemsInnerContainer.previousSibling.firstChild.offsetHeight)this.ItemsInnerContainer.previousSibling.style.height=this.ItemsInnerContainer.previousSibling.firstChild.offsetHeight+"px";if(this.ItemsInnerContainer.nextSibling.offsetHeight<this.ItemsInnerContainer.nextSibling.firstChild.offsetHeight)this.ItemsInnerContainer.nextSibling.style.height=this.ItemsInnerContainer.nextSibling.firstChild.offsetHeight+"px"}if(a||!a&&!b)if(this.ItemsInnerContainer.offsetHeight<this.ItemsInnerContainer.previousSibling.firstChild.offsetHeight)this.ItemsInnerContainer.style.height=this.ItemsInnerContainer.nextSibling.firstChild.offsetHeight+"px"}this.CrossBrowserFixesApplied=true};Obout.Interface.OboutDropDownList.prototype.applyScrollingSettings=function(){if(Obout.Interface.OboutCore.Browser.isIEWithDoctype())if(Obout.Interface.OboutCore.hasVerticalScrollBar(this.ItemsInnerContainer.parentNode)){var a=Obout.Interface.OboutCore.getVerticalScrollBarWidth(this.ItemsInnerContainer.parentNode);this.ItemsInnerContainer.style.width=this.ItemsInnerContainer.offsetWidth-a}};Obout.Interface.OboutDropDownList.prototype.open=function(a){if(this.IsDisabled)return;if(this.Mode!=2){var d=Obout.Interface.OboutCore.Browser.isIE(),c=Obout.Interface.OboutCore.Browser.isIE6(),b=Obout.Interface.OboutCore.Browser.isIEWithDoctype();Obout.Interface.OboutCore.show(this.ItemsContainer);if(this.ItemsContainerTop==null)this.ItemsContainerTop=this.ItemsContainer.offsetTop+"px";d&&(c||!b)&&this.moveItemsContainerToBody();this.positionContainer();this.focus();!(d&&(c||!b))&&this.moveItemsContainerToBody();this.Container.style.zIndex="9999";Obout.Interface.OboutCore.show(this.ItemsContainer,true);this.ItemsContainer.style.visibility="visible";this.ItemsContainer.style.display="";this.CrossBrowserFixesApplied==false&&this.applyCrossBrowserFixes();this.NeedBackgroundIframe&&this.updateBackgroundIframePosition();this.SelectedItem&&this.SelectedItem!=this.LastHighlightedItem&&this.markItemAsHighlighted(this.SelectedItem,null,false);this.NeedBackgroundIframe&&Obout.Interface.OboutCore.show(this.getBackgroundIframe());this.IsClosed=false;this.setFlag("IsClosed",false);if(a){this.ItemsContainer.style.left=a.x;this.ItemsContainer.style.top=a.y}}if(this.Height&&this.Mode!=2)if(this._selectedIndex>=0){var e=this.getItemByIndex(this._selectedIndex);this.ensureVisible(e)}this._openCount++;if(typeof this.OnOpen=="function"&&this._openCount==1)if(this.OnOpen()==false)return};Obout.Interface.OboutDropDownList.prototype.close=function(){this._openCount=0;if(this.Mode==2)return;this.NeedBackgroundIframe&&Obout.Interface.OboutCore.hide(this.getBackgroundIframe());Obout.Interface.OboutCore.hide(this.ItemsContainer,true);this.Container.style.zIndex=0;this.moveItemsContainerFromBody();Obout.Interface.OboutCore.hide(this.ItemsContainer);var a=this.IsClosed;this.IsClosed=true;this.setFlag("IsClosed");if(typeof this.OnClose=="function"&&!a)if(this.OnClose()==false)return};Obout.Interface.OboutDropDownList.prototype.closeOnParentResize=function(){if(this.PreviousParentWidth&&this.Container.parentNode.offsetWidth==this.PreviousParentWidth)return;this.closeOnResize()};Obout.Interface.OboutDropDownList.prototype.closeOnResize=function(){this.AllowCloseOnResize&&this.close();if(this.Container!=null&&this.Container.parentNode!=null)this.PreviousParentWidth=this.Container.parentNode.offsetWidth};Obout.Interface.OboutDropDownList.prototype.moveItemsContainerToBody=function(){this.ItemsContainerMarginLeft=this.ItemsContainer.style.marginLeft;this.ItemsContainerMarginTop=this.ItemsContainer.style.marginTop;var c=Obout.Interface.OboutCore.getLeft(this.ItemsContainer),d=Obout.Interface.OboutCore.getTop(this.ItemsContainer);if(this.Width==""&&this.MenuWidth=="")this.ItemsContainer.style.width=this.Container.offsetWidth+"px";else if(this.MenuWidth.indexOf("%")!=-1){var a=parseInt(Obout.Interface.OboutCore.getInnerWidth(this.Container.parentNode)*parseInt(this.MenuWidth)/100);this.ItemsContainer.style.width=a+"px"}this.disasbleCloseOnResize();document.body.appendChild(this.ItemsContainer);this.enableCloseOnResize();this.ItemsContainer.style.left=c+"px";this.ItemsContainer.style.top=d+"px";this.ItemsContainer.style.marginLeft="0px";this.ItemsContainer.style.marginTop="0px";if(this.NeedBackgroundIframe){var b=this.getBackgroundIframe();document.body.appendChild(b)}this.ItemsContainerMovedToBody=true};Obout.Interface.OboutDropDownList.prototype.moveItemsContainerFromBody=function(){if(this.ItemsContainerMovedToBody){this.ItemsContainer.style.left="0px";this.ItemsContainer.style.top=this.ItemsContainerTop;this.ItemsContainer.style.marginLeft=this.ItemsContainerMarginLeft;this.ItemsContainer.style.marginTop=this.ItemsContainerMarginTop;this.disasbleCloseOnResize();this.Container.appendChild(this.ItemsContainer);this.enableCloseOnResize();if(this.NeedBackgroundIframe){var a=this.getBackgroundIframe();this.updateBackgroundIframePosition()}this.ItemsContainerMovedToBody=false}};Obout.Interface.OboutDropDownList.prototype.updateBackgroundIframePosition=function(){var a=this.getBackgroundIframe();a.style.left=parseInt(this.ItemsContainer.style.left)+1+"px";a.style.top=parseInt(this.ItemsContainer.style.top)+2+"px";a.style.marginLeft=this.ItemsContainer.style.marginLeft;a.style.marginTop=this.ItemsContainer.style.marginTop;a.style.width=this.ItemsContainer.offsetWidth-2+"px";a.style.height=this.ItemsContainer.offsetHeight-4+"px"};Obout.Interface.OboutDropDownList.prototype.disasbleCloseOnResize=function(){if(Obout.Interface.OboutCore.Browser.isIE())this.AllowCloseOnResize=false};Obout.Interface.OboutDropDownList.prototype.enableCloseOnResize=function(){Obout.Interface.OboutCore.Browser.isIE()&&window.setTimeout(this.ID+".AllowCloseOnResize=true;",500)};Obout.Interface.OboutDropDownList.prototype.getItemByIndex=function(a){return this.ItemsInnerContainer.childNodes&&this.ItemsInnerContainer.childNodes[a]?this.ItemsInnerContainer.childNodes[a]:null};Obout.Interface.OboutDropDownList.prototype.isSelectedItem=function(b){var a=Obout.Interface.OboutCore.getElementIndex(b);return(","+this._selectedIndexes.toString()+",").indexOf(","+a+",")!=-1?true:false};Obout.Interface.OboutDropDownList.prototype.isSelectedIndex=function(a){return(","+this._selectedIndexes.toString()+",").indexOf(","+a+",")!=-1?true:false};Obout.Interface.OboutDropDownList.prototype.selectItem=function(g,f,e,c,d){var a=false;if(this.AllowMultiSelection)if(!d){if(!c)c=window.event;if(c)a=c.ctrlKey}else a=d;var b=this.getElementIndex(g);if(!this.AllowMultiSelection){this.selectItemByIndex(b,f,true,e);this.enableTextBoxBlurHandler(false)}else{if(!a||(","+this._selectedIndexes+",").indexOf(","+b+",")==-1)this.selectItemByIndex(b,false,true,e,null,a);else this.unselectItemByIndex(b);this.enableTextBoxBlurHandler(false)}};Obout.Interface.OboutDropDownList.prototype.selectItemByValue=function(b,c){if(typeof c=="undefined")c=true;if(this.AllowMultiSelection)b=this.MultiSelectionSeparator+b+this.MultiSelectionSeparator;for(var a=0;a<this.options.length;a++)if(!this.AllowMultiSelection){if(this.options[a].value==b){this.selectItemByIndex(a,false,false,c);break}}else b.indexOf(this.MultiSelectionSeparator+this.options[a].value+this.MultiSelectionSeparator)!=-1&&this.selectItemByIndex(a,null,null,null,true,this.AllowMultiSelection,false)};Obout.Interface.OboutDropDownList.prototype.selectItemByIndex=function(a,j,k,e,i,b,g,h){if(this.ItemsInnerContainer.childNodes==null)return;if(a!=-1)var d=this.ItemsInnerContainer.childNodes[a];else var d=null;this.markItemAsHighlighted(d,this.AllowMultiSelection&&!b,false);if(!e&&(this.onchange||this.AutoPostBack)&&this.InitialSelectedIndex==null)this.InitialSelectedIndex=this._selectedIndex;if(!g)if(a!=-1&&this.options.length>a){this.setValue(this.options[a].value,this.AllowMultiSelection&&b,a);this.setText(this.options[a].text,this.AllowMultiSelection&&b,a)}else{this.setValue("");!i&&this.setText("")}this.SelectedItem=d;this.LastHighlightedItem=d;var c=false;if(this.InitialSelectedIndex==null&&this._selectedIndex!=a||this.InitialSelectedIndex!=null&&this.InitialSelectedIndex!=a)c=true;this._selectedIndex=a;if(this.AllowMultiSelection)if(b&&!(this._selectedIndexes==-1||this._selectedIndexes==null)){if(!this.isSelectedIndex(a)){if(this._selectedIndexes.toString()!="")this._selectedIndexes+=",";this._selectedIndexes+=a}}else this._selectedIndexes=a;if(!this.AllowMultiSelection)this.SelectedIndexStorage.value=a;else this.SelectedIndexStorage.value=this._selectedIndexes;c&&typeof this.OnSelectedIndexChanged=="function"&&this.OnSelectedIndexChanged();j&&this.AutoClose&&this.close();if(k){this.PreventTextBoxFocusing=true;this.focus()}(this._controlsToEnable||this._controlsToDisable)&&this.enableDependentControls();if(e){this.OnItemClick&&!h&&this.OnItemClick(this,this._selectedIndex);if(c){var f=true;if(this.onchange)f=this.onchange(this,this._selectedIndex);this.InitialSelectedIndex=null;this.AutoPostBack&&f!=false&&this.PostBackTrigger()}}};Obout.Interface.OboutDropDownList.prototype.enableDependentControls=function(){if(this._initialized){Obout.Interface.OboutCore.enableDependentControls(this);this._initialStateHandled=true}else window.setTimeout(Obout.Interface.OboutCore.createDelegate(this,this.enableDependentControls),250)};Obout.Interface.OboutDropDownList.prototype.unselectItemByIndex=function(a){var b=this.ItemsInnerContainer.childNodes[a];this.markItemAsUnhighlighted(b);this._selectedIndexes=(","+this._selectedIndexes+",").replace(","+a+",",",");this._selectedIndexes=this._selectedIndexes.substr(1,this._selectedIndexes.length-2);this._updateSelectedItems();typeof this.OnSelectedIndexChanged=="function"&&this.OnSelectedIndexChanged();if(focus){this.PreventTextBoxFocusing=true;this.focus()}};Obout.Interface.OboutDropDownList.prototype._updateSelectedItems=function(){var c=[],d=[],a=this._selectedIndexes.split(",");if(this._selectedIndexes!=-1&&a.length>0){for(var b=0;b<a.length;b++)if(this.options[a[b]]){c.push(this.options[a[b]].value);d.push(this.options[a[b]].text)}if(c.length>0){this.setValue(c.join(this.MultiSelectionSeparator),false);this.setText(d.join(this.MultiSelectionSeparator),false)}else{this.setValue("");this.setText("");this._selectedIndex=-1;this._selectedIndexes=-1}}else{this.setValue("");this.setText("");this._selectedIndex=-1;this._selectedIndexes=-1}};Obout.Interface.OboutDropDownList.prototype.setValue=function(a,b,c){if(!b){this._value=a;this.SelectedValueStorage.value=a}else if(!this.isSelectedIndex(c)||this.ForceTextAppend){if(this._value!="")this._value+=this.MultiSelectionSeparator;if(this.SelectedValueStorage.value!="")this.SelectedValueStorage.value+=this.MultiSelectionSeparator;this._value+=a;this.SelectedValueStorage.value+=a}};Obout.Interface.OboutDropDownList.prototype.setText=function(d,b,c){var a=Obout.Interface.OboutCore.Encoder.htmlDecode(d);if(!b){this.TextBox.value=a;this._text=a}else if(!this.isSelectedIndex(c)||this.ForceTextAppend){if(this._text!="")this._text+=this.MultiSelectionSeparator;if(this.TextBox.value!="")this.TextBox.value+=this.MultiSelectionSeparator;this._text+=a;this.TextBox.value+=a}};Obout.Interface.OboutDropDownList.prototype.getElementIndex=function(a){var b=0;while(a.previousSibling){a=a.previousSibling;b++}return b};Obout.Interface.OboutDropDownList.prototype.markItemAsHighlighted=function(a,b,c){this.unhighlightLastHighlightedItem(b,c);if(a!=null)a.className="ih";this.LastHighlightedItem=a};Obout.Interface.OboutDropDownList.prototype.markItemAsUnhighlighted=function(a){a.className=""};Obout.Interface.OboutDropDownList.prototype.unhighlightLastHighlightedItem=function(f,d){if(!this.AllowMultiSelection||(this._selectedIndexes==-1||this._selectedIndexes==null)){if(this.LastHighlightedItem!=null){var e=true,c=Obout.Interface.OboutCore.getElementIndex(this.LastHighlightedItem);if(!this.AllowMultiSelection&&d&&c==this._selectedIndex)e=false;if(e){this.markItemAsUnhighlighted(this.LastHighlightedItem);if(!d&&this._selectedIndex!=-1&&c!=this._selectedIndex&&this.ItemsInnerContainer.childNodes[this._selectedIndex]!=null)this.ItemsInnerContainer.childNodes[this._selectedIndex].className=""}}}else if(this._selectedIndexes!=-1&&this._selectedIndexes!=null)if(!f){if(this.LastHighlightedItem){var g=Obout.Interface.OboutCore.getElementIndex(this.LastHighlightedItem);(","+this._selectedIndexes.toString()+",").indexOf(","+g+",")==-1&&this.markItemAsUnhighlighted(this.LastHighlightedItem)}}else{for(var b=this._selectedIndexes.toString().split(","),a=0;a<b.length;a++)b[a]!=-1&&this.markItemAsUnhighlighted(this.ItemsInnerContainer.childNodes[b[a]]);this.LastHighlightedItem&&this.markItemAsUnhighlighted(this.LastHighlightedItem)}};Obout.Interface.OboutDropDownList.prototype.handleTopContainerClick=function(a){if(this.IsDisabled)return;if(typeof this.OnTopContainerClick=="function")if(this.OnTopContainerClick(a)==false)return;if(this.IsClosed)this.open();else this.close();this.focus()};Obout.Interface.OboutDropDownList.prototype.handleItemOver=function(a){this.markItemAsHighlighted(a,null,true);this.disableTextBoxBlurHandler()};Obout.Interface.OboutDropDownList.prototype.handleItemOut=function(){this.enableTextBoxBlurHandler(false)};Obout.Interface.OboutDropDownList.prototype.disableTextBoxBlurHandler=function(){this.PreventTextBoxBluring=true;this._master&&this._master.disableTextBoxBlurHandler()};Obout.Interface.OboutDropDownList.prototype.enableTextBoxBlurHandler=function(a){this.PreventTextBoxBluring=false;this._master&&this._master.enableTextBoxBlurHandler(a);a&&!this._detail&&this.Mode!=2&&this.focus()};Obout.Interface.OboutDropDownList.prototype.handleTextBoxBlur=function(){if(this.PreventTextBoxBluring==false){if(typeof this.OnTextBoxBlur=="function")if(this.OnTextBoxBlur()==false)return;this.close();if(this._selectedIndex!=-1&&this.InitialSelectedIndex!=null&&(this.onchange||this.AutoPostBack)){if(this.InitialSelectedIndex!=this._selectedIndex){var a=true;if(this.onchange)a=this.onchange(this,this._selectedIndex);this.AutoPostBack&&a!=false&&this.PostBackTrigger()}this.InitialSelectedIndex=null}}};Obout.Interface.OboutDropDownList.prototype.handleTextBoxFocus=function(){if(!this.PreventTextBoxFocusing||this.Mode==2){if(typeof this.OnTextBoxFocus=="function")if(this.OnTextBoxFocus()==false)return}else this.PreventTextBoxFocusing=false};Obout.Interface.OboutDropDownList.prototype.positionContainer=function(){var m=Obout.Interface.OboutCore.Browser.isIE(),l=Obout.Interface.OboutCore.Browser.isIE6(),h=Obout.Interface.OboutCore.Browser.isIEWithDoctype(),a=0;if(m&&(l||!h)){this.ItemsContainer.style.display="";a=parseInt(Obout.Interface.OboutCore.getStyle(this.ItemsContainer,"padding-bottom"));if(isNaN(a))a=0}var f=Obout.Interface.OboutCore.getLeft(this.TopContainer),g=Obout.Interface.OboutCore.getTop(this.TopContainer),p=this.TopContainer.offsetHeight-a,q=this.TopContainer.offsetWidth,r=Obout.Interface.OboutCore.Browser.getWindowHeight(),s=Obout.Interface.OboutCore.Browser.getWindowWidth()-Obout.Interface.OboutCore.Browser.getWindowScrollX(),e=this.ItemsContainer.offsetHeight,b=this.ItemsContainer.offsetWidth,n=f,o=g+p,i=Obout.Interface.OboutCore.Browser.getWindowScrollX(),j=Obout.Interface.OboutCore.Browser.getWindowScrollY(),c=false,d=false;if(o-j+e>r)if(g-j>e)c=true;if(b!=q)if(n-i+b>s)if(f-i>b)d=true;if(c){this.ItemsContainer.style.marginTop=-1*(this.ItemsContainer.offsetHeight+this.TopContainer.offsetHeight+1)+"px";this.IsBottomAligned=true}else if(!c){this.ItemsContainer.style.marginTop="0px";this.IsBottomAligned=false}if(d&&this.IsRightAligned==false){this.ItemsContainer.style.marginLeft=-1*(this.ItemsContainer.offsetWidth-this.TopContainer.offsetWidth)+"px";this.IsRightAligned=true}else if(!d&&this.IsRightAligned==true){this.ItemsContainer.style.marginLeft="0px";this.IsRightAligned=false}if(this.NeedBackgroundIframe){var k=this.getBackgroundIframe();if(this.ItemsContainer.style.marginTop)k.style.marginTop=this.ItemsContainer.style.marginTop;if(this.ItemsContainer.style.marginLeft)k.style.marginLeft=this.ItemsContainer.style.marginLeft}if(m&&(l||!h))this.ItemsContainer.style.display="none"};Obout.Interface.OboutDropDownList.prototype.handleTextKeyPress=function(d){var c=Obout.Interface.OboutCore.getKeyPressed(d),a=this._getCurrentHighlightedItem();if(a){var b=null;switch(c){case 37:if(a.previousSibling)b=a.previousSibling;break;case 38:if(a.previousSibling)b=a.previousSibling;break;case 39:if(a.nextSibling)b=a.nextSibling;break;case 40:if(a.nextSibling)b=a.nextSibling;break;case 13:this.selectItem(a,true,true);return false;break;case 27:this.selectItem(a,true,true);break;default:return true}if(b){this.Height&&this.ensureVisible(b);this.selectItem(b,false,false)}}return false};Obout.Interface.OboutDropDownList.prototype._getCurrentHighlightedItem=function(){return this._selectedIndex!=-1?this.ItemsInnerContainer.childNodes[this._selectedIndex]:this.LastHighlightedItem};Obout.Interface.OboutDropDownList.prototype.ensureVisible=function(a){if(a){var b=a.offsetTop+a.offsetHeight-this.ItemsInnerContainer.offsetHeight;if(b>0)this.ItemsInnerContainer.scrollTop=b}};Obout.Interface.OboutDropDownList.prototype.setFlag=function(b,a){if(typeof a=="undefined")a=true;if(!this.IsDisabled||b=="IsDisabled"){this[b]=a;if(this.IsActive)if(!this.IsClosed)this.changeState("AO");else this.changeState("AC");else if(this.IsOver)this.changeState("O");else if(this.IsDisabled)this.changeState("D");else this.changeState("N")}};Obout.Interface.OboutDropDownList.prototype.changeState=function(a){if(a!=this.PreviousState){this.Container.className=this.CssSettings[a];this.PreviousState=a}};Obout.Interface.OboutDropDownList.prototype.value=function(a){if(typeof a=="undefined")return this._value;else this.selectItemByValue(a);if(this.Height&&this._selectedIndex!=-1){var b=this.getItemByIndex(this._selectedIndex);this.ensureVisible(b)}};Obout.Interface.OboutDropDownList.prototype.selectedIndex=function(a){if(typeof a=="undefined")return this._selectedIndex;else this.selectItemByIndex(a,true,false,true)};Obout.Interface.OboutDropDownList.prototype.focus=function(){if(this._detail){this._detail.focus();return}if(!this.IsDisabled)try{this.TextBox.focus()}catch(a){}};Obout.Interface.OboutDropDownList.prototype.clearText=function(){this.TextBox.value=""};Obout.Interface.OboutDropDownList.prototype.getBackgroundIframe=function(){if(this.BackgroundIframe==null){this.BackgroundIframe=document.createElement("IFRAME");this.BackgroundIframe.src="javascript: false;";this.BackgroundIframe.className="ob_iDdlICIF";this.BackgroundIframe.frameBorder="0";this.BackgroundIframe.style.display="none";this.BackgroundIframe.style.width=this.ItemsContainer.offsetWidth+"px";this.BackgroundIframe.style.height=this.ItemsContainer.offsetHeight+"px";this.Container.appendChild(this.BackgroundIframe)}return this.BackgroundIframe};Obout.Interface.OboutDropDownList.prototype.temporaryClearText=function(){};Obout.Interface.OboutDropDownList.prototype.enable=function(){this.TextBox.disabled=false;this.setFlag("IsDisabled",false)};Obout.Interface.OboutDropDownList.prototype.disable=function(){this.TextBox.disabled=true;this.setFlag("IsDisabled",true)};Obout.Interface.OboutDropDownList.prototype.createItem=function(h,g,b){var a=document.createElement("LI"),d=document.createElement("B"),c=document.createElement("I"),e=document.createTextNode(h),f=document.createTextNode(g);d.appendChild(e);c.appendChild(f);a.appendChild(d);a.appendChild(c);if(b==-1||this.ItemsInnerContainer.childNodes.length<=b)this.ItemsInnerContainer.appendChild(a);else this.ItemsInnerContainer.insertBefore(a,this.ItemsInnerContainer.childNodes[b]);return a};Obout.Interface.OboutDropDownList.prototype.removeItem=function(a){if(this.ItemsInnerContainer.childNodes[a]){this.detachItemEventHandlers(this.ItemsInnerContainer.childNodes[a]);this.ItemsInnerContainer.removeChild(this.ItemsInnerContainer.childNodes[a])}};Obout.Interface.OboutDropDownList.prototype.clearItems=function(){while(this.ItemsInnerContainer.firstChild)this.removeItem(0)};Obout.Interface.OboutDropDownList.prototype.addToOptionsCollection=function(f,e,b,d){if(b==-1||this.length<=b){var c={};c.text=f;c.value=e;c.enabled=d;this.options.push(c)}else{var g={};this.options.push(g);for(var a=this.length-2;a>=b;a--){this[a+1].text=this[a].text;this[a+1].value=this[a].value;this[a+1].enabled=this[a].enabled}this.options[b].value=e;this.options[b].text=f;this.options[b].enabled=d;if(this._selectedIndex!=null&&this._selectedIndex!=-1&&this._selectedIndex>=b)this._selectedIndex++}};Obout.Interface.OboutDropDownList.prototype.addOption=function(c,b,a){if(typeof b=="undefined")b=c;if(typeof a=="undefined")a=-1;this.DropDownList.addToOptionsCollection(c,b,a);var d=this.DropDownList.createItem(c,b,a);this.DropDownList.attachItemEventHandlers(d)};Obout.Interface.OboutDropDownList.prototype.removeOption=function(a){if(this.length<=a)return;this.splice(a,1);this.DropDownList.removeItem(a);if(this.DropDownList._selectedIndex==a){this.DropDownList.setValue("");this.DropDownList.setText("");this.DropDownList._selectedIndex=-1}if(this.DropDownList._selectedIndex!=null&&this.DropDownList._selectedIndex!=-1&&this.DropDownList._selectedIndex>=a)this.DropDownList._selectedIndex++};Obout.Interface.OboutDropDownList.prototype.clearOptions=function(){this.DropDownList.initOptionsCollection();this.DropDownList._selectedIndex=-1;this.DropDownList.setValue("");this.DropDownList.setText("");this.DropDownList.clearItems()};Obout.Interface.OboutDropDownList.prototype.getItemText=function(a){return a.firstChild.childNodes.length<2?a.firstChild.firstChild==null||a.firstChild.firstChild.nodeName!="IMG"?Obout.Interface.OboutCore.Encoder.htmlDecode(a.firstChild.innerHTML):"":Obout.Interface.OboutCore.Encoder.htmlDecode(a.firstChild.lastChild.nodeValue)};Obout.Interface.OboutDropDownList.prototype.destruct=function(){return;this.detachEventHandlers();if(this.CreateOnlyClientObject){this.TopContainer&&this.TopContainer.parentNode&&this.TopContainer.parentNode.removeChild(this.TopContainer);this.ItemsContainer&&this.ItemsContainer.parentNode&&this.ItemsContainer.parentNode.removeChild(this.ItemsContainer)}this.TopContainer=null;this.ItemsContainer=null;this.TextBox=null;this.ItemsInnerContainer=null;this.SelectedValueStorage=null;this.Container=null};Obout.Interface.OboutDropDownList.prototype.detachEventHandlers=function(){if(this.TopContainer){this.TopContainer.childNodes[0].onmouseover=null;this.TopContainer.childNodes[0].onmouseout=null;this.TopContainer.childNodes[0].onclick=null;this.TopContainer.childNodes[1].onmouseover=null;this.TopContainer.childNodes[1].onmouseout=null;this.TopContainer.childNodes[1].onclick=null;this.TopContainer.childNodes[2].onmouseover=null;this.TopContainer.childNodes[2].onmouseout=null;this.TopContainer.childNodes[2].onclick=null}if(this.TextBox){this.TextBox.onblur=null;this.TextBox.onfocus=null;this.TextBox.onkeydown=null}if(this.ItemsContainer){this.ItemsContainer.onmouseover=null;this.ItemsContainer.onmouseout=null;if(this.ItemsInnerContainer.childNodes)for(var a=0;a<this.ItemsInnerContainer.childNodes.length;a++){var b=this.ItemsInnerContainer.childNodes[a];this.detachItemEventHandlers(b)}}Obout.Interface.OboutCore.detachAllEventHandlers(this.AttachedEventHandlers)};Obout.Interface.OboutDropDownList.prototype.detachItemEventHandlers=function(a){a.onmouseover=null;a.onmouseout=null;a.onclick=null};oboutDdlJSLoaded=true;try{if(Sys)Sys.Application&&Sys.Application.notifyScriptLoaded()}catch(ex){};