Type.registerNamespace("MD.TotalMerrill.MarketDataWidgets");var MDUtilityHelper;MD.TotalMerrill.MarketDataWidgets.WebServiceCode=function(){throw Error.invalidOperation()};MD.TotalMerrill.MarketDataWidgets.WebServiceCode.prototype={Error:-1,Success:0,NotFound:4};MD.TotalMerrill.MarketDataWidgets.WebServiceCode.registerEnum("MD.TotalMerrill.MarketDataWidgets.WebServiceCode");MD.TotalMerrill.MarketDataWidgets.SecurityType=function(){throw Error.invalidOperation()};MD.TotalMerrill.MarketDataWidgets.SecurityType.prototype={Equity:0,Option:1,MutualFund:2,Bond:3,ETF:4,Index:5,MoneyFund:6,Unknown:7,CloseEndedFund:8};MD.TotalMerrill.MarketDataWidgets.SecurityType.registerEnum("MD.TotalMerrill.MarketDataWidgets.SecurityType");MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode=function(A){MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.initializeBase(this,[A]);this._textBoxElement=null;this._btnGetQuoteLinkElement=null;this._quotePopupContainerElement=null;this._getQuoteBtnClickHandler=null;this._keyUpHandler=null;this._onGotFocusHandler=null;this._quoteHoverBehaviourID=null;this._autoCompleteBehaviourID=null;this._quoteHoverShownHandler=null;this._quoteHoverHiddenHandler=null;this._quoteHoverStyle="relCHoverPopup";this._dataUnknown="quote_unknown";this._quoteStockStyle="quote_stock";this._quoteETFStyle="quote_etf";this._quoteMutualFundStyle="quote_mutualFund";this._quoteMoneyFundStyle="quote_moneyFund";this._quoteOptionStyle="quote_option";this._quoteIndexStyle="quote_index";this.priceUpArrow="priceUp";this.priceDownArrow="priceDown";this.priceUp="up";this.priceDown="down";this._elIframe=null;this._autoCompleteShowingHandler=null;this._isQuoteHoverVisible=null;this._eventsInitialized=null;this._data=null;this._chartURL=""};MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.prototype={initialize:function(){try{MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.callBaseMethod(this,"initialize");this._getQuoteBtnClickHandler=Function.createDelegate(this,this._onGetQuoteButtonClick);$addHandler(this._btnGetQuoteLinkElement,"click",this._getQuoteBtnClickHandler);this._keyUpHandler=Function.createDelegate(this,this._onKeyUp);$addHandler(this._textBoxElement,"keyup",this._keyUpHandler);this._onGotFocusHandler=Function.createDelegate(this,this._onGotFocus);$addHandler(this._textBoxElement,"focus",this._onGotFocusHandler);if(this._elIframe==null&&((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7))){this._createIFrame()}this._isQuoteHoverVisible=false;this._eventsInitialized=false}catch(A){MDUtilityHelper.processException(A,"initialize")}},dispose:function(){try{MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.callBaseMethod(this,"dispose");if(this._getQuoteBtnClickHandler){$removeHandler(this._btnGetQuoteLinkElement,"click",this._getQuoteBtnClickHandler);this._getQuoteBtnClickHandler=null}if(this._keyUpHandler){$removeHandler(this._textBoxElement,"keyup",this._keyUpHandler);this._keyUpHandler=null}if(this._onGotFocusHandler){$removeHandler(this._textBoxElement,"focus",this._onGotFocusHandler);this._onGotFocusHandler=null}if(this._quoteHoverBehaviour){if(this._quoteHoverHiddenHandler){this._quoteHoverBehaviour.remove_hidden(this._quoteHoverHiddenHandler);this._quoteHoverHiddenHandler=null}if(this._quoteHoverShownHandler){this._quoteHoverBehaviour.remove_shown(this._quoteHoverShownHandler);this._quoteHoverShownHandler=null}}if(this._autoCompleteBehaviourID&&this._autoCompleteShowingHandler){this._autoCompleteBehaviourID.remove_showing(this._autoCompleteShowingHandler);this._autoCompleteShowingHandler=null}}catch(A){MDUtilityHelper.processException(A,"dispose")}},get_textBoxElement:function(){return this._textBoxElement},set_textBoxElement:function(A){if(this._textBoxElement!=A){this._textBoxElement=A;this.raisePropertyChanged("textBoxElement")}},get_btnGetQuoteLinkElement:function(){return this._btnGetQuoteLinkElement},set_btnGetQuoteLinkElement:function(A){if(this._btnGetQuoteLinkElement!=A){this._btnGetQuoteLinkElement=A;this.raisePropertyChanged("btnGetQuoteLinkElement")}},get_quotePopupContainerElement:function(){return this._quotePopupContainerElement},set_quotePopupContainerElement:function(A){if(this._quotePopupContainerElement!=A){this._quotePopupContainerElement=A;this.raisePropertyChanged("quotePopupContainerElement")}},get_quoteHoverBehaviourID:function(){return this._quoteHoverBehaviourID},set_quoteHoverBehaviourID:function(A){if(this._quoteHoverBehaviourID!=A){this._quoteHoverBehaviourID=A;this.raisePropertyChanged("quoteHoverBehaviourID")}},get_autoCompleteBehaviourID:function(){return this._autoCompleteBehaviourID},set_autoCompleteBehaviourID:function(A){if(this._autoCompleteBehaviourID!=A){this._autoCompleteBehaviourID=A;this.raisePropertyChanged("autoCompleteBehaviourID")}},get_showHoverOnGetQuoteClick:function(){return this._showHoverOnGetQuoteClick},set_showHoverOnGetQuoteClick:function(A){if(this._showHoverOnGetQuoteClick!=A){this._showHoverOnGetQuoteClick=A;this.raisePropertyChanged("showHoverOnGetQuoteClick")}},_onGotFocus:function(A){this._textBoxElement.select()},_onKeyUp:function(C){try{var A=C.keyCode?C.keyCode:C.rawEvent.keyCode;if(A!==Sys.UI.Key.enter&&A!==Sys.UI.Key.tab){this._hideQuoteHover()}}catch(B){MDUtilityHelper.processException(B,"_onKeyUp")}},_onGetQuoteButtonClick:function(B){try{this.showHover(this._textBoxElement.value)}catch(A){MDUtilityHelper.processException(A,"_onGetQuoteButtonClick")}},showHover:function(B){try{if(MDUtilityHelper.isNullOrEmpty(B)){alert("Please enter a symbol");return(false)}this._hideQuoteHover();if(B.trim()==="Enter Symbol"){alert("Please enter a symbol");return(false)}if(this._textBoxElement){this._textBoxElement.value=this._textBoxElement.value.toUpperCase();this._textBoxElement.select()}B=B.toUpperCase();this._showMessage(B);this._showQuoteHover();MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.GetMarketData(B,Function.createDelegate(this,this._getMarketData_OnSuccess),Function.createDelegate(this,this._getMarketData_OnFailure),B)}catch(A){this._showMessage(B,"We are sorry, but we are unable to retrieve data for this security. Please try again.");MDUtilityHelper.processException(A,"showHover")}},_quoteHoverShown:function(){try{this._isQuoteHoverVisible=true}catch(A){MDUtilityHelper.processException(A,"_quoteHoverShown")}},_quoteHoverHidden:function(){try{if(Sys.Browser.agent==Sys.Browser.InternetExplorer){if(this._elIframe){this._elIframe.style.display="none"}}if(this._quotePopupContainerElement){this._quotePopupContainerElement.innerHTML="";this._quotePopupContainerElement.className="hidden"}this._isQuoteHoverVisible=false}catch(A){MDUtilityHelper.processException(A,"_quoteHoverHidden")}},_showQuoteHover:function(){if(!this._eventsInitialized){this._initializeEvents()}var A=$find(this._quoteHoverBehaviourID);if(A){A.show()}this._positionIFrame()},_hideQuoteHover:function(){var A=$find(this._quoteHoverBehaviourID);if(A){A.hide();var B=A.get_element();if(Sys.UI.DomElement.containsCssClass(B,"visible")){Sys.UI.DomElement.removeCssClass(B,"visible")}}},_initializeEvents:function(){if(!this._autoCompleteShowingHandler){var B=$find(this._autoCompleteBehaviourID);if(B){this._autoCompleteShowingHandler=Function.createDelegate(this,function(D,C){if(this._isQuoteHoverVisible===true){C.set_cancel(true)}});B.add_showing(this._autoCompleteShowingHandler)}}var A=$find(this._quoteHoverBehaviourID);this._eventsInitialized=true},_getMarketData_OnSuccess:function(A,D){try{var B=null;this._data=A;if(A&&A.ReturnValue==MD.TotalMerrill.MarketDataWidgets.WebServiceCode.Success){B=this.get_id()+"_"+A.SecurityType;switch(A.SecurityType){case MD.TotalMerrill.MarketDataWidgets.SecurityType.Equity:this._loadPanel(B,this._quoteStockStyle);this._showStockQuoteData(B,A);break;case MD.TotalMerrill.MarketDataWidgets.SecurityType.MutualFund:this._loadPanel(B,this._quoteMutualFundStyle);this._showMutualFundQuoteData(B,A);break;case MD.TotalMerrill.MarketDataWidgets.SecurityType.MoneyFund:this._loadPanel(B,this._quoteMoneyFundStyle);this._showMoneyFundQuoteData(B,A);break;case MD.TotalMerrill.MarketDataWidgets.SecurityType.ETF:this._loadPanel(B,this._quoteETFStyle);this._showETFQuoteData(B,A);break;case MD.TotalMerrill.MarketDataWidgets.SecurityType.Option:this._loadPanel(B,this._quoteOptionStyle);this._showOptionQuoteData(B,A);break;case MD.TotalMerrill.MarketDataWidgets.SecurityType.Index:this._loadPanel(B,this._quoteIndexStyle);this._showIndexQuoteData(B,A);break;case MD.TotalMerrill.MarketDataWidgets.SecurityType.CloseEndedFund:this._loadPanel(B,this._quoteMutualFundStyle);this._showCloseEndedFundQuoteData(B,A);break;default:this._showMessage(D,"We are sorry, but we are unable to retrieve data for this security. Please try again.");break}}else{if(A&&A.ReturnValue==MD.TotalMerrill.MarketDataWidgets.WebServiceCode.NotFound){this._showMessage("No Matches Found","There are no securities that match your search parameters.")}else{this._showMessage(D,"We are sorry, but we are unable to retrieve data for this security. Please try again.")}}}catch(C){this._showMessage(D,"We are sorry, but we are unable to retrieve data for this security. Please try again.");MDUtilityHelper.processException(C,"_getMarketData_OnSuccess")}finally{this._positionIFrame()}},_showMessage:function(D,C){try{var A=this.get_id()+"_"+MD.TotalMerrill.MarketDataWidgets.SecurityType.Unknown;this._loadPanel(A,this._dataUnknown);this._showUnknownQuote(A,D,C)}catch(B){MDUtilityHelper.processException(B,"_showMessage")}},_loadPanel:function(A,B){this._quotePopupContainerElement.className="visible";var C=$get(A);if(!MDUtilityHelper.isNullOrUndefined(C)){this._quotePopupContainerElement.innerHTML=C.parentNode.innerHTML;this._quotePopupContainerElement.firstChild.style.display=""}},_getMarketData_OnFailure:function(A,C){try{this._showMessage(C,"We are sorry, but we are unable to retrieve data for this security. Please try again.")}catch(B){MDUtilityHelper.processException(B,"_getMarketData_OnFailure")}},get_chartURL:function(){return this._chartURL},set_chartURL:function(A){this._chartURL=A},_showUnknownQuote:function(A,C,B){if(MDUtilityHelper.isNullOrUndefined(A)){return(false)}$addHandler($get(A+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var D=new Array();D.push(new MDUtilityHelper.quoteRecord("_lblErrorInfo",B));D.push(new MDUtilityHelper.quoteRecord("_Desc1",C));D.push(new MDUtilityHelper.quoteRecord("_DisplayName","&nbsp;"));if(!MDUtilityHelper.isNullOrUndefined(B)){$get(A+"_hoverBody").style.display="none";$get(A+"_errorDiv").style.display=""}else{$get(A+"_hoverBody").style.display="";$get(A+"_errorDiv").style.display="none"}MDUtilityHelper.fillValues(A,D)},_showStockQuoteData:function(I,E){if(MDUtilityHelper.isNullOrUndefined(E)){return(false)}if(MDUtilityHelper.isNullOrUndefined(E.EquityResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(I)){return(false)}var K=E.EquityResponse;$addHandler($get(I+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var F="",D="";if(K.NumValueType!==0){F=(K.NumValueType===-1?this.priceDown:this.priceUp);D=(K.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var B=new Array();B.push(new MDUtilityHelper.quoteRecord("_DisplayName",E.Symbol));B.push(new MDUtilityHelper.quoteRecord("_Desc1",E.SymbolDescription));B.push(new MDUtilityHelper.quoteRecord("_Price",K.CurrentPrice));B.push(new MDUtilityHelper.quoteRecord("_PriceChange",K.NetChange,null,F));B.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",K.PercentChange,null,D));B.push(new MDUtilityHelper.quoteRecord("_DaysVolume",K.DaysVoulme));B.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(K.Low52Week)+" - "+MDUtilityHelper.getStringValue(K.High52Week)));B.push(new MDUtilityHelper.quoteRecord("_BidAndAsk",MDUtilityHelper.getStringValue(K.BidPrice)+" / "+MDUtilityHelper.getStringValue(K.AskPrice)));if(K.RatingRecords){if(K.RatingRecords[0]&&!MDUtilityHelper.isNullOrEmpty(K.RatingRecords[0].VendorName)){B.push(new MDUtilityHelper.quoteRecord("_MLRating",K.RatingRecords[0].VendorRating))}else{$get(I+"_MLRatingDiv").style.display="none"}if(K.RatingRecords[1]&&!MDUtilityHelper.isNullOrEmpty(K.RatingRecords[1].RatingDescription)){B.push(new MDUtilityHelper.quoteRecord("_Rating1Value",K.RatingRecords[1].RatingDescription));B.push(new MDUtilityHelper.quoteRecord("_Rating1ProviderName",K.RatingRecords[1].VendorName));B.push(new MDUtilityHelper.quoteRecord("_Rating1AsOfDate",K.RatingRecords[1].RatingChangeDate))}if(K.RatingRecords[2]&&!MDUtilityHelper.isNullOrEmpty(K.RatingRecords[2].RatingDescription)){B.push(new MDUtilityHelper.quoteRecord("_Rating2Value",K.RatingRecords[2].RatingDescription));B.push(new MDUtilityHelper.quoteRecord("_Rating2ProviderName",K.RatingRecords[2].VendorName));B.push(new MDUtilityHelper.quoteRecord("_Rating2AsOfDate",K.RatingRecords[2].RatingChangeDate))}if(K.RatingRecords[3]&&!MDUtilityHelper.isNullOrEmpty(K.RatingRecords[3].VendorRating)){B.push(new MDUtilityHelper.quoteRecord("_Rating3Value",K.RatingRecords[3].VendorRating));B.push(new MDUtilityHelper.quoteRecord("_Rating3ProviderName",K.RatingRecords[3].VendorName));B.push(new MDUtilityHelper.quoteRecord("_Rating3AsOfDate",K.RatingRecords[3].RatingChangeDate))}}B.push(new MDUtilityHelper.quoteRecord("_Asof",K.AsofDateTime));MDUtilityHelper.fillValues(I,B);var C=$get(I+"_Chart");if(C){C.style.visibility="";var J=Math.random()+"";J=J.replace(".","");var G=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+E.Symbol+"&x="+J;C.src=G}var A=$get(I+"_ProfileLink");if(A){$addHandler(A,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var H=$get(I+"_TradeLink");if(H){$addHandler(H,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(A,E.ProfileUrl);this._checkDadLink(H,E.TradeUrl)},_showETFQuoteData:function(I,E){if(MDUtilityHelper.isNullOrUndefined(E)){return(false)}if(MDUtilityHelper.isNullOrUndefined(E.EquityResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(I)){return(false)}var K=E.EquityResponse;$addHandler($get(I+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var F="",D="";if(K.NumValueType!==0){F=(K.NumValueType===-1?this.priceDown:this.priceUp);D=(K.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var B=new Array();B.push(new MDUtilityHelper.quoteRecord("_DisplayName",E.Symbol));B.push(new MDUtilityHelper.quoteRecord("_Desc1",E.SymbolDescription));B.push(new MDUtilityHelper.quoteRecord("_Price",K.CurrentPrice));B.push(new MDUtilityHelper.quoteRecord("_PriceChange",K.NetChange,null,F));B.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",K.PercentChange,null,D));B.push(new MDUtilityHelper.quoteRecord("_DaysVolume",K.DaysVoulme));B.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(K.Low52Week)+" - "+MDUtilityHelper.getStringValue(K.High52Week)));B.push(new MDUtilityHelper.quoteRecord("_BidAndAsk",MDUtilityHelper.getStringValue(K.BidPrice)+" / "+MDUtilityHelper.getStringValue(K.AskPrice)));if(K.RatingRecords){if(K.RatingRecords[0]&&!MDUtilityHelper.isNullOrEmpty(K.RatingRecords[0].VendorName)){B.push(new MDUtilityHelper.quoteRecord("_MLRating",K.RatingRecords[0].VendorRating))}else{$get(I+"_MLRatingDiv").style.display="none"}}B.push(new MDUtilityHelper.quoteRecord("_Asof",K.AsofDateTime));MDUtilityHelper.fillValues(I,B);var C=$get(I+"_Chart");if(C){C.style.visibility="";var J=Math.random()+"";J=J.replace(".","");var G=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+E.Symbol+"&x="+J;C.src=G}var A=$get(I+"_ProfileLink");if(A){$addHandler(A,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var H=$get(I+"_TradeLink");if(H){$addHandler(H,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(A,E.ProfileUrl);this._checkDadLink(H,E.TradeUrl)},_showMutualFundQuoteData:function(I,E){if(MDUtilityHelper.isNullOrUndefined(E)){return(false)}if(MDUtilityHelper.isNullOrUndefined(E.FundResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(I)){return(false)}var K=E.FundResponse;$addHandler($get(I+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var F="",D="";if(K.NumValueType!==0){F=(K.NumValueType===-1?this.priceDown:this.priceUp);D=(K.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var B=new Array();B.push(new MDUtilityHelper.quoteRecord("_DisplayName",E.Symbol));B.push(new MDUtilityHelper.quoteRecord("_Desc1",E.SymbolDescription));B.push(new MDUtilityHelper.quoteRecord("_Price",K.NavPrice));B.push(new MDUtilityHelper.quoteRecord("_PriceChange",K.NetChange,null,F));B.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",K.PercentChange,null,D));B.push(new MDUtilityHelper.quoteRecord("_Max_Offering_Price",K.MaxOfferingPrice));B.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(K.Low52Week)+" - "+MDUtilityHelper.getStringValue(K.High52Week)));B.push(new MDUtilityHelper.quoteRecord("_Prev_NAV",K.PreviousNAV));B.push(new MDUtilityHelper.quoteRecord("_Recent_Cap_Gain",K.RecentCapitalGain));B.push(new MDUtilityHelper.quoteRecord("_Recent_Dividend",K.RecentDividend));B.push(new MDUtilityHelper.quoteRecord("_Total_Net_Asset_AsOf",K.TotalNetAssetDate));B.push(new MDUtilityHelper.quoteRecord("_Asof",K.AsOfDate));MDUtilityHelper.fillValues(I,B);var C=$get(I+"_Chart");if(C){C.style.visibility="";var J=Math.random()+"";J=J.replace(".","");var G=this.get_chartURL()+"?Id=TOTALMERRILL2&s="+E.Symbol+"&x="+J;C.src=G}var A=$get(I+"_ProfileLink");if(A){$addHandler(A,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var H=$get(I+"_TradeLink");if(H){$addHandler(H,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(A,E.ProfileUrl);this._checkDadLink(H,E.TradeUrl)},_showCloseEndedFundQuoteData:function(J,F){if(MDUtilityHelper.isNullOrUndefined(F)){return(false)}if(MDUtilityHelper.isNullOrUndefined(F.CloseEndedResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(J)){return(false)}var A=F.CloseEndedResponse;$addHandler($get(J+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var G="",E="";if(A.NumValueType!==0){G=(A.NumValueType===-1?this.priceDown:this.priceUp);E=(A.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var C=new Array();C.push(new MDUtilityHelper.quoteRecord("_DisplayName",F.Symbol));C.push(new MDUtilityHelper.quoteRecord("_Desc1",F.SymbolDescription));C.push(new MDUtilityHelper.quoteRecord("_Price",A.NavPrice));C.push(new MDUtilityHelper.quoteRecord("_PriceChange",A.NetChange,null,G));C.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",A.PercentChange,null,E));C.push(new MDUtilityHelper.quoteRecord("_Max_Offering_Price",A.MaxOfferingPrice));C.push(new MDUtilityHelper.quoteRecord("_Days_Range",MDUtilityHelper.getStringValue(A.DaysLow)+" - "+MDUtilityHelper.getStringValue(A.DaysHigh)));C.push(new MDUtilityHelper.quoteRecord("_Volume",A.Volume));C.push(new MDUtilityHelper.quoteRecord("_Prev_Close",A.PreviousClose));C.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(A.Low52Week)+" - "+MDUtilityHelper.getStringValue(A.High52Week)));var L;if(A.DividendShare){L=A.DividendShare}if(A.ExDividendDate){L+=" ("+A.ExDividendDate+")"}C.push(new MDUtilityHelper.quoteRecord("_Dividend_Share",L));C.push(new MDUtilityHelper.quoteRecord("_Dividend_Yield",A.DividendYield));C.push(new MDUtilityHelper.quoteRecord("_PE_Ratio",A.PERatio));C.push(new MDUtilityHelper.quoteRecord("_Earning_Share",A.Earnings));C.push(new MDUtilityHelper.quoteRecord("_Total_Net_Asset_AsOf",A.TotalNetAssetDate));C.push(new MDUtilityHelper.quoteRecord("_Asof",A.AsOfDate));MDUtilityHelper.fillValues(J,C);var D=$get(J+"_Chart");if(D){D.style.visibility="";var K=Math.random()+"";K=K.replace(".","");var H=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+F.Symbol+"&x="+K;D.src=H}var B=$get(J+"_ProfileLink");if(B){$addHandler(B,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var I=$get(J+"_TradeLink");if(I){$addHandler(I,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(B,F.ProfileUrl);this._checkDadLink(I,F.TradeUrl)},_showMoneyFundQuoteData:function(A,B){if(MDUtilityHelper.isNullOrUndefined(B)){return(false)}if(MDUtilityHelper.isNullOrUndefined(B.MoneyFundResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(A)){return(false)}var E=B.MoneyFundResponse;$addHandler($get(A+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var C=new Array();C.push(new MDUtilityHelper.quoteRecord("_DisplayName",B.Symbol));C.push(new MDUtilityHelper.quoteRecord("_Desc1",B.SymbolDescription));C.push(new MDUtilityHelper.quoteRecord("_CashYield",E.Yield));MDUtilityHelper.fillValues(A,C);var D=$get(A+"_ProfileLink");if(D){$addHandler(D,"click",Function.createDelegate(this,this._viewProfileLink_Click))}this._checkDadLink(D,B.ProfileUrl)},_showOptionQuoteData:function(J,E){if(MDUtilityHelper.isNullOrUndefined(E)){return(false)}if(MDUtilityHelper.isNullOrUndefined(E.OptionResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(J)){return(false)}var F=E.OptionResponse;$addHandler($get(J+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var G="",D="";if(F.NumValueType!==0){G=(F.NumValueType===-1?this.priceDown:this.priceUp);D=(F.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var B=new Array();B.push(new MDUtilityHelper.quoteRecord("_DisplayName"," "));B.push(new MDUtilityHelper.quoteRecord("_Desc1",F.FullOptionSymbol));B.push(new MDUtilityHelper.quoteRecord("_Price",F.CurrentPrice));B.push(new MDUtilityHelper.quoteRecord("_PriceChange",F.NetChange,null,G));B.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",F.PercentChange,null,D));B.push(new MDUtilityHelper.quoteRecord("_DaysVolume",F.DaysVoulme));B.push(new MDUtilityHelper.quoteRecord("_BidAsk",MDUtilityHelper.getStringValue(F.BidPrice)+" / "+MDUtilityHelper.getStringValue(F.AskPrice)));B.push(new MDUtilityHelper.quoteRecord("_OptionType",F.PutCall));B.push(new MDUtilityHelper.quoteRecord("_ExercisePrice",F.StrikePrice));B.push(new MDUtilityHelper.quoteRecord("_ExpirationDate",F.ExpirationDate));B.push(new MDUtilityHelper.quoteRecord("_Asof",F.AsofDateTime));MDUtilityHelper.fillValues(J,B);var C=$get(J+"_Chart");if(C){C.style.visibility="";var K=Math.random()+"";K=K.replace(".","");var H=this.get_chartURL()+"?Id=TOTALMERRILL2&s="+E.Symbol+"&x="+K;C.src=H}var A=$get(J+"_ProfileLink");if(A){$addHandler(A,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var I=$get(J+"_TradeLink");if(I){$addHandler(I,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(A,E.ProfileUrl);this._checkDadLink(I,E.TradeUrl)},_showIndexQuoteData:function(I,E){if(MDUtilityHelper.isNullOrUndefined(E)){return(false)}if(MDUtilityHelper.isNullOrUndefined(E.IndexResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(I)){return(false)}var F=E.IndexResponse;$addHandler($get(I+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var G="",D="";if(F.NumValueType!==0){G=(F.NumValueType===-1?this.priceDown:this.priceUp);D=(F.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var B=new Array();B.push(new MDUtilityHelper.quoteRecord("_DisplayName",E.Symbol));B.push(new MDUtilityHelper.quoteRecord("_Desc1",E.SymbolDescription));B.push(new MDUtilityHelper.quoteRecord("_Price",F.CurrentPrice));B.push(new MDUtilityHelper.quoteRecord("_PriceChange",F.NetChange,null,G));B.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",F.PercentChange,null,D));B.push(new MDUtilityHelper.quoteRecord("_PrevClose",F.PreviousClose));B.push(new MDUtilityHelper.quoteRecord("_Week52Low",F.Low52Week));B.push(new MDUtilityHelper.quoteRecord("_Week52High",F.High52Week));B.push(new MDUtilityHelper.quoteRecord("_DaysLow",F.DaysLow));B.push(new MDUtilityHelper.quoteRecord("_DaysHigh",F.DaysHigh));B.push(new MDUtilityHelper.quoteRecord("_Asof",F.AsofDateTime));MDUtilityHelper.fillValues(I,B);var C=$get(I+"_Chart");if(C){C.style.visibility="";var J=Math.random()+"";J=J.replace(".","");var H=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+E.Symbol+"&x="+J;C.src=H}var A=$get(I+"_ProfileLink");if(A){$addHandler(A,"click",Function.createDelegate(this,this._viewProfileLink_Click))}this._checkDadLink(A,E.ProfileUrl)},_positionIFrame:function(){if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<=6){var A=this._elIframe;if(A&&this._quotePopupContainerElement){A.style.width=this._quotePopupContainerElement.offsetWidth+"px";A.style.height=this._quotePopupContainerElement.offsetHeight+"px";A.style.top=this._quotePopupContainerElement.style.top;A.style.left=this._quotePopupContainerElement.style.left;A.style.display="block"}}},_createIFrame:function(){var B,A;A=OnlineCommonJSFunctions.getBlankHTMPath();B=document.createElement("iframe");B.setAttribute("id",this.get_id()+"_iframe");B.setAttribute("frameborder","0");B.style.position="absolute";B.style.zIndex="0";B.style.display="none";B.src=A;this._elIframe=B;this._textBoxElement.parentNode.insertBefore(this._elIframe,this._textBoxElement.nextSibling)},_viewProfileLink_Click:function(A){if(!MDUtilityHelper.isNullOrEmpty(this._data.ProfileUrl)){MDUtilityHelper.supressEventBubbling(A);this._hideQuoteHover();window.location=this._data.ProfileUrl}},_tradeLink_Click:function(A){if(!MDUtilityHelper.isNullOrEmpty(this._data.TradeUrl)){MDUtilityHelper.supressEventBubbling(A);this._hideQuoteHover();window.location=this._data.TradeUrl}},_showViewPositionDetailLink:function(A,B){var D=$get(A+"_PDLink");if(!D){return }var C=$get(A+"_vpdTradeSp");if(!MDUtilityHelper.isNullOrUndefined(B)&&!MDUtilityHelper.isNullOrUndefined(B.ViewPositionDetailParams)){D.style.display="";$addHandler(D,"click",Function.createDelegate(B.ViewPositionDetailParams,this._viewPositionDetails_Click));if(C){C.style.display=(MDUtilityHelper.isNullOrEmpty(B.TradeUrl)?"none":"")}}else{D.style.display="none";if(C){C.style.display="none"}}},_viewPositionDetails_Click:function(A){if(!MDUtilityHelper.isNullOrUndefined(GEHoverUtility)&&GEHoverUtility.ShowPostionDetail){MDUtilityHelper.supressEventBubbling(A);GEHoverUtility.ShowPostionDetail(this.InstType,this.PCCode,this.CustomSecID,this.TickerSymbol,this.MarketDataSymbol,this.Desc,this.ContractNo,this.AccountIndex,this.PdLot,this.IsETF,this.UlSymbol)}},_checkDadLink:function(A,B){if(!A){return }if(MDUtilityHelper.isNullOrEmpty(B)){A.style.display="none"}}};MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.registerClass("MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode",Sys.UI.Control);MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.Helper=function(){this.ERROR_CODE_HANDLED=1100;this.updatingCssClass="loadImgAlt";this.popupDelay=500;this.EscapeCharaters={"'":"&#39;",'"':"&#34;","<":"&lt;",">":"&gt;","?":"&hellip;","?":"&ldquo;","?":"&rdquo;","?":"&lsquo;","?":"&rsquo;","?":"&mdash;","?":"&ndash;"," ":"&nbsp;","=":"&#61;"};this.EscapeCharatersPD={"&#39;":";apos;","&#34;":"%22","&":"%26"};this.XssEscChars={"'":"@"};this.ratingTemplate={"1":'<span class="rating1"></span>',"2":'<span class="rating2"></span>',"3":'<span class="rating3"></span>',"4":'<span class="rating4"></span>',"5":'<span class="rating5"></span>'};this.grayRatingTemplate={"1":'<span class="rating1Gray"></span>',"2":'<span class="rating2Gray"></span>',"3":'<span class="rating3Gray"></span>',"4":'<span class="rating4Gray"></span>',"5":'<span class="rating5Gray"></span>'}};MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.Helper.prototype={isNullOrUndefined:function(A){return(typeof (A)==="undefined"||A===null)},isNullOrEmpty:function(A){return(this.isNullOrUndefined(A)||A==="")},replaceAll:function(C,A){var B=C;if(typeof (B)!=="string"){return B}if(this.isNullOrEmpty(B)){return B}if(this.isNullOrUndefined(A)){A=this.EscapeCharaters}for(key in A){B=B.replace(new RegExp(key,"g"),A[key])}return B},quoteRecord:function(D,C,B,A){this.id=D;this.data=C;this.defaultValue=B;this.cssClass=A},fillValues:function(B,E){if(!this.isNullOrUndefined(E)){for(var D=0,A=E.length;D<A;D++){var F=E[D];var C=$get(B+F.id);if(!this.isNullOrUndefined(C)){C.innerHTML=this.getStringValue(F.data,F.defaultValue);if(!this.isNullOrEmpty(F.cssClass)){Sys.UI.DomElement.addCssClass(C,F.cssClass)}}}}},getStringValue:function(B,A){if(this.isNullOrEmpty(A)){A="--"}if(this.isNullOrEmpty(B)){return A}return B},onQuoteItemSelected:function(D,E){try{var C=D.get_element();var A=$find(C.parentNode.id);if(A){A.showHover(C.value)}}catch(B){MDUtilityHelper.processException(B,"onQuoteItemSelected")}},OnChartLoad:function(A){A.style.display="";A.style.visibility="visible"},OnChartError:function(A){A.style.display="none";A.style.visibility="hidden"},processException:function(B,A){try{}catch(C){}},supressEventBubbling:function(A){A=A||window.event;A.cancelBubble=true;A.returnValue=false;if(A.stopPropagation){A.stopPropagation()}if(A.preventDefault){A.preventDefault()}}};var MDUtilityHelper=new MD.TotalMerrill.MarketDataWidgets.QuoteControlRealMode.Helper();function image_load(A){try{A.style.display="";A.className="";A.style.visiblity="visible"}catch(B){}}function image_error(A){try{A.style.display="none";A.style.visiblity="hidden"}catch(B){}}if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.BoxSide=function(){};AjaxControlToolkit.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};AjaxControlToolkit.BoxSide.registerEnum("AjaxControlToolkit.BoxSide",false);AjaxControlToolkit._CommonToolkitScripts=function(){};AjaxControlToolkit._CommonToolkitScripts.prototype={_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],getCurrentStyle:function(B,E,A){var D=null;if(B){if(B.currentStyle){D=B.currentStyle[E]}else{if(document.defaultView&&document.defaultView.getComputedStyle){var C=document.defaultView.getComputedStyle(B,null);if(C){D=C[E]}}}if(!D&&B.style.getPropertyValue){D=B.style.getPropertyValue(E)}else{if(!D&&B.style.getAttribute){D=B.style.getAttribute(E)}}}if((!D||D==""||typeof (D)==="undefined")){if(typeof (A)!="undefined"){D=A}else{D=null}}return D},getInheritedBackgroundColor:function(C){if(!C){return"#FFFFFF"}var B=this.getCurrentStyle(C,"backgroundColor");try{while(!B||B==""||B=="transparent"||B=="rgba(0, 0, 0, 0)"){C=C.parentNode;if(!C){B="#FFFFFF"}else{B=this.getCurrentStyle(C,"backgroundColor")}}}catch(A){B="#FFFFFF"}return B},getLocation:function(F){if(F===document.documentElement){return new Sys.UI.Point(0,0)}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){if(F.window===F||F.nodeType===9||!F.getClientRects||!F.getBoundingClientRect){return new Sys.UI.Point(0,0)}var K=F.getClientRects();if(!K||!K.length){return new Sys.UI.Point(0,0)}var G=K[0];var L=0;var J=0;var H=false;try{H=F.ownerDocument.parentWindow.frameElement}catch(I){H=true}if(H){var B=F.getBoundingClientRect();if(!B){return new Sys.UI.Point(0,0)}var D=G.left;var C=G.top;for(var E=1;E<K.length;E++){var A=K[E];if(A.left<D){D=A.left}if(A.top<C){C=A.top}}L=D-B.left;J=C-B.top}var M=F.document.documentElement;return new Sys.UI.Point(G.left-2-L+M.scrollLeft,G.top-2-J+M.scrollTop)}return Sys.UI.DomElement.getLocation(F)},setLocation:function(B,A){Sys.UI.DomElement.setLocation(B,A.x,A.y)},getContentSize:function(C){if(!C){throw Error.argumentNull("element")}var B=this.getSize(C);var D=this.getBorderBox(C);var A=this.getPaddingBox(C);return{width:B.width-D.horizontal-A.horizontal,height:B.height-D.vertical-A.vertical}},getSize:function(A){if(!A){throw Error.argumentNull("element")}return{width:A.offsetWidth,height:A.offsetHeight}},setContentSize:function(C,B){if(!C){throw Error.argumentNull("element")}if(!B){throw Error.argumentNull("size")}if(this.getCurrentStyle(C,"MozBoxSizing")=="border-box"||this.getCurrentStyle(C,"BoxSizing")=="border-box"){var D=this.getBorderBox(C);var A=this.getPaddingBox(C);B={width:B.width+D.horizontal+A.horizontal,height:B.height+D.vertical+A.vertical}}C.style.width=B.width.toString()+"px";C.style.height=B.height.toString()+"px"},setSize:function(C,B){if(!C){throw Error.argumentNull("element")}if(!B){throw Error.argumentNull("size")}var D=this.getBorderBox(C);var A=this.getPaddingBox(C);var E={width:B.width-D.horizontal-A.horizontal,height:B.height-D.vertical-A.vertical};this.setContentSize(C,E)},getBounds:function(A){var B=$common.getLocation(A);return new Sys.UI.Bounds(B.x,B.y,A.offsetWidth||0,A.offsetHeight||0)},setBounds:function(A,B){if(!A){throw Error.argumentNull("element")}if(!B){throw Error.argumentNull("bounds")}this.setSize(A,B);$common.setLocation(A,B)},getClientBounds:function(){var B;var A;switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:B=document.documentElement.clientWidth;A=document.documentElement.clientHeight;break;case Sys.Browser.Safari:B=window.innerWidth;A=window.innerHeight;break;case Sys.Browser.Opera:B=Math.min(window.innerWidth,document.body.clientWidth);A=Math.min(window.innerHeight,document.body.clientHeight);break;default:B=Math.min(window.innerWidth,document.documentElement.clientWidth);A=Math.min(window.innerHeight,document.documentElement.clientHeight);break}return new Sys.UI.Bounds(0,0,B,A)},getMarginBox:function(A){if(!A){throw Error.argumentNull("element")}var B={top:this.getMargin(A,AjaxControlToolkit.BoxSide.Top),right:this.getMargin(A,AjaxControlToolkit.BoxSide.Right),bottom:this.getMargin(A,AjaxControlToolkit.BoxSide.Bottom),left:this.getMargin(A,AjaxControlToolkit.BoxSide.Left)};B.horizontal=B.left+B.right;B.vertical=B.top+B.bottom;return B},getBorderBox:function(A){if(!A){throw Error.argumentNull("element")}var B={top:this.getBorderWidth(A,AjaxControlToolkit.BoxSide.Top),right:this.getBorderWidth(A,AjaxControlToolkit.BoxSide.Right),bottom:this.getBorderWidth(A,AjaxControlToolkit.BoxSide.Bottom),left:this.getBorderWidth(A,AjaxControlToolkit.BoxSide.Left)};B.horizontal=B.left+B.right;B.vertical=B.top+B.bottom;return B},getPaddingBox:function(A){if(!A){throw Error.argumentNull("element")}var B={top:this.getPadding(A,AjaxControlToolkit.BoxSide.Top),right:this.getPadding(A,AjaxControlToolkit.BoxSide.Right),bottom:this.getPadding(A,AjaxControlToolkit.BoxSide.Bottom),left:this.getPadding(A,AjaxControlToolkit.BoxSide.Left)};B.horizontal=B.left+B.right;B.vertical=B.top+B.bottom;return B},isBorderVisible:function(C,D){if(!C){throw Error.argumentNull("element")}if(D<AjaxControlToolkit.BoxSide.Top||D>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,D,"AjaxControlToolkit.BoxSide"))}var B=this._borderStyleNames[D];var A=this.getCurrentStyle(C,B);return A!="none"},getMargin:function(D,E){if(!D){throw Error.argumentNull("element")}if(E<AjaxControlToolkit.BoxSide.Top||E>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,E,"AjaxControlToolkit.BoxSide"))}var C=this._marginWidthNames[E];var A=this.getCurrentStyle(D,C);try{return this.parsePadding(A)}catch(B){return 0}},getBorderWidth:function(C,D){if(!C){throw Error.argumentNull("element")}if(D<AjaxControlToolkit.BoxSide.Top||D>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,D,"AjaxControlToolkit.BoxSide"))}if(!this.isBorderVisible(C,D)){return 0}var B=this._borderWidthNames[D];var A=this.getCurrentStyle(C,B);return this.parseBorderWidth(A)},getPadding:function(C,D){if(!C){throw Error.argumentNull("element")}if(D<AjaxControlToolkit.BoxSide.Top||D>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,D,"AjaxControlToolkit.BoxSide"))}var B=this._paddingWidthNames[D];var A=this.getCurrentStyle(C,B);return this.parsePadding(A)},parseBorderWidth:function(B){if(!this._borderThicknesses){var A={};var E=document.createElement("div");E.style.visibility="hidden";E.style.position="absolute";E.style.fontSize="1px";document.body.appendChild(E);var C=document.createElement("div");C.style.height="0px";C.style.overflow="hidden";E.appendChild(C);var F=E.offsetHeight;C.style.borderTop="solid black";C.style.borderTopWidth="thin";A["thin"]=E.offsetHeight-F;C.style.borderTopWidth="medium";A["medium"]=E.offsetHeight-F;C.style.borderTopWidth="thick";A["thick"]=E.offsetHeight-F;E.removeChild(C);document.body.removeChild(E);this._borderThicknesses=A}if(B){switch(B){case"thin":case"medium":case"thick":return this._borderThicknesses[B];case"inherit":return 0}var D=this.parseUnit(B);Sys.Debug.assert(D.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidBorderWidthUnit,D.type));return D.size}return 0},parsePadding:function(B){if(B){if(B=="inherit"){return 0}var A=this.parseUnit(B);Sys.Debug.assert(A.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidPaddingUnit,A.type));return A.size}return 0},parseUnit:function(G){if(!G){throw Error.argumentNull("value")}G=G.trim().toLowerCase();var A=G.length;var F=-1;for(var C=0;C<A;C++){var E=G.substr(C,1);if((E<"0"||E>"9")&&E!="-"&&E!="."&&E!=","){break}F=C}if(F==-1){throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits)}var D;var B;if(F<(A-1)){D=G.substring(F+1).trim()}else{D="px"}B=parseFloat(G.substr(0,F+1));if(D=="px"){B=Math.floor(B)}return{size:B,type:D}},getElementOpacity:function(C){if(!C){throw Error.argumentNull("element")}var E=false;var B;if(C.filters){var D=C.filters;if(D.length!==0){var A=D["DXImageTransform.Microsoft.Alpha"];if(A){B=A.opacity/100;E=true}}}else{B=this.getCurrentStyle(C,"opacity",1);E=true}if(E===false){return 1}return parseFloat(B)},setElementOpacity:function(C,E){if(!C){throw Error.argumentNull("element")}if(C.filters){var D=C.filters;var B=true;if(D.length!==0){var A=D["DXImageTransform.Microsoft.Alpha"];if(A){B=false;A.opacity=E*100}}if(B){C.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(E*100)+")"}}else{C.style.opacity=E}},getVisible:function(A){return(A&&("none"!=$common.getCurrentStyle(A,"display"))&&("hidden"!=$common.getCurrentStyle(A,"visibility")))},setVisible:function(A,B){if(A&&B!=$common.getVisible(A)){if(B){if(A.style.removeAttribute){A.style.removeAttribute("display")}else{A.style.removeProperty("display")}}else{A.style.display="none"}A.style.visibility=B?"visible":"hidden"}},resolveFunction:function(value){if(value){if(value instanceof Function){return value}else{if(String.isInstanceOfType(value)&&value.length>0){var func;if((func=window[value]) instanceof Function){return func}else{if((func=eval(value)) instanceof Function){return func}}}}}return null},addCssClasses:function(B,C){for(var A=0;A<C.length;A++){Sys.UI.DomElement.addCssClass(B,C[A])}},removeCssClasses:function(B,C){for(var A=0;A<C.length;A++){Sys.UI.DomElement.removeCssClass(B,C[A])}},setStyle:function(A,B){$common.applyProperties(A.style,B)},removeHandlers:function(C,B){for(var A in B){$removeHandler(C,A,B[A])}},overlaps:function(B,A){return B.x<(A.x+A.width)&&A.x<(B.x+B.width)&&B.y<(A.y+A.height)&&A.y<(B.y+B.height)},containsPoint:function(B,A,C){return A>=B.x&&A<(B.x+B.width)&&C>=B.y&&C<(B.y+B.height)},isKeyDigit:function(A){return(48<=A&&A<=57)},isKeyNavigation:function(A){return(Sys.UI.Key.left<=A&&A<=Sys.UI.Key.down)},padLeft:function(D,B,C,A){return $common._pad(D,B||2,C||" ","l",A||false)},padRight:function(D,B,C,A){return $common._pad(D,B||2,C||" ","r",A||false)},_pad:function(H,E,F,D,C){H=H.toString();var G=H.length;var B=new Sys.StringBuilder();if(D=="r"){B.append(H)}while(G<E){B.append(F);G++}if(D=="l"){B.append(H)}var A=B.toString();if(C&&A.length>E){if(D=="l"){A=A.substr(A.length-E,E)}else{A=A.substr(0,E)}}return A},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(B,A){B.initUIEvent("focusin",true,false,window,1)}},focusout:{eventGroup:"UIEvents",init:function(B,A){B.initUIEvent("focusout",true,false,window,1)}},activate:{eventGroup:"UIEvents",init:function(B,A){B.initUIEvent("activate",true,true,window,1)}},focus:{eventGroup:"UIEvents",init:function(B,A){B.initUIEvent("focus",false,false,window,1)}},blur:{eventGroup:"UIEvents",init:function(B,A){B.initUIEvent("blur",false,false,window,1)}},click:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("click",true,true,window,1,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("click",true,true,window,2,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("mousedown",true,true,window,1,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("mouseup",true,true,window,1,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("mouseover",true,true,window,1,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("mousemove",true,true,window,1,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(B,A){B.initMouseEvent("mousemove",true,true,window,1,A.screenX||0,A.screenY||0,A.clientX||0,A.clientY||0,A.ctrlKey||false,A.altKey||false,A.shiftKey||false,A.metaKey||false,A.button||0,A.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("load",false,false)}},unload:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("unload",false,false)}},select:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("select",true,false)}},change:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("change",true,false)}},submit:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("submit",true,true)}},reset:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("reset",true,false)}},resize:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("resize",true,false)}},scroll:{eventGroup:"HTMLEvents",init:function(B,A){B.initEvent("scroll",true,false)}}},tryFireRawEvent:function(A,B){try{if(A.fireEvent){A.fireEvent("on"+B.type,B);return true}else{if(A.dispatchEvent){A.dispatchEvent(B);return true}}}catch(C){}return false},tryFireEvent:function(C,A,B){try{if(document.createEventObject){var E=document.createEventObject();$common.applyProperties(E,B||{});C.fireEvent("on"+A,E);return true}else{if(document.createEvent){var D=$common.__DOMEvents[A];if(D){var E=document.createEvent(D.eventGroup);D.init(E,B||{});C.dispatchEvent(E);return true}}}}catch(E){}return false},wrapElement:function(C,D,B){var A=C.parentNode;A.replaceChild(D,C);(B||D).appendChild(C)},unwrapElement:function(B,C){var A=C.parentNode;if(A!=null){$common.removeElement(B);A.replaceChild(B,C)}},removeElement:function(A){var B=A.parentNode;if(B!=null){B.removeChild(A)}},applyProperties:function(E,B){for(var D in B){var C=B[D];if(C!=null&&Object.getType(C)===Object){var A=E[D];$common.applyProperties(A,C)}else{E[D]=C}}},createElementFromTemplate:function(F,G,J){if(typeof (F.nameTable)!="undefined"){var I=F.nameTable;if(String.isInstanceOfType(I)){I=J[I]}if(I!=null){J=I}}var K=null;if(typeof (F.name)!=="undefined"){K=F.name}var C=document.createElement(F.nodeName);if(typeof (F.name)!=="undefined"&&J){J[F.name]=C}if(typeof (F.parent)!=="undefined"&&G==null){var H=F.parent;if(String.isInstanceOfType(H)){H=J[H]}if(H!=null){G=H}}if(typeof (F.properties)!=="undefined"&&F.properties!=null){$common.applyProperties(C,F.properties)}if(typeof (F.cssClasses)!=="undefined"&&F.cssClasses!=null){$common.addCssClasses(C,F.cssClasses)}if(typeof (F.events)!=="undefined"&&F.events!=null){$addHandlers(C,F.events)}if(typeof (F.visible)!=="undefined"&&F.visible!=null){this.setVisible(C,F.visible)}if(G){G.appendChild(C)}if(typeof (F.opacity)!=="undefined"&&F.opacity!=null){$common.setElementOpacity(C,F.opacity)}if(typeof (F.children)!=="undefined"&&F.children!=null){for(var D=0;D<F.children.length;D++){var A=F.children[D];$common.createElementFromTemplate(A,C,J)}}var B=C;if(typeof (F.contentPresenter)!=="undefined"&&F.contentPresenter!=null){B=J[B]}if(typeof (F.content)!=="undefined"&&F.content!=null){var E=F.content;if(String.isInstanceOfType(E)){E=J[E]}if(E.parentNode){$common.wrapElement(E,C,B)}else{B.appendChild(E)}}return C},prepareHiddenElementForATDeviceUpdate:function(){var A=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(!A){var A=document.createElement("input");A.setAttribute("type","hidden");A.setAttribute("value","1");A.setAttribute("id","hiddenInputToUpdateATBuffer_CommonToolkitScripts");A.setAttribute("name","hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(document.forms[0]){document.forms[0].appendChild(A)}}},updateFormToRefreshATDeviceBuffer:function(){var A=document.getElementById("hiddenInputToUpdateATBuffer_CommonToolkitScripts");if(A){if(A.getAttribute("value")=="1"){A.setAttribute("value","0")}else{A.setAttribute("value","1")}}}};var CommonToolkitScripts=AjaxControlToolkit.CommonToolkitScripts=new AjaxControlToolkit._CommonToolkitScripts();var $common=CommonToolkitScripts;Sys.UI.DomElement.getVisible=$common.getVisible;Sys.UI.DomElement.setVisible=$common.setVisible;Sys.UI.Control.overlaps=$common.overlaps;AjaxControlToolkit._DomUtility=function(){};AjaxControlToolkit._DomUtility.prototype={isDescendant:function(A,B){for(var C=B.parentNode;C!=null;C=C.parentNode){if(C==A){return true}}return false},isDescendantOrSelf:function(A,B){if(A===B){return true}return AjaxControlToolkit.DomUtility.isDescendant(A,B)},isAncestor:function(B,A){return AjaxControlToolkit.DomUtility.isDescendant(A,B)},isAncestorOrSelf:function(B,A){if(B===A){return true}return AjaxControlToolkit.DomUtility.isDescendant(A,B)},isSibling:function(A,D){var C=A.parentNode;for(var B=0;B<C.childNodes.length;B++){if(C.childNodes[B]==D){return true}}return false}};AjaxControlToolkit._DomUtility.registerClass("AjaxControlToolkit._DomUtility");AjaxControlToolkit.DomUtility=new AjaxControlToolkit._DomUtility();AjaxControlToolkit.TextBoxWrapper=function(A){AjaxControlToolkit.TextBoxWrapper.initializeBase(this,[A]);this._current=A.value;this._watermark=null;this._isWatermarked=false};AjaxControlToolkit.TextBoxWrapper.prototype={dispose:function(){this.get_element().AjaxControlToolkitTextBoxWrapper=null;AjaxControlToolkit.TextBoxWrapper.callBaseMethod(this,"dispose")},get_Current:function(){this._current=this.get_element().value;return this._current},set_Current:function(A){this._current=A;this._updateElement()},get_Value:function(){if(this.get_IsWatermarked()){return""}else{return this.get_Current()}},set_Value:function(A){this.set_Current(A);if(!A||(0==A.length)){if(null!=this._watermark){this.set_IsWatermarked(true)}}else{this.set_IsWatermarked(false)}},get_Watermark:function(){return this._watermark},set_Watermark:function(A){this._watermark=A;this._updateElement()},get_IsWatermarked:function(){return this._isWatermarked},set_IsWatermarked:function(A){if(this._isWatermarked!=A){this._isWatermarked=A;this._updateElement();this._raiseWatermarkChanged()}},_updateElement:function(){var A=this.get_element();if(this._isWatermarked){if(A.value!=this._watermark){A.value=this._watermark}}else{if(A.value!=this._current){A.value=this._current}}},add_WatermarkChanged:function(A){this.get_events().addHandler("WatermarkChanged",A)},remove_WatermarkChanged:function(A){this.get_events().removeHandler("WatermarkChanged",A)},_raiseWatermarkChanged:function(){var A=this.get_events().getHandler("WatermarkChanged");if(A){A(this,Sys.EventArgs.Empty)}}};AjaxControlToolkit.TextBoxWrapper.get_Wrapper=function(A){if(null==A.AjaxControlToolkitTextBoxWrapper){A.AjaxControlToolkitTextBoxWrapper=new AjaxControlToolkit.TextBoxWrapper(A)}return A.AjaxControlToolkitTextBoxWrapper};AjaxControlToolkit.TextBoxWrapper.registerClass("AjaxControlToolkit.TextBoxWrapper",Sys.UI.Behavior);AjaxControlToolkit.TextBoxWrapper.validatorGetValue=function(B){var A=$get(B);if(A&&A.AjaxControlToolkitTextBoxWrapper){return A.AjaxControlToolkitTextBoxWrapper.get_Value()}return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(B)};if(typeof (ValidatorGetValue)=="function"){AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue=ValidatorGetValue;ValidatorGetValue=AjaxControlToolkit.TextBoxWrapper.validatorGetValue}if(Sys.CultureInfo.prototype._getAbbrMonthIndex){try{Sys.CultureInfo.prototype._getAbbrMonthIndex("")}catch(ex){Sys.CultureInfo.prototype._getAbbrMonthIndex=function(A){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames)}return Array.indexOf(this._upperAbbrMonths,this._toUpper(A))};Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex;Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex=Sys.CultureInfo.prototype._getAbbrMonthIndex}}if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Sys.Timer=function(){Sys.Timer.initializeBase(this);this._interval=1000;this._enabled=false;this._timer=null};Sys.Timer.prototype={get_interval:function(){return this._interval},set_interval:function(A){if(this._interval!==A){this._interval=A;this.raisePropertyChanged("interval");if(!this.get_isUpdating()&&(this._timer!==null)){this._stopTimer();this._startTimer()}}},get_enabled:function(){return this._enabled},set_enabled:function(A){if(A!==this.get_enabled()){this._enabled=A;this.raisePropertyChanged("enabled");if(!this.get_isUpdating()){if(A){this._startTimer()}else{this._stopTimer()}}}},add_tick:function(A){this.get_events().addHandler("tick",A)},remove_tick:function(A){this.get_events().removeHandler("tick",A)},dispose:function(){this.set_enabled(false);this._stopTimer();Sys.Timer.callBaseMethod(this,"dispose")},updated:function(){Sys.Timer.callBaseMethod(this,"updated");if(this._enabled){this._stopTimer();this._startTimer()}},_timerCallback:function(){var A=this.get_events().getHandler("tick");if(A){A(this,Sys.EventArgs.Empty)}},_startTimer:function(){this._timer=window.setInterval(Function.createDelegate(this,this._timerCallback),this._interval)},_stopTimer:function(){window.clearInterval(this._timer);this._timer=null}};Sys.Timer.descriptor={properties:[{name:"interval",type:Number},{name:"enabled",type:Boolean}],events:[{name:"tick"}]};Sys.Timer.registerClass("Sys.Timer",Sys.Component);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit.Animation");var $AA=AjaxControlToolkit.Animation;$AA.registerAnimation=function(A,B){if(B&&((B===$AA.Animation)||(B.inheritsFrom&&B.inheritsFrom($AA.Animation)))){if(!$AA.__animations){$AA.__animations={}}$AA.__animations[A.toLowerCase()]=B;B.play=function(){var D=new B();B.apply(D,arguments);D.initialize();var C=Function.createDelegate(D,function(){D.remove_ended(C);C=null;D.dispose()});D.add_ended(C);D.play()}}else{throw Error.argumentType("type",B,$AA.Animation,AjaxControlToolkit.Resources.Animation_InvalidBaseType)}};$AA.buildAnimation=function(B,C){if(!B||B===""){return null}var D;B="("+B+")";if(!Sys.Debug.isDebug){try{D=Sys.Serialization.JavaScriptSerializer.deserialize(B)}catch(A){}}else{D=Sys.Serialization.JavaScriptSerializer.deserialize(B)}return $AA.createAnimation(D,C)};$AA.createAnimation=function(F,K){if(!F||!F.AnimationName){throw Error.argument("obj",AjaxControlToolkit.Resources.Animation_MissingAnimationName)}var J=$AA.__animations[F.AnimationName.toLowerCase()];if(!J){throw Error.argument("type",String.format(AjaxControlToolkit.Resources.Animation_UknownAnimationName,F.AnimationName))}var E=new J();if(K){E.set_target(K)}if(F.AnimationChildren&&F.AnimationChildren.length){if($AA.ParentAnimation.isInstanceOfType(E)){for(var G=0;G<F.AnimationChildren.length;G++){var C=$AA.createAnimation(F.AnimationChildren[G]);if(C){E.add(C)}}}else{throw Error.argument("obj",String.format(AjaxControlToolkit.Resources.Animation_ChildrenNotAllowed,J.getName()))}}var I=J.__animationProperties;if(!I){J.__animationProperties={};J.resolveInheritance();for(var B in J.prototype){if(B.startsWith("set_")){J.__animationProperties[B.substr(4).toLowerCase()]=B}}delete J.__animationProperties["id"];I=J.__animationProperties}for(var M in F){var A=M.toLowerCase();if(A=="animationname"||A=="animationchildren"){continue}var L=F[M];var D=I[A];if(D&&String.isInstanceOfType(D)&&E[D]){if(!Sys.Debug.isDebug){try{E[D](L)}catch(H){}}else{E[D](L)}}else{if(A.endsWith("script")){D=I[A.substr(0,M.length-6)];if(D&&String.isInstanceOfType(D)&&E[D]){E.DynamicProperties[D]=L}else{if(Sys.Debug.isDebug){throw Error.argument("obj",String.format(AjaxControlToolkit.Resources.Animation_NoDynamicPropertyFound,M,M.substr(0,M.length-5)))}}}else{if(Sys.Debug.isDebug){throw Error.argument("obj",String.format(AjaxControlToolkit.Resources.Animation_NoPropertyFound,M))}}}}return E};$AA.Animation=function(C,B,A){$AA.Animation.initializeBase(this);this._duration=1;this._fps=25;this._target=null;this._tickHandler=null;this._timer=null;this._percentComplete=0;this._percentDelta=null;this._owner=null;this._parentAnimation=null;this.DynamicProperties={};if(C){this.set_target(C)}if(B){this.set_duration(B)}if(A){this.set_fps(A)}};$AA.Animation.prototype={dispose:function(){if(this._timer){this._timer.dispose();this._timer=null}this._tickHandler=null;this._target=null;$AA.Animation.callBaseMethod(this,"dispose")},play:function(){if(!this._owner){var A=true;if(!this._timer){A=false;if(!this._tickHandler){this._tickHandler=Function.createDelegate(this,this._onTimerTick)}this._timer=new Sys.Timer();this._timer.add_tick(this._tickHandler);this.onStart();this._timer.set_interval(1000/this._fps);this._percentDelta=100/(this._duration*this._fps);this._updatePercentComplete(0,true)}this._timer.set_enabled(true);this.raisePropertyChanged("isPlaying");if(!A){this.raisePropertyChanged("isActive")}}},pause:function(){if(!this._owner){if(this._timer){this._timer.set_enabled(false);this.raisePropertyChanged("isPlaying")}}},stop:function(B){if(!this._owner){var A=this._timer;this._timer=null;if(A){A.dispose();if(this._percentComplete!==100){this._percentComplete=100;this.raisePropertyChanged("percentComplete");if(B||B===undefined){this.onStep(100)}}this.onEnd();this.raisePropertyChanged("isPlaying");this.raisePropertyChanged("isActive")}}},onStart:function(){this.raiseStarted();for(var property in this.DynamicProperties){try{this[property](eval(this.DynamicProperties[property]))}catch(ex){if(Sys.Debug.isDebug){throw ex}}}},onStep:function(A){this.setValue(this.getAnimatedValue(A))},onEnd:function(){this.raiseEnded()},getAnimatedValue:function(A){throw Error.notImplemented()},setValue:function(A){throw Error.notImplemented()},interpolate:function(C,B,A){return C+(B-C)*(A/100)},_onTimerTick:function(){this._updatePercentComplete(this._percentComplete+this._percentDelta,true)},_updatePercentComplete:function(B,A){if(B>100){B=100}this._percentComplete=B;this.raisePropertyChanged("percentComplete");if(A){this.onStep(B)}if(B===100){this.stop(false)}},setOwner:function(A){this._owner=A},raiseStarted:function(){var A=this.get_events().getHandler("started");if(A){A(this,Sys.EventArgs.Empty)}},add_started:function(A){this.get_events().addHandler("started",A)},remove_started:function(A){this.get_events().removeHandler("started",A)},raiseEnded:function(){var A=this.get_events().getHandler("ended");if(A){A(this,Sys.EventArgs.Empty)}},add_ended:function(A){this.get_events().addHandler("ended",A)},remove_ended:function(A){this.get_events().removeHandler("ended",A)},get_target:function(){if(!this._target&&this._parentAnimation){return this._parentAnimation.get_target()}return this._target},set_target:function(A){if(this._target!=A){this._target=A;this.raisePropertyChanged("target")}},set_animationTarget:function(D){var C=null;var A=$get(D);if(A){C=A}else{var B=$find(D);if(B){A=B.get_element();if(A){C=A}}}if(C){this.set_target(C)}else{throw Error.argument("id",String.format(AjaxControlToolkit.Resources.Animation_TargetNotFound,D))}},get_duration:function(){return this._duration},set_duration:function(A){A=this._getFloat(A);if(this._duration!=A){this._duration=A;this.raisePropertyChanged("duration")}},get_fps:function(){return this._fps},set_fps:function(A){A=this._getInteger(A);if(this.fps!=A){this._fps=A;this.raisePropertyChanged("fps")}},get_isActive:function(){return(this._timer!==null)},get_isPlaying:function(){return(this._timer!==null)&&this._timer.get_enabled()},get_percentComplete:function(){return this._percentComplete},_getBoolean:function(A){if(String.isInstanceOfType(A)){return Boolean.parse(A)}return A},_getInteger:function(A){if(String.isInstanceOfType(A)){return parseInt(A)}return A},_getFloat:function(A){if(String.isInstanceOfType(A)){return parseFloat(A)}return A},_getEnum:function(B,A){if(String.isInstanceOfType(B)&&A&&A.parse){return A.parse(B)}return B}};$AA.Animation.registerClass("AjaxControlToolkit.Animation.Animation",Sys.Component);$AA.registerAnimation("animation",$AA.Animation);$AA.ParentAnimation=function(D,C,B,E){$AA.ParentAnimation.initializeBase(this,[D,C,B]);this._animations=[];if(E&&E.length){for(var A=0;A<E.length;A++){this.add(E[A])}}};$AA.ParentAnimation.prototype={initialize:function(){$AA.ParentAnimation.callBaseMethod(this,"initialize");if(this._animations){for(var A=0;A<this._animations.length;A++){var B=this._animations[A];if(B&&!B.get_isInitialized){B.initialize()}}}},dispose:function(){this.clear();this._animations=null;$AA.ParentAnimation.callBaseMethod(this,"dispose")},get_animations:function(){return this._animations},add:function(A){if(this._animations){if(A){A._parentAnimation=this}Array.add(this._animations,A);this.raisePropertyChanged("animations")}},remove:function(A){if(this._animations){if(A){A.dispose()}Array.remove(this._animations,A);this.raisePropertyChanged("animations")}},removeAt:function(A){if(this._animations){var B=this._animations[A];if(B){B.dispose()}Array.removeAt(this._animations,A);this.raisePropertyChanged("animations")}},clear:function(){if(this._animations){for(var A=this._animations.length-1;A>=0;A--){this._animations[A].dispose();this._animations[A]=null}Array.clear(this._animations);this._animations=[];this.raisePropertyChanged("animations")}}};$AA.ParentAnimation.registerClass("AjaxControlToolkit.Animation.ParentAnimation",$AA.Animation);$AA.registerAnimation("parent",$AA.ParentAnimation);$AA.ParallelAnimation=function(C,B,A,D){$AA.ParallelAnimation.initializeBase(this,[C,B,A,D])};$AA.ParallelAnimation.prototype={add:function(A){$AA.ParallelAnimation.callBaseMethod(this,"add",[A]);A.setOwner(this)},onStart:function(){$AA.ParallelAnimation.callBaseMethod(this,"onStart");var B=this.get_animations();for(var A=0;A<B.length;A++){B[A].onStart()}},onStep:function(A){var C=this.get_animations();for(var B=0;B<C.length;B++){C[B].onStep(A)}},onEnd:function(){var B=this.get_animations();for(var A=0;A<B.length;A++){B[A].onEnd()}$AA.ParallelAnimation.callBaseMethod(this,"onEnd")}};$AA.ParallelAnimation.registerClass("AjaxControlToolkit.Animation.ParallelAnimation",$AA.ParentAnimation);$AA.registerAnimation("parallel",$AA.ParallelAnimation);$AA.SequenceAnimation=function(D,C,B,E,A){$AA.SequenceAnimation.initializeBase(this,[D,C,B,E]);this._handler=null;this._paused=false;this._playing=false;this._index=0;this._remainingIterations=0;this._iterations=(A!==undefined)?A:1};$AA.SequenceAnimation.prototype={dispose:function(){this._handler=null;$AA.SequenceAnimation.callBaseMethod(this,"dispose")},stop:function(){if(this._playing){var B=this.get_animations();if(this._index<B.length){B[this._index].remove_ended(this._handler);for(var A=this._index;A<B.length;A++){B[A].stop()}}this._playing=false;this._paused=false;this.raisePropertyChanged("isPlaying");this.onEnd()}},pause:function(){if(this.get_isPlaying()){var A=this.get_animations()[this._index];if(A!=null){A.pause()}this._paused=true;this.raisePropertyChanged("isPlaying")}},play:function(){var C=this.get_animations();if(!this._playing){this._playing=true;if(this._paused){this._paused=false;var A=C[this._index];if(A!=null){A.play();this.raisePropertyChanged("isPlaying")}}else{this.onStart();this._index=0;var B=C[this._index];if(B){B.add_ended(this._handler);B.play();this.raisePropertyChanged("isPlaying")}else{this.stop()}}}},onStart:function(){$AA.SequenceAnimation.callBaseMethod(this,"onStart");this._remainingIterations=this._iterations-1;if(!this._handler){this._handler=Function.createDelegate(this,this._onEndAnimation)}},_onEndAnimation:function(){var D=this.get_animations();var B=D[this._index++];if(B){B.remove_ended(this._handler)}if(this._index<D.length){var A=D[this._index];A.add_ended(this._handler);A.play()}else{if(this._remainingIterations>=1||this._iterations<=0){this._remainingIterations--;this._index=0;var C=D[0];C.add_ended(this._handler);C.play()}else{this.stop()}}},onStep:function(A){throw Error.invalidOperation(AjaxControlToolkit.Resources.Animation_CannotNestSequence)},onEnd:function(){this._remainingIterations=0;$AA.SequenceAnimation.callBaseMethod(this,"onEnd")},get_isActive:function(){return true},get_isPlaying:function(){return this._playing&&!this._paused},get_iterations:function(){return this._iterations},set_iterations:function(A){A=this._getInteger(A);if(this._iterations!=A){this._iterations=A;this.raisePropertyChanged("iterations")}},get_isInfinite:function(){return this._iterations<=0}};$AA.SequenceAnimation.registerClass("AjaxControlToolkit.Animation.SequenceAnimation",$AA.ParentAnimation);$AA.registerAnimation("sequence",$AA.SequenceAnimation);$AA.SelectionAnimation=function(C,B,A,D){$AA.SelectionAnimation.initializeBase(this,[C,B,A,D]);this._selectedIndex=-1;this._selected=null};$AA.SelectionAnimation.prototype={getSelectedIndex:function(){throw Error.notImplemented()},onStart:function(){$AA.SelectionAnimation.callBaseMethod(this,"onStart");var A=this.get_animations();this._selectedIndex=this.getSelectedIndex();if(this._selectedIndex>=0&&this._selectedIndex<A.length){this._selected=A[this._selectedIndex];if(this._selected){this._selected.setOwner(this);this._selected.onStart()}}},onStep:function(A){if(this._selected){this._selected.onStep(A)}},onEnd:function(){if(this._selected){this._selected.onEnd();this._selected.setOwner(null)}this._selected=null;this._selectedIndex=null;$AA.SelectionAnimation.callBaseMethod(this,"onEnd")}};$AA.SelectionAnimation.registerClass("AjaxControlToolkit.Animation.SelectionAnimation",$AA.ParentAnimation);$AA.registerAnimation("selection",$AA.SelectionAnimation);$AA.ConditionAnimation=function(D,C,B,E,A){$AA.ConditionAnimation.initializeBase(this,[D,C,B,E]);this._conditionScript=A};$AA.ConditionAnimation.prototype={getSelectedIndex:function(){var selected=-1;if(this._conditionScript&&this._conditionScript.length>0){try{selected=eval(this._conditionScript)?0:1}catch(ex){}}return selected},get_conditionScript:function(){return this._conditionScript},set_conditionScript:function(A){if(this._conditionScript!=A){this._conditionScript=A;this.raisePropertyChanged("conditionScript")}}};$AA.ConditionAnimation.registerClass("AjaxControlToolkit.Animation.ConditionAnimation",$AA.SelectionAnimation);$AA.registerAnimation("condition",$AA.ConditionAnimation);$AA.CaseAnimation=function(D,C,B,E,A){$AA.CaseAnimation.initializeBase(this,[D,C,B,E]);this._selectScript=A};$AA.CaseAnimation.prototype={getSelectedIndex:function(){var selected=-1;if(this._selectScript&&this._selectScript.length>0){try{var result=eval(this._selectScript);if(result!==undefined){selected=result}}catch(ex){}}return selected},get_selectScript:function(){return this._selectScript},set_selectScript:function(A){if(this._selectScript!=A){this._selectScript=A;this.raisePropertyChanged("selectScript")}}};$AA.CaseAnimation.registerClass("AjaxControlToolkit.Animation.CaseAnimation",$AA.SelectionAnimation);$AA.registerAnimation("case",$AA.CaseAnimation);$AA.FadeEffect=function(){throw Error.invalidOperation()};$AA.FadeEffect.prototype={FadeIn:0,FadeOut:1};$AA.FadeEffect.registerEnum("AjaxControlToolkit.Animation.FadeEffect",false);$AA.FadeAnimation=function(G,F,E,C,D,B,A){$AA.FadeAnimation.initializeBase(this,[G,F,E]);this._effect=(C!==undefined)?C:$AA.FadeEffect.FadeIn;this._max=(B!==undefined)?B:1;this._min=(D!==undefined)?D:0;this._start=this._min;this._end=this._max;this._layoutCreated=false;this._forceLayoutInIE=(A===undefined||A===null)?true:A;this._currentTarget=null;this._resetOpacities()};$AA.FadeAnimation.prototype={_resetOpacities:function(){if(this._effect==$AA.FadeEffect.FadeIn){this._start=this._min;this._end=this._max}else{this._start=this._max;this._end=this._min}},_createLayout:function(){var A=this._currentTarget;if(A){var D=$common.getCurrentStyle(A,"width");var C=$common.getCurrentStyle(A,"height");var B=$common.getCurrentStyle(A,"backgroundColor");if((!D||D==""||D=="auto")&&(!C||C==""||C=="auto")){A.style.width=A.offsetWidth+"px"}if(!B||B==""||B=="transparent"||B=="rgba(0, 0, 0, 0)"){A.style.backgroundColor=$common.getInheritedBackgroundColor(A)}this._layoutCreated=true}},onStart:function(){$AA.FadeAnimation.callBaseMethod(this,"onStart");this._currentTarget=this.get_target();this.setValue(this._start);if(this._forceLayoutInIE&&!this._layoutCreated&&Sys.Browser.agent==Sys.Browser.InternetExplorer){this._createLayout()}},getAnimatedValue:function(A){return this.interpolate(this._start,this._end,A)},setValue:function(A){if(this._currentTarget){$common.setElementOpacity(this._currentTarget,A)}},get_effect:function(){return this._effect},set_effect:function(A){A=this._getEnum(A,$AA.FadeEffect);if(this._effect!=A){this._effect=A;this._resetOpacities();this.raisePropertyChanged("effect")}},get_minimumOpacity:function(){return this._min},set_minimumOpacity:function(A){A=this._getFloat(A);if(this._min!=A){this._min=A;this._resetOpacities();this.raisePropertyChanged("minimumOpacity")}},get_maximumOpacity:function(){return this._max},set_maximumOpacity:function(A){A=this._getFloat(A);if(this._max!=A){this._max=A;this._resetOpacities();this.raisePropertyChanged("maximumOpacity")}},get_forceLayoutInIE:function(){return this._forceLayoutInIE},set_forceLayoutInIE:function(A){A=this._getBoolean(A);if(this._forceLayoutInIE!=A){this._forceLayoutInIE=A;this.raisePropertyChanged("forceLayoutInIE")}},set_startValue:function(A){A=this._getFloat(A);this._start=A}};$AA.FadeAnimation.registerClass("AjaxControlToolkit.Animation.FadeAnimation",$AA.Animation);$AA.registerAnimation("fade",$AA.FadeAnimation);$AA.FadeInAnimation=function(F,E,D,C,B,A){$AA.FadeInAnimation.initializeBase(this,[F,E,D,$AA.FadeEffect.FadeIn,C,B,A])};$AA.FadeInAnimation.prototype={onStart:function(){$AA.FadeInAnimation.callBaseMethod(this,"onStart");if(this._currentTarget){this.set_startValue($common.getElementOpacity(this._currentTarget))}}};$AA.FadeInAnimation.registerClass("AjaxControlToolkit.Animation.FadeInAnimation",$AA.FadeAnimation);$AA.registerAnimation("fadeIn",$AA.FadeInAnimation);$AA.FadeOutAnimation=function(F,E,D,C,B,A){$AA.FadeOutAnimation.initializeBase(this,[F,E,D,$AA.FadeEffect.FadeOut,C,B,A])};$AA.FadeOutAnimation.prototype={onStart:function(){$AA.FadeOutAnimation.callBaseMethod(this,"onStart");if(this._currentTarget){this.set_startValue($common.getElementOpacity(this._currentTarget))}}};$AA.FadeOutAnimation.registerClass("AjaxControlToolkit.Animation.FadeOutAnimation",$AA.FadeAnimation);$AA.registerAnimation("fadeOut",$AA.FadeOutAnimation);$AA.PulseAnimation=function(G,F,E,D,C,B,A){$AA.PulseAnimation.initializeBase(this,[G,F,E,null,((D!==undefined)?D:3)]);this._out=new $AA.FadeOutAnimation(G,F,E,C,B,A);this.add(this._out);this._in=new $AA.FadeInAnimation(G,F,E,C,B,A);this.add(this._in)};$AA.PulseAnimation.prototype={get_minimumOpacity:function(){return this._out.get_minimumOpacity()},set_minimumOpacity:function(A){A=this._getFloat(A);this._out.set_minimumOpacity(A);this._in.set_minimumOpacity(A);this.raisePropertyChanged("minimumOpacity")},get_maximumOpacity:function(){return this._out.get_maximumOpacity()},set_maximumOpacity:function(A){A=this._getFloat(A);this._out.set_maximumOpacity(A);this._in.set_maximumOpacity(A);this.raisePropertyChanged("maximumOpacity")},get_forceLayoutInIE:function(){return this._out.get_forceLayoutInIE()},set_forceLayoutInIE:function(A){A=this._getBoolean(A);this._out.set_forceLayoutInIE(A);this._in.set_forceLayoutInIE(A);this.raisePropertyChanged("forceLayoutInIE")},set_duration:function(A){A=this._getFloat(A);$AA.PulseAnimation.callBaseMethod(this,"set_duration",[A]);this._in.set_duration(A);this._out.set_duration(A)},set_fps:function(A){A=this._getInteger(A);$AA.PulseAnimation.callBaseMethod(this,"set_fps",[A]);this._in.set_fps(A);this._out.set_fps(A)}};$AA.PulseAnimation.registerClass("AjaxControlToolkit.Animation.PulseAnimation",$AA.SequenceAnimation);$AA.registerAnimation("pulse",$AA.PulseAnimation);$AA.PropertyAnimation=function(E,D,C,B,A){$AA.PropertyAnimation.initializeBase(this,[E,D,C]);this._property=B;this._propertyKey=A;this._currentTarget=null};$AA.PropertyAnimation.prototype={onStart:function(){$AA.PropertyAnimation.callBaseMethod(this,"onStart");this._currentTarget=this.get_target()},setValue:function(B){var A=this._currentTarget;if(A&&this._property&&this._property.length>0){if(this._propertyKey&&this._propertyKey.length>0&&A[this._property]){A[this._property][this._propertyKey]=B}else{A[this._property]=B}}},getValue:function(){var A=this.get_target();if(A&&this._property&&this._property.length>0){var B=A[this._property];if(B){if(this._propertyKey&&this._propertyKey.length>0){return B[this._propertyKey]}return B}}return null},get_property:function(){return this._property},set_property:function(A){if(this._property!=A){this._property=A;this.raisePropertyChanged("property")}},get_propertyKey:function(){return this._propertyKey},set_propertyKey:function(A){if(this._propertyKey!=A){this._propertyKey=A;this.raisePropertyChanged("propertyKey")}}};$AA.PropertyAnimation.registerClass("AjaxControlToolkit.Animation.PropertyAnimation",$AA.Animation);$AA.registerAnimation("property",$AA.PropertyAnimation);$AA.DiscreteAnimation=function(F,E,D,C,B,A){$AA.DiscreteAnimation.initializeBase(this,[F,E,D,C,B]);this._values=(A&&A.length)?A:[]};$AA.DiscreteAnimation.prototype={getAnimatedValue:function(A){var B=Math.floor(this.interpolate(0,this._values.length-1,A));return this._values[B]},get_values:function(){return this._values},set_values:function(A){if(this._values!=A){this._values=A;this.raisePropertyChanged("values")}}};$AA.DiscreteAnimation.registerClass("AjaxControlToolkit.Animation.DiscreteAnimation",$AA.PropertyAnimation);$AA.registerAnimation("discrete",$AA.DiscreteAnimation);$AA.InterpolatedAnimation=function(G,F,E,D,C,B,A){$AA.InterpolatedAnimation.initializeBase(this,[G,F,E,((D!==undefined)?D:"style"),C]);this._startValue=B;this._endValue=A};$AA.InterpolatedAnimation.prototype={get_startValue:function(){return this._startValue},set_startValue:function(A){A=this._getFloat(A);if(this._startValue!=A){this._startValue=A;this.raisePropertyChanged("startValue")}},get_endValue:function(){return this._endValue},set_endValue:function(A){A=this._getFloat(A);if(this._endValue!=A){this._endValue=A;this.raisePropertyChanged("endValue")}}};$AA.InterpolatedAnimation.registerClass("AjaxControlToolkit.Animation.InterpolatedAnimation",$AA.PropertyAnimation);$AA.registerAnimation("interpolated",$AA.InterpolatedAnimation);$AA.ColorAnimation=function(G,F,E,D,C,B,A){$AA.ColorAnimation.initializeBase(this,[G,F,E,D,C,B,A]);this._start=null;this._end=null;this._interpolateRed=false;this._interpolateGreen=false;this._interpolateBlue=false};$AA.ColorAnimation.prototype={onStart:function(){$AA.ColorAnimation.callBaseMethod(this,"onStart");this._start=$AA.ColorAnimation.getRGB(this.get_startValue());this._end=$AA.ColorAnimation.getRGB(this.get_endValue());this._interpolateRed=(this._start.Red!=this._end.Red);this._interpolateGreen=(this._start.Green!=this._end.Green);this._interpolateBlue=(this._start.Blue!=this._end.Blue)},getAnimatedValue:function(B){var D=this._start.Red;var C=this._start.Green;var A=this._start.Blue;if(this._interpolateRed){D=Math.round(this.interpolate(D,this._end.Red,B))}if(this._interpolateGreen){C=Math.round(this.interpolate(C,this._end.Green,B))}if(this._interpolateBlue){A=Math.round(this.interpolate(A,this._end.Blue,B))}return $AA.ColorAnimation.toColor(D,C,A)},set_startValue:function(A){if(this._startValue!=A){this._startValue=A;this.raisePropertyChanged("startValue")}},set_endValue:function(A){if(this._endValue!=A){this._endValue=A;this.raisePropertyChanged("endValue")}}};$AA.ColorAnimation.getRGB=function(A){if(!A||A.length!=7){throw String.format(AjaxControlToolkit.Resources.Animation_InvalidColor,A)}return{"Red":parseInt(A.substr(1,2),16),"Green":parseInt(A.substr(3,2),16),"Blue":parseInt(A.substr(5,2),16)}};$AA.ColorAnimation.toColor=function(F,E,B){var D=F.toString(16);var C=E.toString(16);var A=B.toString(16);if(D.length==1){D="0"+D}if(C.length==1){C="0"+C}if(A.length==1){A="0"+A}return"#"+D+C+A};$AA.ColorAnimation.registerClass("AjaxControlToolkit.Animation.ColorAnimation",$AA.InterpolatedAnimation);$AA.registerAnimation("color",$AA.ColorAnimation);$AA.LengthAnimation=function(H,G,F,E,D,B,A,C){$AA.LengthAnimation.initializeBase(this,[H,G,F,E,D,B,A]);this._unit=(C!=null)?C:"px"};$AA.LengthAnimation.prototype={getAnimatedValue:function(A){var B=this.interpolate(this.get_startValue(),this.get_endValue(),A);return Math.round(B)+this._unit},get_unit:function(){return this._unit},set_unit:function(A){if(this._unit!=A){this._unit=A;this.raisePropertyChanged("unit")}}};$AA.LengthAnimation.registerClass("AjaxControlToolkit.Animation.LengthAnimation",$AA.InterpolatedAnimation);$AA.registerAnimation("length",$AA.LengthAnimation);$AA.MoveAnimation=function(G,F,E,A,B,D,C){$AA.MoveAnimation.initializeBase(this,[G,F,E,null]);this._horizontal=A?A:0;this._vertical=B?B:0;this._relative=(D===undefined)?true:D;this._horizontalAnimation=new $AA.LengthAnimation(G,F,E,"style","left",null,null,C);this._verticalAnimation=new $AA.LengthAnimation(G,F,E,"style","top",null,null,C);this.add(this._verticalAnimation);this.add(this._horizontalAnimation)};$AA.MoveAnimation.prototype={onStart:function(){$AA.MoveAnimation.callBaseMethod(this,"onStart");var A=this.get_target();this._horizontalAnimation.set_startValue(A.offsetLeft);this._horizontalAnimation.set_endValue(this._relative?A.offsetLeft+this._horizontal:this._horizontal);this._verticalAnimation.set_startValue(A.offsetTop);this._verticalAnimation.set_endValue(this._relative?A.offsetTop+this._vertical:this._vertical)},get_horizontal:function(){return this._horizontal},set_horizontal:function(A){A=this._getFloat(A);if(this._horizontal!=A){this._horizontal=A;this.raisePropertyChanged("horizontal")}},get_vertical:function(){return this._vertical},set_vertical:function(A){A=this._getFloat(A);if(this._vertical!=A){this._vertical=A;this.raisePropertyChanged("vertical")}},get_relative:function(){return this._relative},set_relative:function(A){A=this._getBoolean(A);if(this._relative!=A){this._relative=A;this.raisePropertyChanged("relative")}},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(B){var A=this._horizontalAnimation.get_unit();if(A!=B){this._horizontalAnimation.set_unit(B);this._verticalAnimation.set_unit(B);this.raisePropertyChanged("unit")}}};$AA.MoveAnimation.registerClass("AjaxControlToolkit.Animation.MoveAnimation",$AA.ParallelAnimation);$AA.registerAnimation("move",$AA.MoveAnimation);$AA.ResizeAnimation=function(F,E,D,B,A,C){$AA.ResizeAnimation.initializeBase(this,[F,E,D,null]);this._width=B;this._height=A;this._horizontalAnimation=new $AA.LengthAnimation(F,E,D,"style","width",null,null,C);this._verticalAnimation=new $AA.LengthAnimation(F,E,D,"style","height",null,null,C);this.add(this._horizontalAnimation);this.add(this._verticalAnimation)};$AA.ResizeAnimation.prototype={onStart:function(){$AA.ResizeAnimation.callBaseMethod(this,"onStart");var A=this.get_target();this._horizontalAnimation.set_startValue(A.offsetWidth);this._verticalAnimation.set_startValue(A.offsetHeight);this._horizontalAnimation.set_endValue((this._width!==null&&this._width!==undefined)?this._width:A.offsetWidth);this._verticalAnimation.set_endValue((this._height!==null&&this._height!==undefined)?this._height:A.offsetHeight)},get_width:function(){return this._width},set_width:function(A){A=this._getFloat(A);if(this._width!=A){this._width=A;this.raisePropertyChanged("width")}},get_height:function(){return this._height},set_height:function(A){A=this._getFloat(A);if(this._height!=A){this._height=A;this.raisePropertyChanged("height")}},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(B){var A=this._horizontalAnimation.get_unit();if(A!=B){this._horizontalAnimation.set_unit(B);this._verticalAnimation.set_unit(B);this.raisePropertyChanged("unit")}}};$AA.ResizeAnimation.registerClass("AjaxControlToolkit.Animation.ResizeAnimation",$AA.ParallelAnimation);$AA.registerAnimation("resize",$AA.ResizeAnimation);$AA.ScaleAnimation=function(F,E,D,C,B,A,H,G){$AA.ScaleAnimation.initializeBase(this,[F,E,D]);this._scaleFactor=(C!==undefined)?C:1;this._unit=(B!==undefined)?B:"px";this._center=A;this._scaleFont=H;this._fontUnit=(G!==undefined)?G:"pt";this._element=null;this._initialHeight=null;this._initialWidth=null;this._initialTop=null;this._initialLeft=null;this._initialFontSize=null};$AA.ScaleAnimation.prototype={getAnimatedValue:function(A){return this.interpolate(1,this._scaleFactor,A)},onStart:function(){$AA.ScaleAnimation.callBaseMethod(this,"onStart");this._element=this.get_target();if(this._element){this._initialHeight=this._element.offsetHeight;this._initialWidth=this._element.offsetWidth;if(this._center){this._initialTop=this._element.offsetTop;this._initialLeft=this._element.offsetLeft}if(this._scaleFont){this._initialFontSize=parseFloat($common.getCurrentStyle(this._element,"fontSize"))}}},setValue:function(D){if(this._element){var C=Math.round(this._initialWidth*D);var A=Math.round(this._initialHeight*D);this._element.style.width=C+this._unit;this._element.style.height=A+this._unit;if(this._center){this._element.style.top=(this._initialTop+Math.round((this._initialHeight-A)/2))+this._unit;this._element.style.left=(this._initialLeft+Math.round((this._initialWidth-C)/2))+this._unit}if(this._scaleFont){var B=this._initialFontSize*D;if(this._fontUnit=="px"||this._fontUnit=="pt"){B=Math.round(B)}this._element.style.fontSize=B+this._fontUnit}}},onEnd:function(){this._element=null;this._initialHeight=null;this._initialWidth=null;this._initialTop=null;this._initialLeft=null;this._initialFontSize=null;$AA.ScaleAnimation.callBaseMethod(this,"onEnd")},get_scaleFactor:function(){return this._scaleFactor},set_scaleFactor:function(A){A=this._getFloat(A);if(this._scaleFactor!=A){this._scaleFactor=A;this.raisePropertyChanged("scaleFactor")}},get_unit:function(){return this._unit},set_unit:function(A){if(this._unit!=A){this._unit=A;this.raisePropertyChanged("unit")}},get_center:function(){return this._center},set_center:function(A){A=this._getBoolean(A);if(this._center!=A){this._center=A;this.raisePropertyChanged("center")}},get_scaleFont:function(){return this._scaleFont},set_scaleFont:function(A){A=this._getBoolean(A);if(this._scaleFont!=A){this._scaleFont=A;this.raisePropertyChanged("scaleFont")}},get_fontUnit:function(){return this._fontUnit},set_fontUnit:function(A){if(this._fontUnit!=A){this._fontUnit=A;this.raisePropertyChanged("fontUnit")}}};$AA.ScaleAnimation.registerClass("AjaxControlToolkit.Animation.ScaleAnimation",$AA.Animation);$AA.registerAnimation("scale",$AA.ScaleAnimation);$AA.Action=function(C,B,A){$AA.Action.initializeBase(this,[C,B,A]);if(B===undefined){this.set_duration(0)}};$AA.Action.prototype={onEnd:function(){this.doAction();$AA.Action.callBaseMethod(this,"onEnd")},doAction:function(){throw Error.notImplemented()},getAnimatedValue:function(){},setValue:function(){}};$AA.Action.registerClass("AjaxControlToolkit.Animation.Action",$AA.Animation);$AA.registerAnimation("action",$AA.Action);$AA.EnableAction=function(D,C,B,A){$AA.EnableAction.initializeBase(this,[D,C,B]);this._enabled=(A!==undefined)?A:true};$AA.EnableAction.prototype={doAction:function(){var A=this.get_target();if(A){A.disabled=!this._enabled}},get_enabled:function(){return this._enabled},set_enabled:function(A){A=this._getBoolean(A);if(this._enabled!=A){this._enabled=A;this.raisePropertyChanged("enabled")}}};$AA.EnableAction.registerClass("AjaxControlToolkit.Animation.EnableAction",$AA.Action);$AA.registerAnimation("enableAction",$AA.EnableAction);$AA.HideAction=function(C,B,A,D){$AA.HideAction.initializeBase(this,[C,B,A]);this._visible=D};$AA.HideAction.prototype={doAction:function(){var A=this.get_target();if(A){$common.setVisible(A,this._visible)}},get_visible:function(){return this._visible},set_visible:function(A){if(this._visible!=A){this._visible=A;this.raisePropertyChanged("visible")}}};$AA.HideAction.registerClass("AjaxControlToolkit.Animation.HideAction",$AA.Action);$AA.registerAnimation("hideAction",$AA.HideAction);$AA.StyleAction=function(E,D,C,A,B){$AA.StyleAction.initializeBase(this,[E,D,C]);this._attribute=A;this._value=B};$AA.StyleAction.prototype={doAction:function(){var A=this.get_target();if(A){A.style[this._attribute]=this._value}},get_attribute:function(){return this._attribute},set_attribute:function(A){if(this._attribute!=A){this._attribute=A;this.raisePropertyChanged("attribute")}},get_value:function(){return this._value},set_value:function(A){if(this._value!=A){this._value=A;this.raisePropertyChanged("value")}}};$AA.StyleAction.registerClass("AjaxControlToolkit.Animation.StyleAction",$AA.Action);$AA.registerAnimation("styleAction",$AA.StyleAction);$AA.OpacityAction=function(D,C,B,A){$AA.OpacityAction.initializeBase(this,[D,C,B]);this._opacity=A};$AA.OpacityAction.prototype={doAction:function(){var A=this.get_target();if(A){$common.setElementOpacity(A,this._opacity)}},get_opacity:function(){return this._opacity},set_opacity:function(A){A=this._getFloat(A);if(this._opacity!=A){this._opacity=A;this.raisePropertyChanged("opacity")}}};$AA.OpacityAction.registerClass("AjaxControlToolkit.Animation.OpacityAction",$AA.Action);$AA.registerAnimation("opacityAction",$AA.OpacityAction);$AA.ScriptAction=function(D,C,B,A){$AA.ScriptAction.initializeBase(this,[D,C,B]);this._script=A};$AA.ScriptAction.prototype={doAction:function(){try{eval(this._script)}catch(ex){}},get_script:function(){return this._script},set_script:function(A){if(this._script!=A){this._script=A;this.raisePropertyChanged("script")}}};$AA.ScriptAction.registerClass("AjaxControlToolkit.Animation.ScriptAction",$AA.Action);$AA.registerAnimation("scriptAction",$AA.ScriptAction);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.BehaviorBase=function(A){AjaxControlToolkit.BehaviorBase.initializeBase(this,[A]);this._clientStateFieldID=null;this._pageRequestManager=null;this._partialUpdateBeginRequestHandler=null;this._partialUpdateEndRequestHandler=null};AjaxControlToolkit.BehaviorBase.prototype={initialize:function(){AjaxControlToolkit.BehaviorBase.callBaseMethod(this,"initialize")},dispose:function(){AjaxControlToolkit.BehaviorBase.callBaseMethod(this,"dispose");if(this._pageRequestManager){if(this._partialUpdateBeginRequestHandler){this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler);this._partialUpdateBeginRequestHandler=null}if(this._partialUpdateEndRequestHandler){this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler);this._partialUpdateEndRequestHandler=null}this._pageRequestManager=null}},get_ClientStateFieldID:function(){return this._clientStateFieldID},set_ClientStateFieldID:function(A){if(this._clientStateFieldID!=A){this._clientStateFieldID=A;this.raisePropertyChanged("ClientStateFieldID")}},get_ClientState:function(){if(this._clientStateFieldID){var A=document.getElementById(this._clientStateFieldID);if(A){return A.value}}return null},set_ClientState:function(B){if(this._clientStateFieldID){var A=document.getElementById(this._clientStateFieldID);if(A){A.value=B}}},registerPartialUpdateEvents:function(){if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(this._pageRequestManager){this._partialUpdateBeginRequestHandler=Function.createDelegate(this,this._partialUpdateBeginRequest);this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler);this._partialUpdateEndRequestHandler=Function.createDelegate(this,this._partialUpdateEndRequest);this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler)}}},_partialUpdateBeginRequest:function(A,B){},_partialUpdateEndRequest:function(A,B){}};AjaxControlToolkit.BehaviorBase.registerClass("AjaxControlToolkit.BehaviorBase",Sys.UI.Behavior);AjaxControlToolkit.DynamicPopulateBehaviorBase=function(A){AjaxControlToolkit.DynamicPopulateBehaviorBase.initializeBase(this,[A]);this._DynamicControlID=null;this._DynamicContextKey=null;this._DynamicServicePath=null;this._DynamicServiceMethod=null;this._cacheDynamicResults=false;this._dynamicPopulateBehavior=null;this._populatingHandler=null;this._populatedHandler=null};AjaxControlToolkit.DynamicPopulateBehaviorBase.prototype={initialize:function(){AjaxControlToolkit.DynamicPopulateBehaviorBase.callBaseMethod(this,"initialize");this._populatingHandler=Function.createDelegate(this,this._onPopulating);this._populatedHandler=Function.createDelegate(this,this._onPopulated)},dispose:function(){if(this._populatedHandler){if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.remove_populated(this._populatedHandler)}this._populatedHandler=null}if(this._populatingHandler){if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.remove_populating(this._populatingHandler)}this._populatingHandler=null}if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior=null}AjaxControlToolkit.DynamicPopulateBehaviorBase.callBaseMethod(this,"dispose")},populate:function(A){if(this._dynamicPopulateBehavior&&(this._dynamicPopulateBehavior.get_element()!=$get(this._DynamicControlID))){this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior=null}if(!this._dynamicPopulateBehavior&&this._DynamicControlID&&this._DynamicServiceMethod){this._dynamicPopulateBehavior=$create(AjaxControlToolkit.DynamicPopulateBehavior,{"id":this.get_id()+"_DynamicPopulateBehavior","ContextKey":this._DynamicContextKey,"ServicePath":this._DynamicServicePath,"ServiceMethod":this._DynamicServiceMethod,"cacheDynamicResults":this._cacheDynamicResults},null,null,$get(this._DynamicControlID));this._dynamicPopulateBehavior.add_populating(this._populatingHandler);this._dynamicPopulateBehavior.add_populated(this._populatedHandler)}if(this._dynamicPopulateBehavior){this._dynamicPopulateBehavior.populate(A?A:this._DynamicContextKey)}},_onPopulating:function(B,A){this.raisePopulating(A)},_onPopulated:function(B,A){this.raisePopulated(A)},get_dynamicControlID:function(){return this._DynamicControlID},get_DynamicControlID:this.get_dynamicControlID,set_dynamicControlID:function(A){if(this._DynamicControlID!=A){this._DynamicControlID=A;this.raisePropertyChanged("dynamicControlID");this.raisePropertyChanged("DynamicControlID")}},set_DynamicControlID:this.set_dynamicControlID,get_dynamicContextKey:function(){return this._DynamicContextKey},get_DynamicContextKey:this.get_dynamicContextKey,set_dynamicContextKey:function(A){if(this._DynamicContextKey!=A){this._DynamicContextKey=A;this.raisePropertyChanged("dynamicContextKey");this.raisePropertyChanged("DynamicContextKey")}},set_DynamicContextKey:this.set_dynamicContextKey,get_dynamicServicePath:function(){return this._DynamicServicePath},get_DynamicServicePath:this.get_dynamicServicePath,set_dynamicServicePath:function(A){if(this._DynamicServicePath!=A){this._DynamicServicePath=A;this.raisePropertyChanged("dynamicServicePath");this.raisePropertyChanged("DynamicServicePath")}},set_DynamicServicePath:this.set_dynamicServicePath,get_dynamicServiceMethod:function(){return this._DynamicServiceMethod},get_DynamicServiceMethod:this.get_dynamicServiceMethod,set_dynamicServiceMethod:function(A){if(this._DynamicServiceMethod!=A){this._DynamicServiceMethod=A;this.raisePropertyChanged("dynamicServiceMethod");this.raisePropertyChanged("DynamicServiceMethod")}},set_DynamicServiceMethod:this.set_dynamicServiceMethod,get_cacheDynamicResults:function(){return this._cacheDynamicResults},set_cacheDynamicResults:function(A){if(this._cacheDynamicResults!=A){this._cacheDynamicResults=A;this.raisePropertyChanged("cacheDynamicResults")}},add_populated:function(A){this.get_events().addHandler("populated",A)},remove_populated:function(A){this.get_events().removeHandler("populated",A)},raisePopulated:function(A){var B=this.get_events().getHandler("populated");if(B){B(this,A)}},add_populating:function(A){this.get_events().addHandler("populating",A)},remove_populating:function(A){this.get_events().removeHandler("populating",A)},raisePopulating:function(A){var B=this.get_events().getHandler("populating");if(B){B(this,A)}}};AjaxControlToolkit.DynamicPopulateBehaviorBase.registerClass("AjaxControlToolkit.DynamicPopulateBehaviorBase",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.ControlBase=function(A){AjaxControlToolkit.ControlBase.initializeBase(this,[A]);this._clientStateField=null;this._callbackTarget=null;this._onsubmit$delegate=Function.createDelegate(this,this._onsubmit);this._oncomplete$delegate=Function.createDelegate(this,this._oncomplete);this._onerror$delegate=Function.createDelegate(this,this._onerror)};AjaxControlToolkit.ControlBase.prototype={initialize:function(){AjaxControlToolkit.ControlBase.callBaseMethod(this,"initialize");if(this._clientStateField){this.loadClientState(this._clientStateField.value)}if(typeof (Sys.WebForms)!=="undefined"&&typeof (Sys.WebForms.PageRequestManager)!=="undefined"){Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate)}else{$addHandler(document.forms[0],"submit",this._onsubmit$delegate)}},dispose:function(){if(typeof (Sys.WebForms)!=="undefined"&&typeof (Sys.WebForms.PageRequestManager)!=="undefined"){Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements,this._onsubmit$delegate)}else{$removeHandler(document.forms[0],"submit",this._onsubmit$delegate)}AjaxControlToolkit.ControlBase.callBaseMethod(this,"dispose")},findElement:function(A){return $get(this.get_id()+"_"+A.split(":").join("_"))},get_clientStateField:function(){return this._clientStateField},set_clientStateField:function(A){if(this.get_isInitialized()){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_CannotSetClientStateField)}if(this._clientStateField!=A){this._clientStateField=A;this.raisePropertyChanged("clientStateField")}},loadClientState:function(A){},saveClientState:function(){return null},_invoke:function(E,D,B){if(!this._callbackTarget){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_ControlNotRegisteredForCallbacks)}if(typeof (WebForm_DoCallback)==="undefined"){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_PageNotRegisteredForCallbacks)}var C=[];for(var F=0;F<D.length;F++){C[F]=D[F]}var A=this.saveClientState();if(A!=null&&!String.isInstanceOfType(A)){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_InvalidClientStateType)}var G=Sys.Serialization.JavaScriptSerializer.serialize({name:E,args:C,state:this.saveClientState()});WebForm_DoCallback(this._callbackTarget,G,this._oncomplete$delegate,B,this._onerror$delegate,true)},_oncomplete:function(A,B){A=Sys.Serialization.JavaScriptSerializer.deserialize(A);if(A.error){throw Error.create(A.error)}this.loadClientState(A.state);B(A.result)},_onerror:function(B,A){throw Error.create(B)},_onsubmit:function(){if(this._clientStateField){this._clientStateField.value=this.saveClientState()}return true}};AjaxControlToolkit.ControlBase.registerClass("AjaxControlToolkit.ControlBase",Sys.UI.Control);Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.Resources={"PasswordStrength_InvalidWeightingRatios":"Strength Weighting ratios must have 4 elements","Animation_ChildrenNotAllowed":'AjaxControlToolkit.Animation.createAnimation cannot add child animations to type "{0}" that does not derive from AjaxControlToolkit.Animation.ParentAnimation',"PasswordStrength_RemainingSymbols":"{0} symbol characters","ExtenderBase_CannotSetClientStateField":"clientStateField can only be set before initialization","RTE_PreviewHTML":"Preview HTML","RTE_JustifyCenter":"Justify Center","PasswordStrength_RemainingUpperCase":"{0} more upper case characters","Animation_TargetNotFound":'AjaxControlToolkit.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control.  No element or control could be found corresponding to "{0}"',"RTE_FontColor":"Font Color","RTE_LabelColor":"Label Color","Common_InvalidBorderWidthUnit":'A unit type of "{0}"\u0027 is invalid for parseBorderWidth',"RTE_Heading":"Heading","Tabs_PropertySetBeforeInitialization":"{0} cannot be changed before initialization","RTE_OrderedList":"Ordered List","ReorderList_DropWatcherBehavior_NoChild":'Could not find child of list with id "{0}"',"CascadingDropDown_MethodTimeout":"[Method timeout]","RTE_Columns":"Columns","RTE_InsertImage":"Insert Image","RTE_InsertTable":"Insert Table","RTE_Values":"Values","RTE_OK":"OK","ExtenderBase_PageNotRegisteredForCallbacks":"This Page has not been registered for callbacks","Animation_NoDynamicPropertyFound":'AjaxControlToolkit.Animation.createAnimation found no property corresponding to "{0}" or "{1}"',"Animation_InvalidBaseType":"AjaxControlToolkit.Animation.registerAnimation can only register types that inherit from AjaxControlToolkit.Animation.Animation","RTE_UnorderedList":"Unordered List","ResizableControlBehavior_InvalidHandler":"{0} handler not a function, function name, or function text","Animation_InvalidColor":'Color must be a 7-character hex representation (e.g. #246ACF), not "{0}"',"RTE_CellColor":"Cell Color","PasswordStrength_RemainingMixedCase":"Mixed case characters","RTE_Italic":"Italic","CascadingDropDown_NoParentElement":'Failed to find parent element "{0}"',"ValidatorCallout_DefaultErrorMessage":"This control is invalid","RTE_Indent":"Indent","ReorderList_DropWatcherBehavior_CallbackError":"Reorder failed, see details below.\\r\\n\\r\\n{0}","PopupControl_NoDefaultProperty":'No default property supported for control "{0}" of type "{1}"',"RTE_Normal":"Normal","PopupExtender_NoParentElement":'Couldn\u0027t find parent element "{0}"',"RTE_ViewValues":"View Values","RTE_Legend":"Legend","RTE_Labels":"Labels","RTE_CellSpacing":"Cell Spacing","PasswordStrength_RemainingNumbers":"{0} more numbers","RTE_Border":"Border","RTE_Create":"Create","RTE_BackgroundColor":"Background Color","RTE_Cancel":"Cancel","RTE_JustifyFull":"Justify Full","RTE_JustifyLeft":"Justify Left","RTE_Cut":"Cut","ResizableControlBehavior_CannotChangeProperty":"Changes to {0} not supported","RTE_ViewSource":"View Source","Common_InvalidPaddingUnit":'A unit type of "{0}" is invalid for parsePadding',"RTE_Paste":"Paste","ExtenderBase_ControlNotRegisteredForCallbacks":"This Control has not been registered for callbacks","Calendar_Today":"Today: {0}","Common_DateTime_InvalidFormat":"Invalid format","ListSearch_DefaultPrompt":"Type to search","CollapsiblePanel_NoControlID":'Failed to find element "{0}"',"RTE_ViewEditor":"View Editor","RTE_BarColor":"Bar Color","PasswordStrength_DefaultStrengthDescriptions":"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!","RTE_Inserttexthere":"Insert text here","Animation_UknownAnimationName":'AjaxControlToolkit.Animation.createAnimation could not find an Animation corresponding to the name "{0}"',"ExtenderBase_InvalidClientStateType":"saveClientState must return a value of type String","Rating_CallbackError":"An unhandled exception has occurred:\\r\\n{0}","Tabs_OwnerExpected":"owner must be set before initialize","DynamicPopulate_WebServiceTimeout":"Web service call timed out","PasswordStrength_RemainingLowerCase":"{0} more lower case characters","Animation_MissingAnimationName":"AjaxControlToolkit.Animation.createAnimation requires an object with an AnimationName property","RTE_JustifyRight":"Justify Right","Tabs_ActiveTabArgumentOutOfRange":"Argument is not a member of the tabs collection","RTE_CellPadding":"Cell Padding","RTE_ClearFormatting":"Clear Formatting","AlwaysVisible_ElementRequired":"AjaxControlToolkit.AlwaysVisibleControlBehavior must have an element","Slider_NoSizeProvided":"Please set valid values for the height and width attributes in the slider\u0027s CSS classes","DynamicPopulate_WebServiceError":"Web Service call failed: {0}","PasswordStrength_StrengthPrompt":"Strength: ","PasswordStrength_RemainingCharacters":"{0} more characters","PasswordStrength_Satisfied":"Nothing more required","RTE_Hyperlink":"Hyperlink","Animation_NoPropertyFound":'AjaxControlToolkit.Animation.createAnimation found no property corresponding to "{0}"',"PasswordStrength_InvalidStrengthDescriptionStyles":"Text Strength description style classes must match the number of text descriptions.","PasswordStrength_GetHelpRequirements":"Get help on password requirements","PasswordStrength_InvalidStrengthDescriptions":"Invalid number of text strength descriptions specified","RTE_Underline":"Underline","Tabs_PropertySetAfterInitialization":"{0} cannot be changed after initialization","RTE_Rows":"Rows","RTE_Redo":"Redo","RTE_Size":"Size","RTE_Undo":"Undo","RTE_Bold":"Bold","RTE_Copy":"Copy","RTE_Font":"Font","CascadingDropDown_MethodError":"[Method error {0}]","RTE_BorderColor":"Border Color","RTE_Paragraph":"Paragraph","RTE_InsertHorizontalRule":"Insert Horizontal Rule","Common_UnitHasNoDigits":"No digits","RTE_Outdent":"Outdent","Common_DateTime_InvalidTimeSpan":'"{0}" is not a valid TimeSpan format',"Animation_CannotNestSequence":"AjaxControlToolkit.Animation.SequenceAnimation cannot be nested inside AjaxControlToolkit.Animation.ParallelAnimation","Shared_BrowserSecurityPreventsPaste":"Your browser security settings don\u0027t permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."};if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit.Animation");AjaxControlToolkit.Animation.AnimationBehavior=function(A){AjaxControlToolkit.Animation.AnimationBehavior.initializeBase(this,[A]);this._onLoad=null;this._onClick=null;this._onMouseOver=null;this._onMouseOut=null;this._onHoverOver=null;this._onHoverOut=null;this._onClickHandler=null;this._onMouseOverHandler=null;this._onMouseOutHandler=null};AjaxControlToolkit.Animation.AnimationBehavior.prototype={initialize:function(){AjaxControlToolkit.Animation.AnimationBehavior.callBaseMethod(this,"initialize");var A=this.get_element();if(A){this._onClickHandler=Function.createDelegate(this,this.OnClick);$addHandler(A,"click",this._onClickHandler);this._onMouseOverHandler=Function.createDelegate(this,this.OnMouseOver);$addHandler(A,"mouseover",this._onMouseOverHandler);this._onMouseOutHandler=Function.createDelegate(this,this.OnMouseOut);$addHandler(A,"mouseout",this._onMouseOutHandler)}},dispose:function(){var A=this.get_element();if(A){if(this._onClickHandler){$removeHandler(A,"click",this._onClickHandler);this._onClickHandler=null}if(this._onMouseOverHandler){$removeHandler(A,"mouseover",this._onMouseOverHandler);this._onMouseOverHandler=null}if(this._onMouseOutHandler){$removeHandler(A,"mouseout",this._onMouseOutHandler);this._onMouseOutHandler=null}}this._onLoad=null;this._onClick=null;this._onMouseOver=null;this._onMouseOut=null;this._onHoverOver=null;this._onHoverOut=null;AjaxControlToolkit.Animation.AnimationBehavior.callBaseMethod(this,"dispose")},get_OnLoad:function(){return this._onLoad?this._onLoad.get_json():null},set_OnLoad:function(A){if(!this._onLoad){this._onLoad=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onLoad.initialize()}this._onLoad.set_json(A);this.raisePropertyChanged("OnLoad");this._onLoad.play()},get_OnLoadBehavior:function(){return this._onLoad},get_OnClick:function(){return this._onClick?this._onClick.get_json():null},set_OnClick:function(A){if(!this._onClick){this._onClick=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onClick.initialize()}this._onClick.set_json(A);this.raisePropertyChanged("OnClick")},get_OnClickBehavior:function(){return this._onClick},OnClick:function(){if(this._onClick){this._onClick.play()}},get_OnMouseOver:function(){return this._onMouseOver?this._onMouseOver.get_json():null},set_OnMouseOver:function(A){if(!this._onMouseOver){this._onMouseOver=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onMouseOver.initialize()}this._onMouseOver.set_json(A);this.raisePropertyChanged("OnMouseOver")},get_OnMouseOverBehavior:function(){return this._onMouseOver},OnMouseOver:function(){if(this._onMouseOver){this._onMouseOver.play()}if(this._onHoverOver){if(this._onHoverOut){this._onHoverOut.quit()}this._onHoverOver.play()}},get_OnMouseOut:function(){return this._onMouseOut?this._onMouseOut.get_json():null},set_OnMouseOut:function(A){if(!this._onMouseOut){this._onMouseOut=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onMouseOut.initialize()}this._onMouseOut.set_json(A);this.raisePropertyChanged("OnMouseOut")},get_OnMouseOutBehavior:function(){return this._onMouseOut},OnMouseOut:function(){if(this._onMouseOut){this._onMouseOut.play()}if(this._onHoverOut){if(this._onHoverOver){this._onHoverOver.quit()}this._onHoverOut.play()}},get_OnHoverOver:function(){return this._onHoverOver?this._onHoverOver.get_json():null},set_OnHoverOver:function(A){if(!this._onHoverOver){this._onHoverOver=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onHoverOver.initialize()}this._onHoverOver.set_json(A);this.raisePropertyChanged("OnHoverOver")},get_OnHoverOverBehavior:function(){return this._onHoverOver},get_OnHoverOut:function(){return this._onHoverOut?this._onHoverOut.get_json():null},set_OnHoverOut:function(A){if(!this._onHoverOut){this._onHoverOut=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onHoverOut.initialize()}this._onHoverOut.set_json(A);this.raisePropertyChanged("OnHoverOut")},get_OnHoverOutBehavior:function(){return this._onHoverOut}};AjaxControlToolkit.Animation.AnimationBehavior.registerClass("AjaxControlToolkit.Animation.AnimationBehavior",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.Animation.GenericAnimationBehavior=function(A){AjaxControlToolkit.Animation.GenericAnimationBehavior.initializeBase(this,[A]);this._json=null;this._animation=null};AjaxControlToolkit.Animation.GenericAnimationBehavior.prototype={dispose:function(){this.disposeAnimation();AjaxControlToolkit.Animation.GenericAnimationBehavior.callBaseMethod(this,"dispose")},disposeAnimation:function(){if(this._animation){this._animation.dispose()}this._animation=null},play:function(){if(this._animation&&!this._animation.get_isPlaying()){this.stop();this._animation.play()}},stop:function(){if(this._animation){if(this._animation.get_isPlaying()){this._animation.stop(true)}}},quit:function(){if(this._animation){if(this._animation.get_isPlaying()){this._animation.stop(false)}}},get_json:function(){return this._json},set_json:function(B){if(this._json!=B){this._json=B;this.raisePropertyChanged("json");this.disposeAnimation();var A=this.get_element();if(A){this._animation=AjaxControlToolkit.Animation.buildAnimation(this._json,A);if(this._animation){this._animation.initialize()}this.raisePropertyChanged("animation")}}},get_animation:function(){return this._animation}};AjaxControlToolkit.Animation.GenericAnimationBehavior.registerClass("AjaxControlToolkit.Animation.GenericAnimationBehavior",AjaxControlToolkit.BehaviorBase);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.PopupBehavior=function(A){AjaxControlToolkit.PopupBehavior.initializeBase(this,[A]);this._x=0;this._y=0;this._positioningMode=AjaxControlToolkit.PositioningMode.Absolute;this._parentElement=null;this._parentElementID=null;this._moveHandler=null;this._firstPopup=true;this._originalParent=null;this._visible=false;this._onShow=null;this._onShowEndedHandler=null;this._onHide=null;this._onHideEndedHandler=null};AjaxControlToolkit.PopupBehavior.prototype={initialize:function(){AjaxControlToolkit.PopupBehavior.callBaseMethod(this,"initialize");this._hidePopup();this.get_element().style.position="absolute";this._onShowEndedHandler=Function.createDelegate(this,this._onShowEnded);this._onHideEndedHandler=Function.createDelegate(this,this._onHideEnded)},dispose:function(){var A=this.get_element();if(A){if(this._visible){this.hide()}if(this._originalParent){A.parentNode.removeChild(A);this._originalParent.appendChild(A);this._originalParent=null}A._hideWindowedElementsIFrame=null}this._parentElement=null;if(this._onShow&&this._onShow.get_animation()&&this._onShowEndedHandler){this._onShow.get_animation().remove_ended(this._onShowEndedHandler)}this._onShowEndedHandler=null;this._onShow=null;if(this._onHide&&this._onHide.get_animation()&&this._onHideEndedHandler){this._onHide.get_animation().remove_ended(this._onHideEndedHandler)}this._onHideEndedHandler=null;this._onHide=null;AjaxControlToolkit.PopupBehavior.callBaseMethod(this,"dispose")},show:function(){if(this._visible){return }var A=new Sys.CancelEventArgs();this.raiseShowing(A);if(A.get_cancel()){return }this._visible=true;var B=this.get_element();$common.setVisible(B,true);this.setupPopup();if(this._onShow){$common.setVisible(B,false);this.onShow()}else{this.raiseShown(Sys.EventArgs.Empty)}},hide:function(){if(!this._visible){return }var A=new Sys.CancelEventArgs();this.raiseHiding(A);if(A.get_cancel()){return }this._visible=false;if(this._onHide){this.onHide()}else{this._hidePopup();this._hideCleanup()}},getBounds:function(){var D=this.get_element();var F=D.offsetParent||document.documentElement;var G;var H;if(this._parentElement){H=$common.getBounds(this._parentElement);var C=$common.getLocation(F);G={x:H.x-C.x,y:H.y-C.y}}else{H=$common.getBounds(F);G={x:0,y:0}}var E=D.offsetWidth-(D.clientLeft?D.clientLeft*2:0);var B=D.offsetHeight-(D.clientTop?D.clientTop*2:0);var A;switch(this._positioningMode){case AjaxControlToolkit.PositioningMode.Center:A={x:Math.round(H.width/2-E/2),y:Math.round(H.height/2-B/2)};break;case AjaxControlToolkit.PositioningMode.BottomLeft:A={x:0,y:H.height};break;case AjaxControlToolkit.PositioningMode.BottomRight:A={x:H.width-E,y:H.height};break;case AjaxControlToolkit.PositioningMode.TopLeft:A={x:0,y:-D.offsetHeight};break;case AjaxControlToolkit.PositioningMode.TopRight:A={x:H.width-E,y:-D.offsetHeight};break;default:A={x:0,y:0}}A.x+=this._x+G.x;A.y+=this._y+G.y;return new Sys.UI.Bounds(A.x,A.y,E,B)},adjustPopupPosition:function(D){var B=this.get_element();if(!D){D=this.getBounds()}if(this._firstPopup){B.style.width=D.width+"px";this._firstPopup=false}var A=$common.getBounds(B);var C=false;if(A.x<0){D.x-=A.x;C=true}if(A.y<0){D.y-=A.y;C=true}if(C){$common.setLocation(B,D)}},addBackgroundIFrame:function(){var A=this.get_element();if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){var B=A._hideWindowedElementsIFrame;if(!B){B=document.createElement("iframe");B.src="javascript:'<html></html>';";B.style.position="absolute";B.style.display="none";B.scrolling="no";B.frameBorder="0";B.tabIndex="-1";B.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";A.parentNode.insertBefore(B,A);A._hideWindowedElementsIFrame=B;this._moveHandler=Function.createDelegate(this,this._onMove);Sys.UI.DomEvent.addHandler(A,"move",this._moveHandler)}$common.setBounds(B,$common.getBounds(A));B.style.display=A.style.display;if(A.currentStyle&&A.currentStyle.zIndex){B.style.zIndex=A.currentStyle.zIndex}else{if(A.style.zIndex){B.style.zIndex=A.style.zIndex}}}},setupPopup:function(){var A=this.get_element();var B=this.getBounds();$common.setLocation(A,B);this.adjustPopupPosition(B);A.zIndex=1000;this.addBackgroundIFrame()},_hidePopup:function(){var A=this.get_element();$common.setVisible(A,false);if(A.originalWidth){A.style.width=A.originalWidth+"px";A.originalWidth=null}},_hideCleanup:function(){var A=this.get_element();if(this._moveHandler){Sys.UI.DomEvent.removeHandler(A,"move",this._moveHandler);this._moveHandler=null}if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var B=A._hideWindowedElementsIFrame;if(B){B.style.display="none"}}this.raiseHidden(Sys.EventArgs.Empty)},_onMove:function(){var A=this.get_element();if(A._hideWindowedElementsIFrame){A.parentNode.insertBefore(A._hideWindowedElementsIFrame,A);A._hideWindowedElementsIFrame.style.top=A.style.top;A._hideWindowedElementsIFrame.style.left=A.style.left}},get_onShow:function(){return this._onShow?this._onShow.get_json():null},set_onShow:function(B){if(!this._onShow){this._onShow=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onShow.initialize()}this._onShow.set_json(B);var A=this._onShow.get_animation();if(A){A.add_ended(this._onShowEndedHandler)}this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._onShow},onShow:function(){if(this._onShow){if(this._onHide){this._onHide.quit()}this._onShow.play()}},_onShowEnded:function(){this.adjustPopupPosition();this.addBackgroundIFrame();this.raiseShown(Sys.EventArgs.Empty)},get_onHide:function(){return this._onHide?this._onHide.get_json():null},set_onHide:function(B){if(!this._onHide){this._onHide=new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onHide.initialize()}this._onHide.set_json(B);var A=this._onHide.get_animation();if(A){A.add_ended(this._onHideEndedHandler)}this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._onHide},onHide:function(){if(this._onHide){if(this._onShow){this._onShow.quit()}this._onHide.play()}},_onHideEnded:function(){this._hideCleanup()},get_parentElement:function(){if(!this._parentElement&&this._parentElementID){this.set_parentElement($get(this._parentElementID));Sys.Debug.assert(this._parentElement!=null,String.format(AjaxControlToolkit.Resources.PopupExtender_NoParentElement,this._parentElementID))}return this._parentElement},set_parentElement:function(A){this._parentElement=A;this.raisePropertyChanged("parentElement")},get_parentElementID:function(){if(this._parentElement){return this._parentElement.id}return this._parentElementID},set_parentElementID:function(A){this._parentElementID=A;if(this.get_isInitialized()){this.set_parentElement($get(A))}},get_positioningMode:function(){return this._positioningMode},set_positioningMode:function(A){this._positioningMode=A;this.raisePropertyChanged("positioningMode")},get_x:function(){return this._x},set_x:function(A){if(A!=this._x){this._x=A;if(this._visible){this.setupPopup()}this.raisePropertyChanged("x")}},get_y:function(){return this._y},set_y:function(A){if(A!=this._y){this._y=A;if(this._visible){this.setupPopup()}this.raisePropertyChanged("y")}},get_visible:function(){return this._visible},add_showing:function(A){this.get_events().addHandler("showing",A)},remove_showing:function(A){this.get_events().removeHandler("showing",A)},raiseShowing:function(A){var B=this.get_events().getHandler("showing");if(B){B(this,A)}},add_shown:function(A){this.get_events().addHandler("shown",A)},remove_shown:function(A){this.get_events().removeHandler("shown",A)},raiseShown:function(A){var B=this.get_events().getHandler("shown");if(B){B(this,A)}},add_hiding:function(A){this.get_events().addHandler("hiding",A)},remove_hiding:function(A){this.get_events().removeHandler("hiding",A)},raiseHiding:function(A){var B=this.get_events().getHandler("hiding");if(B){B(this,A)}},add_hidden:function(A){this.get_events().addHandler("hidden",A)},remove_hidden:function(A){this.get_events().removeHandler("hidden",A)},raiseHidden:function(A){var B=this.get_events().getHandler("hidden");if(B){B(this,A)}}};AjaxControlToolkit.PopupBehavior.registerClass("AjaxControlToolkit.PopupBehavior",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.PositioningMode=function(){throw Error.invalidOperation()};AjaxControlToolkit.PositioningMode.prototype={Absolute:0,Center:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5};AjaxControlToolkit.PositioningMode.registerEnum("AjaxControlToolkit.PositioningMode");if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.AutoCompleteBehavior=function(A){AjaxControlToolkit.AutoCompleteBehavior.initializeBase(this,[A]);this._servicePath=null;this._serviceMethod=null;this._contextKey=null;this._useContextKey=false;this._minimumPrefixLength=3;this._completionSetCount=10;this._completionInterval=1000;this._completionListElementID=null;this._completionListElement=null;this._textColor="windowtext";this._textBackground="window";this._popupBehavior=null;this._popupBehaviorHiddenHandler=null;this._onShowJson=null;this._onHideJson=null;this._timer=null;this._cache=null;this._currentPrefix=null;this._selectIndex=-1;this._focusHandler=null;this._blurHandler=null;this._bodyClickHandler=null;this._completionListBlurHandler=null;this._keyDownHandler=null;this._mouseDownHandler=null;this._mouseUpHandler=null;this._mouseOverHandler=null;this._tickHandler=null;this._enableCaching=true;this._flyoutHasFocus=false;this._textBoxHasFocus=false;this._completionListCssClass=null;this._completionListItemCssClass=null;this._highlightedItemCssClass=null;this._delimiterCharacters=null;this._firstRowSelected=false};AjaxControlToolkit.AutoCompleteBehavior.prototype={initialize:function(){AjaxControlToolkit.AutoCompleteBehavior.callBaseMethod(this,"initialize");$common.prepareHiddenElementForATDeviceUpdate();this._popupBehaviorHiddenHandler=Function.createDelegate(this,this._popupHidden);this._tickHandler=Function.createDelegate(this,this._onTimerTick);this._focusHandler=Function.createDelegate(this,this._onGotFocus);this._blurHandler=Function.createDelegate(this,this._onLostFocus);this._keyDownHandler=Function.createDelegate(this,this._onKeyDown);this._mouseDownHandler=Function.createDelegate(this,this._onListMouseDown);this._mouseUpHandler=Function.createDelegate(this,this._onListMouseUp);this._mouseOverHandler=Function.createDelegate(this,this._onListMouseOver);this._completionListBlurHandler=Function.createDelegate(this,this._onCompletionListBlur);this._bodyClickHandler=Function.createDelegate(this,this._onCompletionListBlur);this._timer=new Sys.Timer();this.initializeTimer(this._timer);var A=this.get_element();this.initializeTextBox(A);if(this._completionListElementID!==null){this._completionListElement=$get(this._completionListElementID)}if(this._completionListElement==null){this._completionListElement=document.createElement("ul");this._completionListElement.id=this.get_id()+"_completionListElem";if(Sys.Browser.agent===Sys.Browser.Safari){document.body.appendChild(this._completionListElement)}else{A.parentNode.insertBefore(this._completionListElement,A.nextSibling)}}this.initializeCompletionList(this._completionListElement);this._popupBehavior=$create(AjaxControlToolkit.PopupBehavior,{"id":this.get_id()+"PopupBehavior","parentElement":A,"positioningMode":AjaxControlToolkit.PositioningMode.BottomLeft},null,null,this._completionListElement);this._popupBehavior.add_hidden(this._popupBehaviorHiddenHandler);if(this._onShowJson){this._popupBehavior.set_onShow(this._onShowJson)}if(this._onHideJson){this._popupBehavior.set_onHide(this._onHideJson)}},dispose:function(){this._onShowJson=null;this._onHideJson=null;if(this._popupBehavior){if(this._popupBehaviorHiddenHandler){this._popupBehavior.remove_hidden(this._popupBehaviorHiddenHandler)}this._popupBehavior.dispose();this._popupBehavior=null}if(this._timer){this._timer.dispose();this._timer=null}var A=this.get_element();if(A){$removeHandler(A,"focus",this._focusHandler);$removeHandler(A,"blur",this._blurHandler);$removeHandler(A,"keydown",this._keyDownHandler);$removeHandler(this._completionListElement,"blur",this._completionListBlurHandler);$removeHandler(this._completionListElement,"mousedown",this._mouseDownHandler);$removeHandler(this._completionListElement,"mouseup",this._mouseUpHandler);$removeHandler(this._completionListElement,"mouseover",this._mouseOverHandler)}if(this._bodyClickHandler){$removeHandler(document.body,"click",this._bodyClickHandler);this._bodyClickHandler=null}this._popupBehaviorHiddenHandler=null;this._tickHandler=null;this._focusHandler=null;this._blurHandler=null;this._keyDownHandler=null;this._completionListBlurHandler=null;this._mouseDownHandler=null;this._mouseUpHandler=null;this._mouseOverHandler=null;AjaxControlToolkit.AutoCompleteBehavior.callBaseMethod(this,"dispose")},initializeTimer:function(A){A.set_interval(this._completionInterval);A.add_tick(this._tickHandler)},initializeTextBox:function(A){A.autocomplete="off";$addHandler(A,"focus",this._focusHandler);$addHandler(A,"blur",this._blurHandler);$addHandler(A,"keydown",this._keyDownHandler)},initializeCompletionList:function(A){if(this._completionListCssClass){Sys.UI.DomElement.addCssClass(A,this._completionListCssClass)}else{var B=A.style;B.textAlign="left";B.visibility="hidden";B.cursor="default";B.listStyle="none";B.padding="0px";B.margin="0px! important";if(Sys.Browser.agent===Sys.Browser.Safari){B.border="solid 1px gray";B.backgroundColor="white";B.color="black"}else{B.border="solid 1px buttonshadow";B.backgroundColor=this._textBackground;B.color=this._textColor}}$addHandler(A,"mousedown",this._mouseDownHandler);$addHandler(A,"mouseup",this._mouseUpHandler);$addHandler(A,"mouseover",this._mouseOverHandler);$addHandler(A,"blur",this._completionListBlurHandler);$addHandler(document.body,"click",this._bodyClickHandler)},_currentCompletionWord:function(){var A=this.get_element();var E=A.value;var C=E;if(this.get_isMultiWord()){var D=this._getCurrentWordStartIndex();var B=this._getCurrentWordEndIndex(D);if(B<=D){C=E.substring(D)}else{C=E.substring(D,B)}}return C},_getCursorIndex:function(){return this.get_element().selectionStart},_getCurrentWordStartIndex:function(){var D=this.get_element();var E=D.value.substring(0,this._getCursorIndex());var A=0;var F=-1;for(var C=0;C<this._delimiterCharacters.length;++C){var B=E.lastIndexOf(this._delimiterCharacters.charAt(C));if(B>F){F=B}}A=F;if(A>=this._getCursorIndex()){A=0}return A<0?0:A+1},_getCurrentWordEndIndex:function(A){var E=this.get_element();var F=E.value.substring(A);var B=0;for(var D=0;D<this._delimiterCharacters.length;++D){var C=F.indexOf(this._delimiterCharacters.charAt(D));if(C>0&&(C<B||B==0)){B=C}}return B<=0?E.value.length:B+A},get_isMultiWord:function(){return(this._delimiterCharacters!=null)&&(this._delimiterCharacters!="")},_getTextWithInsertedWord:function(E){var H=E;var I=0;var B=this.get_element();var A=B.value;if(this.get_isMultiWord()){var F=this._getCurrentWordStartIndex();var C=this._getCurrentWordEndIndex(F);var D="";var G="";if(F>0){D=A.substring(0,F)}if(C>F){G=A.substring(C)}H=D+E+G}return H},_hideCompletionList:function(){var A=new Sys.CancelEventArgs();this.raiseHiding(A);if(A.get_cancel()){return }this.hidePopup()},showPopup:function(){this._popupBehavior.show();this.raiseShown(Sys.EventArgs.Empty)},hidePopup:function(){if(this._popupBehavior){this._popupBehavior.hide()}else{this._popupHidden()}},_popupHidden:function(){this._completionListElement.innerHTML="";this._selectIndex=-1;this._flyoutHasFocus=false;this.raiseHidden(Sys.EventArgs.Empty)},_highlightItem:function(C){var B=this._completionListElement.childNodes;for(var A=0;A<B.length;A++){var D=B[A];if(D._highlighted){if(this._completionListItemCssClass){Sys.UI.DomElement.removeCssClass(D,this._highlightedItemCssClass);Sys.UI.DomElement.addCssClass(D,this._completionListItemCssClass)}else{if(Sys.Browser.agent===Sys.Browser.Safari){D.style.backgroundColor="white";D.style.color="black"}else{D.style.backgroundColor=this._textBackground;D.style.color=this._textColor}}this.raiseItemOut(new AjaxControlToolkit.AutoCompleteItemEventArgs(D,D.firstChild.nodeValue,D._value))}}if(this._highlightedItemCssClass){Sys.UI.DomElement.removeCssClass(C,this._completionListItemCssClass);Sys.UI.DomElement.addCssClass(C,this._highlightedItemCssClass)}else{if(Sys.Browser.agent===Sys.Browser.Safari){C.style.backgroundColor="lemonchiffon"}else{C.style.backgroundColor="highlight";C.style.color="highlighttext"}}C._highlighted=true;this.raiseItemOver(new AjaxControlToolkit.AutoCompleteItemEventArgs(C,C.firstChild.nodeValue,C._value))},_onCompletionListBlur:function(A){this._hideCompletionList()},_onListMouseDown:function(A){if(A.target!==this._completionListElement){this._setText(A.target);this._flyoutHasFocus=false}else{this._flyoutHasFocus=true}},_onListMouseUp:function(A){this.get_element().focus()},_onListMouseOver:function(D){var C=D.target;if(C!==this._completionListElement){var B=this._completionListElement.childNodes;for(var A=0;A<B.length;++A){if(C===B[A]){this._highlightItem(C);this._selectIndex=A;break}}}},_onGotFocus:function(A){this._textBoxHasFocus=true;if(this._flyoutHasFocus){this._hideCompletionList()}this._timer.set_enabled(true)},_onKeyDown:function(B){var A=B.keyCode?B.keyCode:B.rawEvent.keyCode;if(A===Sys.UI.Key.esc){this._hideCompletionList();B.preventDefault()}else{if(A===Sys.UI.Key.up){if(this._selectIndex>0){this._selectIndex--;this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex);this._highlightItem(this._completionListElement.childNodes[this._selectIndex]);B.stopPropagation();B.preventDefault()}}else{if(A===Sys.UI.Key.down){if(this._selectIndex<(this._completionListElement.childNodes.length-1)){this._selectIndex++;this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex);this._highlightItem(this._completionListElement.childNodes[this._selectIndex]);B.stopPropagation();B.preventDefault()}}else{if(A===Sys.UI.Key.enter){if(this._selectIndex!==-1){this._setText(this._completionListElement.childNodes[this._selectIndex]);B.preventDefault()}else{this.hidePopup()}}else{if(A===Sys.UI.Key.tab){if(this._selectIndex!==-1){this._setText(this._completionListElement.childNodes[this._selectIndex])}}else{this._timer.set_enabled(true)}}}}}},_handleScroll:function(D,B){var A=this._completionListElement;var E=$common.getBounds(D);var C=this._completionListElement.childNodes.length;if(((E.height*B)-(A.clientHeight+A.scrollTop))>=0){A.scrollTop+=(((E.height*B)-(A.clientHeight+A.scrollTop))+E.height)}if(((E.height*(C-(B+1)))-(A.scrollHeight-A.scrollTop))>=0){A.scrollTop-=(((E.height*(C-(B+1)))-(A.scrollHeight-A.scrollTop))+E.height)}if(A.scrollTop%E.height!==0){if(((E.height*(B+1))-(A.clientHeight+A.scrollTop))>=0){A.scrollTop-=(A.scrollTop%E.height)}else{A.scrollTop+=(E.height-(A.scrollTop%E.height))}}},_handleFlyoutFocus:function(){if(!this._textBoxHasFocus){if(!this._flyoutHasFocus){this._hideCompletionList()}else{}}},_onLostFocus:function(){this._textBoxHasFocus=false;this._timer.set_enabled(false);window.setTimeout(Function.createDelegate(this,this._handleFlyoutFocus),500)},_onMethodComplete:function(A,B){this._update(B,A,true)},_onMethodFailed:function(C,A,B){},_onTimerTick:function(B,A){if(this._servicePath&&this._serviceMethod){var D=this._currentCompletionWord();if(D.trim().length<this._minimumPrefixLength){this._currentPrefix=null;this._update("",null,false);return }if((this._currentPrefix!==D)||((D=="")&&(this._minimumPrefixLength==0))){this._currentPrefix=D;if((D!="")&&this._cache&&this._cache[D]){this._update(D,this._cache[D],false);return }var A=new Sys.CancelEventArgs();this.raisePopulating(A);if(A.get_cancel()){return }var C={prefixText:this._currentPrefix,count:this._completionSetCount};if(this._useContextKey){C.contextKey=this._contextKey}Sys.Net.WebServiceProxy.invoke(this.get_servicePath(),this.get_serviceMethod(),false,C,Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodFailed),D);$common.updateFormToRefreshATDeviceBuffer()}}},_setText:function(B){var D=(B&&B.firstChild)?B.firstChild.nodeValue:null;this._timer.set_enabled(false);var A=this.get_element();var C=A.control;if(C&&C.set_text){C.set_text(D);$common.tryFireEvent(C,"change")}else{A.value=D;$common.tryFireEvent(A,"change")}this.raiseItemSelected(new AjaxControlToolkit.AutoCompleteItemEventArgs(B,D,B?B._value:null));this._currentPrefix=this._currentCompletionWord();this._hideCompletionList()},_update:function(F,I,K){if(K&&this.get_enableCaching()){if(!this._cache){this._cache={}}this._cache[F]=I}if((!this._textBoxHasFocus)||(F!=this._currentCompletionWord())){this._hideCompletionList();return }if(I&&I.length){this._completionListElement.innerHTML="";this._selectIndex=-1;var M=null;var L=null;var J=null;for(var E=0;E<I.length;E++){var C=null;if(this._completionListElementID){C=document.createElement("div")}else{C=document.createElement("li")}if(M==null){M=C}try{var D=Sys.Serialization.JavaScriptSerializer.deserialize("("+I[E]+")");if(String.isInstanceOfType(D)){L=D;J=D}else{L=D?D.First:null;J=D?D.Second:null}}catch(G){L=I[E];J=I[E]}C.appendChild(document.createTextNode(this._getTextWithInsertedWord(L)));C._value=J;C.__item="";if(this._completionListItemCssClass){Sys.UI.DomElement.addCssClass(C,this._completionListItemCssClass)}else{var B=C.style;B.padding="0px";B.textAlign="left";B.textOverflow="ellipsis";if(Sys.Browser.agent===Sys.Browser.Safari){B.backgroundColor="white";B.color="black"}else{B.backgroundColor=this._textBackground;B.color=this._textColor}}this._completionListElement.appendChild(C)}var H=$common.getBounds(this.get_element());this._completionListElement.style.width=Math.max(1,H.width-2)+"px";this._completionListElement.scrollTop=0;this.raisePopulated(Sys.EventArgs.Empty);var A=new Sys.CancelEventArgs();this.raiseShowing(A);if(!A.get_cancel()){this.showPopup();if(this._firstRowSelected&&(M!=null)){this._highlightItem(M);this._selectIndex=0}}}else{this._hideCompletionList()}},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(A){if(this._popupBehavior){this._popupBehavior.set_onShow(A)}else{this._onShowJson=A}this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){if(this._popupBehavior){this._popupBehavior.onShow()}},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(A){if(this._popupBehavior){this._popupBehavior.set_onHide(A)}else{this._onHideJson=A}this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){if(this._popupBehavior){this._popupBehavior.onHide()}},get_completionInterval:function(){return this._completionInterval},set_completionInterval:function(A){if(this._completionInterval!=A){this._completionInterval=A;this.raisePropertyChanged("completionInterval")}},get_completionList:function(){return this._completionListElement},set_completionList:function(A){if(this._completionListElement!=A){this._completionListElement=A;this.raisePropertyChanged("completionList")}},get_completionSetCount:function(){return this._completionSetCount},set_completionSetCount:function(A){if(this._completionSetCount!=A){this._completionSetCount=A;this.raisePropertyChanged("completionSetCount")}},get_minimumPrefixLength:function(){return this._minimumPrefixLength},set_minimumPrefixLength:function(A){if(this._minimumPrefixLength!=A){this._minimumPrefixLength=A;this.raisePropertyChanged("minimumPrefixLength")}},get_serviceMethod:function(){return this._serviceMethod},set_serviceMethod:function(A){if(this._serviceMethod!=A){this._serviceMethod=A;this.raisePropertyChanged("serviceMethod")}},get_servicePath:function(){return this._servicePath},set_servicePath:function(A){if(this._servicePath!=A){this._servicePath=A;this.raisePropertyChanged("servicePath")}},get_contextKey:function(){return this._contextKey},set_contextKey:function(A){if(this._contextKey!=A){this._contextKey=A;this.set_useContextKey(true);this.raisePropertyChanged("contextKey")}},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(A){if(this._useContextKey!=A){this._useContextKey=A;this.raisePropertyChanged("useContextKey")}},get_enableCaching:function(){return this._enableCaching},set_enableCaching:function(A){if(this._enableCaching!=A){this._enableCaching=A;this.raisePropertyChanged("enableCaching")}},get_completionListElementID:function(){return this._completionListElementID},set_completionListElementID:function(A){if(this._completionListElementID!=A){this._completionListElementID=A;this.raisePropertyChanged("completionListElementID")}},get_completionListCssClass:function(){return this._completionListCssClass},set_completionListCssClass:function(A){if(this._completionListCssClass!=A){this._completionListCssClass=A;this.raisePropertyChanged("completionListCssClass")}},get_completionListItemCssClass:function(){return this._completionListItemCssClass},set_completionListItemCssClass:function(A){if(this._completionListItemCssClass!=A){this._completionListItemCssClass=A;this.raisePropertyChanged("completionListItemCssClass")}},get_highlightedItemCssClass:function(){return this._highlightedItemCssClass},set_highlightedItemCssClass:function(A){if(this._highlightedItemCssClass!=A){this._highlightedItemCssClass=A;this.raisePropertyChanged("highlightedItemCssClass")}},get_delimiterCharacters:function(){return this._delimiterCharacters},set_delimiterCharacters:function(A){if(this._delimiterCharacters!=A){this._delimiterCharacters=A;this.raisePropertyChanged("delimiterCharacters")}},get_firstRowSelected:function(){return this._firstRowSelected},set_firstRowSelected:function(A){if(this._firstRowSelected!=A){this._firstRowSelected=A;this.raisePropertyChanged("firstRowSelected")}},add_populating:function(A){this.get_events().addHandler("populating",A)},remove_populating:function(A){this.get_events().removeHandler("populating",A)},raisePopulating:function(A){var B=this.get_events().getHandler("populating");if(B){B(this,A)}},add_populated:function(A){this.get_events().addHandler("populated",A)},remove_populated:function(A){this.get_events().removeHandler("populated",A)},raisePopulated:function(A){var B=this.get_events().getHandler("populated");if(B){B(this,A)}},add_showing:function(A){this.get_events().addHandler("showing",A)},remove_showing:function(A){this.get_events().removeHandler("showing",A)},raiseShowing:function(A){var B=this.get_events().getHandler("showing");if(B){B(this,A)}},add_shown:function(A){this.get_events().addHandler("shown",A)},remove_shown:function(A){this.get_events().removeHandler("shown",A)},raiseShown:function(A){var B=this.get_events().getHandler("shown");if(B){B(this,A)}},add_hiding:function(A){this.get_events().addHandler("hiding",A)},remove_hiding:function(A){this.get_events().removeHandler("hiding",A)},raiseHiding:function(A){var B=this.get_events().getHandler("hiding");if(B){B(this,A)}},add_hidden:function(A){this.get_events().addHandler("hidden",A)},remove_hidden:function(A){this.get_events().removeHandler("hidden",A)},raiseHidden:function(A){var B=this.get_events().getHandler("hidden");if(B){B(this,A)}},add_itemSelected:function(A){this.get_events().addHandler("itemSelected",A)},remove_itemSelected:function(A){this.get_events().removeHandler("itemSelected",A)},raiseItemSelected:function(A){var B=this.get_events().getHandler("itemSelected");if(B){B(this,A)}},add_itemOver:function(A){this.get_events().addHandler("itemOver",A)},remove_itemOver:function(A){this.get_events().removeHandler("itemOver",A)},raiseItemOver:function(A){var B=this.get_events().getHandler("itemOver");if(B){B(this,A)}},add_itemOut:function(A){this.get_events().addHandler("itemOut",A)},remove_itemOut:function(A){this.get_events().removeHandler("itemOut",A)},raiseItemOut:function(A){var B=this.get_events().getHandler("itemOut");if(B){B(this,A)}}};AjaxControlToolkit.AutoCompleteBehavior.registerClass("AjaxControlToolkit.AutoCompleteBehavior",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.AutoCompleteBehavior.descriptor={properties:[{name:"completionInterval",type:Number},{name:"completionList",isDomElement:true},{name:"completionListElementID",type:String},{name:"completionSetCount",type:Number},{name:"minimumPrefixLength",type:Number},{name:"serviceMethod",type:String},{name:"servicePath",type:String},{name:"enableCaching",type:Boolean}]};AjaxControlToolkit.AutoCompleteItemEventArgs=function(A,C,B){AjaxControlToolkit.AutoCompleteItemEventArgs.initializeBase(this);this._item=A;this._text=C;this._value=(B!==undefined)?B:null};AjaxControlToolkit.AutoCompleteItemEventArgs.prototype={get_item:function(){return this._item},set_item:function(A){this._item=A},get_text:function(){return this._text},set_text:function(A){this._text=A},get_value:function(){return this._value},set_value:function(A){this._value=A}};AjaxControlToolkit.AutoCompleteItemEventArgs.registerClass("AjaxControlToolkit.AutoCompleteItemEventArgs",Sys.EventArgs);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("MD.TotalMerrill.MarketDataWidgets");MD.TotalMerrill.MarketDataWidgets.ACSecurityType=function(){throw Error.invalidOperation()};MD.TotalMerrill.MarketDataWidgets.ACSecurityType.prototype={All:0,Equity:1,Option:2,MutualFund:3};MD.TotalMerrill.MarketDataWidgets.ACSecurityType.registerEnum("MD.TotalMerrill.MarketDataWidgets.ACSecurityType");MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender=function(A){MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.initializeBase(this,[A]);this._headerRowCssClass=null;this._delimiterCharacters=null;this._completionListItemFirstColumnCssClass=null;this._completionListItemSecondColumnCssClass=null;this._completionListItemFooterCssClass=null;this._keyUpHandler=null;this._hasSearchResult=null;this._noMatchFound=null;this._noMatchFoundDtl=null;this._matchsFound=null;this._closeLinkText=null;this._filterBySecurityType=null;this._enableBehavior=null;this._showAllMatchesFoundLink=null;this._showAllMatchesFoundLinkClickHandler=null;this._completionListItemCssClass=null;this._firstRowSelected=null;this._completionListItemCssClass=null;this._highlightedItemCssClass=null;this._useContextKey=null};MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.prototype={initialize:function(){MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.callBaseMethod(this,"initialize");this._keyUpHandler=Function.createDelegate(this,this._onKeyUp);var A=this.get_element();$addHandler(A,"keyup",this._keyUpHandler);this.set_delimiterCharacters("");if(this._isNullOrEmpty(this.get_noMatchFound())){this.set_noMatchFound("No Results Found")}if(this._isNullOrEmpty(this.get_noMatchFoundDtl())){this.set_noMatchFoundDtl("There are no securities that match your search parameters. Please try again.")}if(this._isNullOrEmpty(this.get_matchsFound())){this.set_matchsFound("{0:###,###,##0} Match{1} Found")}if(this._isNullOrEmpty(this.get_closeLinkText())){this.set_closeLinkText("Close")}if(this._completionListElement){this._completionListElement.style.display="none"}if(typeof (this._enableBehavior)=="undefined"||this._enableBehavior==null){this.set_enableBehavior(true)}if(typeof (this._filterBySecurityType)==="undefined"||this._filterBySecurityType===null){this._filterBySecurityType=MD.TotalMerrill.MarketDataWidgets.ACSecurityType.All}},dispose:function(){var A=this.get_element();if(this._keyUpHandler){$removeHandler(A,"keyup",this._keyUpHandler);this._keyUpHandler=null}if(typeof (GEHoverUtility)!=="undefined"&&GEHoverUtility!=null&&GEHoverUtility.HideQuote){GEHoverUtility.HideQuote()}MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.callBaseMethod(this,"dispose")},_isNullOrEmpty:function(A){if(typeof (A)==="undefined"||A===null){return true}else{return(A.toString().trim()==="")}},get_delimiterCharacters:function(){return this._delimiterCharacters},set_delimiterCharacters:function(A){if(this._delimiterCharacters!=A){this._delimiterCharacters=A;this.raisePropertyChanged("delimiterCharacters")}},get_filterBySecurityType:function(){return this._filterBySecurityType},set_filterBySecurityType:function(A){if(this._filterBySecurityType!=A){this._filterBySecurityType=A;this.raisePropertyChanged("filterBySecurityType")}},get_enableBehavior:function(){return this._enableBehavior},set_enableBehavior:function(A){if(this._enableBehavior!=A){this._enableBehavior=A;this.raisePropertyChanged("enableBehavior");if(this._initialized){this._timer.set_enabled(this._enableBehavior);if(this._enableBehavior===false){this._hideCompletionList()}}}},get_showAllMatchesFoundLink:function(){return this._enableBehavior},set_showAllMatchesFoundLink:function(A){if(this._showAllMatchesFoundLink!=A){this._showAllMatchesFoundLink=A;this.raisePropertyChanged("showAllMatchesFoundLink")}},add_allMatchesFoundLinkClick:function(A){this.get_events().addHandler("allMatchesFoundLinkClick",A)},remove_allMatchesFoundLinkClick:function(A){this.get_events().removeHandler("allMatchesFoundLinkClick",A)},raiseAllMatchesFoundLinkClick:function(A){var B=this.get_events().getHandler("allMatchesFoundLinkClick");if(B){B(this,A)}},get_showHoverOnItemSelect:function(){return this._showHoverOnItemSelect},set_showHoverOnItemSelect:function(A){if(this._showHoverOnItemSelect!=A){this._showHoverOnItemSelect=A;this.raisePropertyChanged("showHoverOnItemSelect")}},get_headerRowCssClass:function(){return this._headerRowCssClass},set_headerRowCssClass:function(A){if(this._headerRowCssClass!=A){this._headerRowCssClass=A;this.raisePropertyChanged("headerRowCssClass")}},get_completionListItemFirstColumnCssClass:function(){return this._completionListItemFirstColumnCssClass},set_completionListItemFirstColumnCssClass:function(A){if(this._completionListItemFirstColumnCssClass!=A){this._completionListItemFirstColumnCssClass=A;this.raisePropertyChanged("completionListItemFirstColumnCssClass")}},get_completionListItemSecondColumnCssClass:function(){return this._completionListItemSecondColumnCssClass},set_completionListItemSecondColumnCssClass:function(A){if(this._completionListItemSecondColumnCssClass!=A){this._completionListItemSecondColumnCssClass=A;this.raisePropertyChanged("completionListItemSecondColumnCssClass")}},get_completionListItemFooterCssClass:function(){return this._completionListItemFooterCssClass},set_completionListItemFooterCssClass:function(A){if(this._completionListItemFooterCssClass!=A){this._completionListItemFooterCssClass=A;this.raisePropertyChanged("completionListItemFooterCssClass")}},get_noMatchFound:function(){return this._noMatchFound},set_noMatchFound:function(A){if(this._noMatchFound!=A){this._noMatchFound=A;this.raisePropertyChanged("noMatchFound")}},get_noMatchFoundDtl:function(){return this._noMatchFoundDtl},set_noMatchFoundDtl:function(A){if(this._noMatchFoundDtl!=A){this._noMatchFoundDtl=A;this.raisePropertyChanged("noMatchFoundDtl")}},get_matchsFound:function(){return this._matchsFound},set_matchsFound:function(A){if(this._matchsFound!=A){this._matchsFound=A;this.raisePropertyChanged("matchsFound")}},get_closeLinkText:function(){return this._closeLinkText},set_closeLinkText:function(A){if(this._closeLinkText!=A){this._closeLinkText=A;this.raisePropertyChanged("closeLinkText")}},_onTimerTick:function(B,A){Sys.Debug.trace("calling");if(this._enableBehavior===true){this.set_useContextKey(true);this.set_contextKey(this._filterBySecurityType);this._timer.set_enabled(false);if(this._servicePath&&this._serviceMethod){var D=this._currentCompletionWord();if(D.trim().length<this._minimumPrefixLength){this._currentPrefix=null;this._update("",null,false);return }if((this._currentPrefix!==D)||((D=="")&&(this._minimumPrefixLength==0))){this._currentPrefix=D;if((D!="")&&this._cache&&this._cache[D]){this._update(D,this._cache[D],false);return }var C={prefixText:this._currentPrefix,count:this._completionSetCount};if(this._useContextKey){C.contextKey=this._contextKey}if(this._webRequest){this._webRequest.get_executor().abort();this._webRequest=null}this._webRequest=Sys.Net.WebServiceProxy.invoke(this.get_servicePath(),this.get_serviceMethod(),false,{prefixText:this._currentPrefix,count:this._completionSetCount,contextKey:"All"},Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodFailed),D)}}}},get_contextKey:function(){return this._contextKey},set_contextKey:function(A){if(this._contextKey!=A){this._contextKey=A;this.set_useContextKey(true);this.raisePropertyChanged("contextKey")}},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(A){if(this._useContextKey!=A){this._useContextKey=A;this.raisePropertyChanged("useContextKey")}},get_isMultiWord:function(){return(this._delimiterCharacters!=null)&&(this._delimiterCharacters!="")},_currentCompletionWord:function(){var A=this.get_element();var E=A.value;var C=E;if(this.get_isMultiWord()){var D=this._getCurrentWordStartIndex();var B=this._getCurrentWordEndIndex(D);if(B<=D){C=E.substring(D)}else{C=E.substring(D,B)}}return C},_onMethodComplete:function(A,B){var C=this._currentCompletionWord();if(C===B){MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.callBaseMethod(this,"_onMethodComplete",[A,B])}},_onMethodFailed:function(D,B,C){this._webRequest=null;var A=new Array();A.push(this._noMatchFound);this._update(C,A,false)},raiseShowing:function(A){var B=this.get_events().getHandler("showing");if(B){B(this,A)}},add_showing:function(A){this.get_events().addHandler("showing",A)},remove_showing:function(A){this.get_events().removeHandler("showing",A)},showPopup:function(){this._popupBehavior.show()},hidePopup:function(){if(this._popupBehavior){this._popupBehavior.hide()}else{this._popupHidden()}},_update:function(F,I,K){if(K&&this.get_enableCaching()){if(!this._cache){this._cache={}}this._cache[F]=I}if((!this._textBoxHasFocus)||(F!=this._currentCompletionWord())){this._hideCompletionList();return }if(I&&I.length){this._completionListElement.innerHTML="";this._selectIndex=-1;var N=null;var M=null;var J=null;for(var E=0;E<I.length;E++){var C=null;if(this._completionListElementID){C=document.createElement("div")}else{C=document.createElement("li")}if(N==null){N=C}try{var D=Sys.Serialization.JavaScriptSerializer.deserialize("("+I[E]+")");if(D&&D.First){M=D.First;J=D.Second}else{M=D;J=D}}catch(G){M=I[E];J=I[E]}var L=this._showOnlyCurrentWordInCompletionListItem?M:this._getTextWithInsertedWord(M);C.appendChild(document.createTextNode(L));C._value=J;C.__item="";if(this._completionListItemCssClass){Sys.UI.DomElement.addCssClass(C,this._completionListItemCssClass)}else{var B=C.style;B.padding="0px";B.textAlign="left";B.textOverflow="ellipsis";if(Sys.Browser.agent===Sys.Browser.Safari){B.backgroundColor="white";B.color="black"}else{B.backgroundColor=this._textBackground;B.color=this._textColor}}this._completionListElement.appendChild(C)}var H=$common.getBounds(this.get_element());this._completionListElement.style.width=Math.max(1,H.width-2)+"px";this._completionListElement.scrollTop=0;this.raisePopulated(Sys.EventArgs.Empty);var A=new Sys.CancelEventArgs();this.raiseShowing(A);if(!A.get_cancel()){this.showPopup();if(this._firstRowSelected&&(N!=null)){this._highlightItem(N);this._selectIndex=0}}}else{this._hideCompletionList()}if(Sys.Browser.agent===Sys.Browser.InternetExplorer){this._popupBehavior.get_element().style.width="280px"}else{this._popupBehavior.get_element().style.width="280px"}},_hideCompletionList:function(){this.hidePopup()},_getTextWithInsertedWord:function(E){var H=E;var I=0;var B=this.get_element();var A=B.value;if(this.get_isMultiWord()){var F=this._getCurrentWordStartIndex();var C=this._getCurrentWordEndIndex(F);var D="";var G="";if(F>0){D=A.substring(0,F)}if(C>F){G=A.substring(C)}H=D+E+G}return H},get_firstRowSelected:function(){return this._firstRowSelected},set_firstRowSelected:function(A){if(this._firstRowSelected!=A){this._firstRowSelected=A;this.raisePropertyChanged("firstRowSelected")}},get_showOnlyCurrentWordInCompletionListItem:function(){return this._showOnlyCurrentWordInCompletionListItem},set_showOnlyCurrentWordInCompletionListItem:function(A){if(this._showOnlyCurrentWordInCompletionListItem!=A){this._showOnlyCurrentWordInCompletionListItem=A;this.raisePropertyChanged("showOnlyCurrentWordInCompletionListItem")}},add_populated:function(A){this.get_events().addHandler("populated",A)},remove_populated:function(A){this.get_events().removeHandler("populated",A)},raisePopulated:function(A){var B=this.get_events().getHandler("populated");if(B){B(this,A)}},_handleFlyoutFocus:function(){this._webRequest=null;MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.callBaseMethod(this,"_handleFlyoutFocus",[])},_onGotFocus:function(A){this._textBoxHasFocus=true;if(this._flyoutHasFocus){this._hideCompletionList()}if((this._minimumPrefixLength==0)&&(!this.get_element().value)){this._timer.set_enabled(this._enableBehavior)}},_onKeyUp:function(A){if(this._showHoverOnItemSelect===true&&typeof (GEHoverUtility)!=="undefined"&&GEHoverUtility!=null&&GEHoverUtility.HideQuote){GEHoverUtility.HideQuote()}},_onKeyDown:function(D){if(this._enableBehavior===false){return(true)}this._timer.set_enabled(false);var A=D.keyCode?D.keyCode:D.rawEvent.keyCode;var C=188;if(A===Sys.UI.Key.up){if(this._hasSearchResult===false||this._selectIndex<=1){D.stopPropagation();D.preventDefault();return(true)}}else{if(A===Sys.UI.Key.down){if(this._hasSearchResult===false){this._selectIndex=0}else{if(this._selectIndex===-1){this._selectIndex=0}else{if(this._showAllMatchesFoundLink===true&&this._selectIndex>=(this._completionListElement.childNodes.length-2)){this._selectIndex=this._selectIndex-1}}}}else{if(A===Sys.UI.Key.enter){if(this._hasSearchResult===false||this._selectIndex<=0){D.preventDefault();this.raiseItemSelected(new AjaxControlToolkit.AutoCompleteItemEventArgs(null,this.get_element().value,this.get_element().value));this._flyoutHasFocus=false;this._hideCompletionList();return(true)}}else{if(A===C){this._flyoutHasFocus=false;this._hideCompletionList();this._timer.set_enabled(false);return(true)}else{var B=this.get_element();if(!this._isNullOrEmpty(B.value)&&B.value.indexOf(",")>-1){this._timer.set_enabled(false);return(true)}else{this._timer.set_enabled(this._enableBehavior)}}}}}this._timer.set_enabled(false);var A=D.keyCode?D.keyCode:D.rawEvent.keyCode;if(A===Sys.UI.Key.esc){this._hideCompletionList();D.preventDefault()}else{if(A===Sys.UI.Key.up){if(this._selectIndex>0){this._selectIndex--;this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex);this._highlightItem(this._completionListElement.childNodes[this._selectIndex]);D.stopPropagation();D.preventDefault()}}else{if(A===Sys.UI.Key.down){if(this._selectIndex<(this._completionListElement.childNodes.length-1)){this._selectIndex++;this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex);this._highlightItem(this._completionListElement.childNodes[this._selectIndex]);D.stopPropagation();D.preventDefault()}}else{if(A===Sys.UI.Key.enter){if(this._selectIndex!==-1){this._setText(this._completionListElement.childNodes[this._selectIndex]);D.preventDefault()}else{this.hidePopup()}}else{if(A===Sys.UI.Key.tab){if(this._selectIndex!==-1){this._setText(this._completionListElement.childNodes[this._selectIndex])}}else{this._timer.set_enabled(true)}}}}}},_handleScroll:function(D,B){var A=this._completionListElement;var E=$common.getBounds(D);var C=this._completionListElement.childNodes.length;if(((E.height*B)-(A.clientHeight+A.scrollTop))>=0){A.scrollTop+=(((E.height*B)-(A.clientHeight+A.scrollTop))+E.height)}if(((E.height*(C-(B+1)))-(A.scrollHeight-A.scrollTop))>=0){A.scrollTop-=(((E.height*(C-(B+1)))-(A.scrollHeight-A.scrollTop))+E.height)}if(A.scrollTop%E.height!==0){if(((E.height*(B+1))-(A.clientHeight+A.scrollTop))>=0){A.scrollTop-=(A.scrollTop%E.height)}else{A.scrollTop+=(E.height-(A.scrollTop%E.height))}}},add_itemSelected:function(A){this.get_events().addHandler("itemSelected",A)},remove_itemSelected:function(A){this.get_events().removeHandler("itemSelected",A)},raiseItemSelected:function(A){if(this._showHoverOnItemSelect===true){this._showSymbolHover(A)}var B=this.get_events().getHandler("itemSelected");if(B){B(this,A)}},_showSymbolHover:function(A,D){var B=this.get_element();if(!this._isNullOrEmpty(B.value)&&typeof (GEHoverUtility)!=="undefined"&&GEHoverUtility!=null&&GEHoverUtility.ShowQuote){var C=(D)?D:window.event;GEHoverUtility.ShowQuote(C,B,13,B.value,"",true)}},_setText:function(C){if(this._isHeaderFooterOrMessageListItem(C)===true){return }var B=this.get_completionList().childNodes;var F=C?C._text:null;this._timer.set_enabled(false);var A=this.get_element();var E=A.control;var D=C?C._value:null;if(D==null){D=B[this._selectIndex]._value}if(E&&E.set_text){E.set_text(D)}else{A.value=D}$common.tryFireEvent(A,"change");this.raiseItemSelected(new AjaxControlToolkit.AutoCompleteItemEventArgs(C,F,D));this._currentPrefix=this._currentCompletionWord();this._hideCompletionList()},_highlightItem:function(C){var B=this._completionListElement.childNodes;if(this._hasSearchResult===false){return }for(var A=0;A<B.length;A++){var D=B[A];if(D._highlighted){if(this._completionListItemCssClass){Sys.UI.DomElement.removeCssClass(D,this._highlightedItemCssClass);Sys.UI.DomElement.addCssClass(D,this._completionListItemCssClass)}else{if(Sys.Browser.agent===Sys.Browser.Safari){D.style.backgroundColor="white";D.style.color="black"}else{D.style.backgroundColor=this._textBackground;D.style.color=this._textColor}}}}if(this._highlightedItemCssClass){Sys.UI.DomElement.removeCssClass(C,this._completionListItemCssClass);Sys.UI.DomElement.addCssClass(C,this._highlightedItemCssClass)}else{if(Sys.Browser.agent===Sys.Browser.Safari){C.style.backgroundColor="lemonchiffon"}else{C.style.backgroundColor="highlight";C.style.color="highlighttext"}}C._highlighted=true},get_completionListItemCssClass:function(){return this._completionListItemCssClass},set_completionListItemCssClass:function(A){if(this._completionListItemCssClass!=A){this._completionListItemCssClass=A;this.raisePropertyChanged("completionListItemCssClass")}},get_highlightedItemCssClass:function(){return this._highlightedItemCssClass},set_highlightedItemCssClass:function(A){if(this._highlightedItemCssClass!=A){this._highlightedItemCssClass=A;this.raisePropertyChanged("highlightedItemCssClass")}},raisePopulated:function(A){var D=this.get_completionList();var F,I=true;if(D.childNodes&&D.childNodes.length>0){I=false;F=this._createSubItemHeader(D.childNodes[0]._value,this._headerRowCssClass)}else{F=this._createSubItemHeader("",this._headerRowCssClass)}D.insertBefore(F,D.firstChild);if(I==false){D.removeChild(D.childNodes[1])}var C=D.childNodes.length;if(D.childNodes.length===1){this._hasSearchResult=false;var G=this._createSubItemMessage(this._noMatchFoundDtl,this._completionListItemCssClass);D.appendChild(G)}else{this._hasSearchResult=true;for(var E=1;E<C;E++){var J=D.childNodes[E];if(J&&J._value){var B=J._value.split("|");J._value=B[0];J._text=B[1];J.innerHTML="";this._createSubItem(J,B[0],B[1])}}if(this._showAllMatchesFoundLink===true){var H=this._createShowAllMatchesFoundLink();D.appendChild(H,D.lastChild)}}},_createSubItemMessage:function(C,A){var F=document.createElement("li"),B=document.createElement("ul"),D=document.createElement("li"),E=this._currentCompletionWord().toUpperCase();F._value="";D.className="floatLeft";D.innerHTML=C;B.appendChild(D);F.appendChild(B);if(A){F.className=A}return F},_getCurrentWordStartIndex:function(){var D=this.get_element();var E=D.value.substring(0,this._getCursorIndex());var A=0;var F=-1;for(var C=0;C<this._delimiterCharacters.length;++C){var B=E.lastIndexOf(this._delimiterCharacters.charAt(C));if(B>F){F=B}}A=F;if(A>=this._getCursorIndex()){A=0}return A<0?0:A+1},_getCurrentWordEndIndex:function(A){var E=this.get_element();var F=E.value.substring(A);var B=0;for(var D=0;D<this._delimiterCharacters.length;++D){var C=F.indexOf(this._delimiterCharacters.charAt(D));if(C>0&&(C<B||B==0)){B=C}}return B<=0?E.value.length:B+A},_createSubItemHeader:function(G,C){var E=document.createElement("li");E._value="";var F=document.createElement("ul");var B=document.createElement("li");B.className="floatLeft";B.innerHTML=G;var A=document.createElement("li");A.className="floatRight";var D=document.createElement("a");D.setAttribute("isCloseLink","true");D.href="javascript:void(0);";D.innerHTML=this._closeLinkText;A.appendChild(D);F.appendChild(B);F.appendChild(A);E.appendChild(F);if(C){E.className=C}return E},_createSubItem:function(G,B,A){var D=document.createElement("ul"),E=document.createElement("li"),C=document.createElement("li"),F=this._currentCompletionWord().toUpperCase();if(B.indexOf(F)>-1){B=B.replace(F,"<strong>"+F+"</strong>")}else{A=A.replace(F,"<strong>"+F+"</strong>")}E.className=this._completionListItemFirstColumnCssClass;E.innerHTML=B;C.className=this._completionListItemSecondColumnCssClass;C.innerHTML=A;D.appendChild(E);D.appendChild(C);G.appendChild(D)},_createShowAllMatchesFoundLink:function(){var B=document.createElement("li");B._value="";var A=document.createElement("a");A.setAttribute("isShowAllMatchesFoundLink","true");A.href="javascript:void(0);";this._showAllMatchesFoundLinkClickHandler=Function.createDelegate(this,this._showAllMatchesFoundLinkClick);$addHandler(A,"click",this._showAllMatchesFoundLinkClickHandler);A.innerHTML="Show All Matches Found";Sys.UI.DomElement.addCssClass(B,this._completionListItemFooterCssClass);B.appendChild(A);return B},_showAllMatchesFoundLinkClick:function(){this.raiseAllMatchesFoundLinkClick(new MD.TotalMerrill.MarketDataWidgets.AllMatchesFoundLinkEventArgs(this._currentCompletionWord()))},_onListMouseDown:function(B){var A=this._getListItem(B.target);if(A!==this._completionListElement&&this._isHeaderFooterOrMessageListItem(A)!==true){this._setText(A);this._flyoutHasFocus=false}else{if(B.target.getAttribute("isCloseLink")=="true"||B.target.getAttribute("isShowAllMatchesFoundLink")=="true"){this._flyoutHasFocus=false}else{this._flyoutHasFocus=true}}},_isHeaderFooterOrMessageListItem:function(B){var C=false;var A=this._completionListElement.childNodes;if(this._hasSearchResult===true){if(B===A[0]){C=true}else{if(this._showAllMatchesFoundLink===true&&A.length>1&&B===A[A.length-1]){C=true}}}else{C=true}return C},_getListItem:function(B){if(typeof (B)==="undefined"||B===null){return null}var A=B;if(A===this._completionListElement){return A}while(true){if(A.nodeName.toLowerCase()==="li"&&A.parentNode===this._completionListElement){break}else{A=A.parentNode}}return A},_onListMouseOver:function(D){var C=this._getListItem(D.target);if(C!==this._completionListElement&&this._isHeaderFooterOrMessageListItem(C)!==true){var B=this._completionListElement.childNodes;for(var A=1;A<B.length;++A){if(C===B[A]){this._highlightItem(C);this._selectIndex=A;break}}}}};MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender.registerClass("MD.TotalMerrill.MarketDataWidgets.AutoCompleteExtender",AjaxControlToolkit.AutoCompleteBehavior);MD.TotalMerrill.MarketDataWidgets.AllMatchesFoundLinkEventArgs=function(A){MD.TotalMerrill.MarketDataWidgets.AllMatchesFoundLinkEventArgs.initializeBase(this);this._text=A};MD.TotalMerrill.MarketDataWidgets.AllMatchesFoundLinkEventArgs.prototype={get_text:function(){return this._text},set_text:function(A){this._text=A}};MD.TotalMerrill.MarketDataWidgets.AllMatchesFoundLinkEventArgs.registerClass("MD.TotalMerrill.MarketDataWidgets.AllMatchesFoundLinkEventArgs",Sys.EventArgs);AjaxControlToolkit.AutoCompleteItemEventArgs=function(A,C,B){AjaxControlToolkit.AutoCompleteItemEventArgs.initializeBase(this);this._item=A;this._text=C;this._value=(B!==undefined)?B:null};if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.TextBoxWatermarkBehavior=function(A){AjaxControlToolkit.TextBoxWatermarkBehavior.initializeBase(this,[A]);this._watermarkText=null;this._watermarkCssClass=null;this._focusHandler=null;this._blurHandler=null;this._keyPressHandler=null;this._propertyChangedHandler=null;this._watermarkChangedHandler=null;this._oldClassName=null;this._clearedForSubmit=null;this._maxLength=null;if((typeof (WebForm_OnSubmit)=="function")&&!AjaxControlToolkit.TextBoxWatermarkBehavior._originalWebForm_OnSubmit){AjaxControlToolkit.TextBoxWatermarkBehavior._originalWebForm_OnSubmit=WebForm_OnSubmit;WebForm_OnSubmit=AjaxControlToolkit.TextBoxWatermarkBehavior.WebForm_OnSubmit}};AjaxControlToolkit.TextBoxWatermarkBehavior.prototype={initialize:function(){AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"initialize");var D=this.get_element();var C=false;var A=AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"get_ClientState");if(A!=null&&A!=""){C=(A=="Focused");AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"set_ClientState",null)}this._oldClassName=D.className;this._focusHandler=Function.createDelegate(this,this._onFocus);this._blurHandler=Function.createDelegate(this,this._onBlur);this._keyPressHandler=Function.createDelegate(this,this._onKeyPress);$addHandler(D,"focus",this._focusHandler);$addHandler(D,"blur",this._blurHandler);$addHandler(D,"keypress",this._keyPressHandler);this.registerPropertyChanged();var B=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current();var E=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());if((""==B)||(this._watermarkText==B)){E.set_Watermark(this._watermarkText);E.set_IsWatermarked(true)}if(C){this._onFocus()}else{D.blur();this._onBlur()}this._clearedForSubmit=false;this.registerPartialUpdateEvents();this._watermarkChangedHandler=Function.createDelegate(this,this._onWatermarkChanged);E.add_WatermarkChanged(this._watermarkChangedHandler)},dispose:function(){var A=this.get_element();if(this._watermarkChangedHandler){AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).remove_WatermarkChanged(this._watermarkChangedHandler);this._watermarkChangedHandler=null}if(A.control&&this._propertyChangedHandler){A.control.remove_propertyChanged(this._propertyChangedHandler);this._propertyChangedHandler=null}if(this._focusHandler){$removeHandler(A,"focus",this._focusHandler);this._focusHandler=null}if(this._blurHandler){$removeHandler(A,"blur",this._blurHandler);this._blurHandler=null}if(this._keyPressHandler){$removeHandler(A,"keypress",this._keyPressHandler);this._keyPressHandler=null}if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this.clearText(false)}AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"dispose")},_onWatermarkChanged:function(B,A){if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this._onBlur()}else{this._onFocus()}},clearText:function(A){var B=this.get_element();var C=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(B);C.set_Value("");C.set_IsWatermarked(false);if(A){B.setAttribute("autocomplete","off");B.select()}},_onFocus:function(A){var B=this.get_element();if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(B).get_IsWatermarked()){this.clearText(A?true:false)}B.className=this._oldClassName;if(this._maxLength>0){this.get_element().maxLength=this._maxLength;this._maxLength=null}},_onBlur:function(){var A=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());if((""==A.get_Current())||A.get_IsWatermarked()){if(this.get_element().maxLength>0&&this._watermarkText.length>this.get_element().maxLength){this._maxLength=this.get_element().maxLength;this.get_element().maxLength=this._watermarkText.length}this._applyWatermark()}},_applyWatermark:function(){var A=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());A.set_Watermark(this._watermarkText);A.set_IsWatermarked(true);if(this._watermarkCssClass){this.get_element().className=this._watermarkCssClass}},_onKeyPress:function(){AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).set_IsWatermarked(false)},registerPropertyChanged:function(){var A=this.get_element();if(A.control&&!this._propertyChangedHandler){this._propertyChangedHandler=Function.createDelegate(this,this._onPropertyChanged);A.control.add_propertyChanged(this._propertyChangedHandler)}},_onPropertyChanged:function(A,B){if("text"==B.get_propertyName()){this.set_Value(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current())}},_onSubmit:function(){if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this.clearText(false);this._clearedForSubmit=true}},_partialUpdateEndRequest:function(A,B){AjaxControlToolkit.TextBoxWatermarkBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[A,B]);if(this.get_element()&&this._clearedForSubmit){this.get_element().blur();this._onBlur();this._clearedForSubmit=false}},get_WatermarkText:function(){return this._watermarkText},set_WatermarkText:function(A){if(this._watermarkText!=A){this._watermarkText=A;if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this._applyWatermark()}this.raisePropertyChanged("WatermarkText")}},get_WatermarkCssClass:function(){return this._watermarkCssClass},set_WatermarkCssClass:function(A){if(this._watermarkCssClass!=A){this._watermarkCssClass=A;if(AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this._applyWatermark()}this.raisePropertyChanged("WatermarkCssClass")}},get_Text:function(){return AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value()},set_Text:function(A){if(""==A){AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).set_Current("");this.get_element().blur();this._onBlur()}else{this._onFocus();AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element()).set_Current(A)}}};AjaxControlToolkit.TextBoxWatermarkBehavior.registerClass("AjaxControlToolkit.TextBoxWatermarkBehavior",AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.TextBoxWatermarkBehavior.WebForm_OnSubmit=function(){var A=AjaxControlToolkit.TextBoxWatermarkBehavior._originalWebForm_OnSubmit();if(A){var D=Sys.Application.getComponents();for(var C=0;C<D.length;C++){var B=D[C];if(AjaxControlToolkit.TextBoxWatermarkBehavior.isInstanceOfType(B)){B._onSubmit()}}}return A};if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("MD.TotalMerrill.MarketDataWidgetsPage");MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService=function(){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.prototype={GetACSymbolLookUp:function(E,C,B,D,A,F){return this._invoke(MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_path(),"GetACSymbolLookUp",false,{prefixText:E,count:C,contextKey:B},D,A,F)},GetMarketData:function(A,C,B,D){return this._invoke(MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_path(),"GetMarketData",false,{keyword:A},C,B,D)},GetMDChartData:function(C,B,A,D){return this._invoke(MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_path(),"GetMDChartData",false,{symbol:C},B,A,D)},GetQuotesData:function(C,B,A,D){return this._invoke(MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_path(),"GetQuotesData",false,{symbol:C},B,A,D)}};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.registerClass("MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService",Sys.Net.WebServiceProxy);MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance=new MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService();MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.set_path=function(A){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._path=A};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_path=function(){return MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._path};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.set_timeout=function(A){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._timeout=A};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_timeout=function(){return MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._timeout};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.set_defaultUserContext=function(A){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._userContext=A};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_defaultUserContext=function(){return MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._userContext};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.set_defaultSucceededCallback=function(A){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._succeeded=A};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_defaultSucceededCallback=function(){return MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._succeeded};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.set_defaultFailedCallback=function(A){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._failed=A};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_defaultFailedCallback=function(){return MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance._failed};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.set_path("/MDTotalMerrillWidgetsPage/AutoCompleteSymbolUIService.asmx");MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.GetACSymbolLookUp=function(D,C,B,E,A,F){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance.GetACSymbolLookUp(D,C,B,E,A,F)};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.GetMarketData=function(A,C,B,D){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance.GetMarketData(A,C,B,D)};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.GetMDChartData=function(B,C,A,D){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance.GetMDChartData(B,C,A,D)};MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.GetQuotesData=function(B,C,A,D){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance.GetQuotesData(B,C,A,D)};var gtc=Sys.Net.WebServiceProxy._generateTypedConstructor;Type.registerNamespace("MD.TotalMerrill.Data");if(typeof (MD.TotalMerrill.Data.MarketDataResponse)==="undefined"){MD.TotalMerrill.Data.MarketDataResponse=gtc("MD.TotalMerrill.Data.MarketDataResponse");MD.TotalMerrill.Data.MarketDataResponse.registerClass("MD.TotalMerrill.Data.MarketDataResponse")}if(typeof (MD.TotalMerrill.Data.MDChartResponse)==="undefined"){MD.TotalMerrill.Data.MDChartResponse=gtc("MD.TotalMerrill.Data.MDChartResponse");MD.TotalMerrill.Data.MDChartResponse.registerClass("MD.TotalMerrill.Data.MDChartResponse")}if(typeof (MD.TotalMerrill.Data.MDQuotesResponse)==="undefined"){MD.TotalMerrill.Data.MDQuotesResponse=gtc("MD.TotalMerrill.Data.MDQuotesResponse");MD.TotalMerrill.Data.MDQuotesResponse.registerClass("MD.TotalMerrill.Data.MDQuotesResponse")}var lpMTagConfig={"lpServer":"textchat.bankofamerica.com","lpNumber":"44850650","lpProtocol":(document.location.toString().indexOf("https:")==0)?"https":"http"};function lpAddMonitorTag(B){if(typeof (B)=="undefined"||typeof (B)=="object"){B=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:"/hcp/html/mTag.js"}if(B.indexOf("http")!=0){B=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+B+"?site="+lpMTagConfig.lpNumber}else{if(B.indexOf("site=")<0){if(B.indexOf("?")<0){B=B+"?"}else{B=B+"&"}B=B+"site="+lpMTagConfig.lpNumber}}var A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("charset","iso-8859-1");A.setAttribute("src",B);document.getElementsByTagName("head").item(0).appendChild(A)}if(window.attachEvent){window.attachEvent("onload",lpAddMonitorTag)}else{window.addEventListener("load",lpAddMonitorTag,false)}if(typeof (lpMTagConfig.pageVar)=="undefined"){lpMTagConfig.pageVar=new Array()}if(typeof (lpMTagConfig.sessionVar)=="undefined"){lpMTagConfig.sessionVar=new Array()}if(typeof (lpMTagConfig.visitorVar)=="undefined"){lpMTagConfig.visitorVar=new Array()}if(typeof (lpMTagConfig.onLoadCode)=="undefined"){lpMTagConfig.onLoadCode=new Array()}if(typeof (lpMTagConfig.dynButton)=="undefined"){lpMTagConfig.dynButton=new Array()}function lpAddVars(B,A,C){if(A.indexOf("OrderTotal")!=-1&&(C==""||C==0)){return }C=lpTrimSpaces(C.toString());switch(B){case"page":lpMTagConfig.pageVar[lpMTagConfig.pageVar.length]=escape(A)+"="+escape(C);break;case"session":lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length]=escape(A)+"="+escape(C);break;case"visitor":lpMTagConfig.visitorVar[lpMTagConfig.visitorVar.length]=escape(A)+"="+escape(C);break}}function onloadEMT(){var A=document.cookie;if(lpMTag.lpBrowser=="IE"&&A.length>1900){lpMTagConfig.sendCookies=false}}function lpTrimSpaces(A){return A.replace(/^\s+|\s+$/g,"")}function lpSendData(B,A,C){if(typeof (lpMTag)!="undefined"&&typeof (lpMTag.lpSendData)!="undefined"){lpMTag.lpSendData(B.toUpperCase()+"VAR!"+A+"="+C,true)}}try{if(typeof (lpUnit)=="undefined"){var lpUnit="MLDSales"}if(typeof (lpAddVars)!="undefined"){lpAddVars("page","unit",lpUnit)}if(typeof (lpLanguage)=="undefined"){var lpLanguage="english"}if(typeof (lpAddVars)!="undefined"){lpAddVars("session","language",lpLanguage)}lpMTagConfig.defaultInvite="chat-"+lpUnit+"-"+lpLanguage}catch(e){}lpMTagConfig.onLoadCode[lpMTagConfig.onLoadCode.length]=onloadEMT;if(typeof (lpMTagConfig.dynButton)!="undefined"){lpMTagConfig.dynButton[lpMTagConfig.dynButton.length]={"name":"chat-"+lpUnit+"-"+lpLanguage,"pid":"btnMEChat"}}function onsearchclick1(B,A){var C;var F=document.getElementById(B).value;var G=document.getElementById(A).href;if(F==null||F==""||F=="Search"){alert("Please enter a search term");return false}else{if(checkSpecialCharacters2(F,"search")){var E=new RegExp("[&]","g");F=F.replace(E,"||");var D=new RegExp("[']","g");F=F.replace(D,"~~");C=F+"&filter=all";G=G+encodeURI(C);if(document.getElementById(A)!=null){window.location.href=G}}return false}}function onsearchclick2(G,E,H){var J;var F=document.getElementById(G).value;var D=document.getElementById(H).selectedIndex;var A=document.getElementById(H).options[D].value;var I=document.getElementById(E).href;if(F==null||F==""||F=="Search"){alert("Please enter a search term");return false}else{if(checkSpecialCharacters2(F,"search")){var B=new RegExp("[&]","g");F=F.replace(B,"||");var C=new RegExp("[']","g");F=F.replace(C,"~~");J=F+"&filter="+A;I=I+encodeURI(J);if(document.getElementById(E)!=null){window.location.href=I}}return false}}function checkSpecialCharacters2(A,I){var G;G="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var F=" $*&?%\"().,-~'";var E="`!@^_{[}]/:;+=<>#|";var B=false;var D=false;var H=false;for(var C=0;C<A.length;C++){if(G.indexOf(A.substring(C,C+1))!=-1){B=true}else{if(F.indexOf(A.substring(C,C+1))!=-1){D=true}else{if(E.indexOf(A.substring(C,C+1))!=-1){H=true}}}}if(H==true||(A.length==1&&D==true)||B==false){alert(I+" contains invalid characters. Please re-enter the "+I+".");return false}return true}function fnTrapKD2(A,B){if(document.all){if(B.keyCode==13||B.which==13){B.returnValue=false;B.cancel=true;document.getElementById(A).onclick()}}else{if(document.getElementById){if(B.keyCode==13||B.which==13){B.returnValue=false;B.cancel=true;document.getElementById(A).onclick()}}else{if(document.layers){if(B.keyCode==13||B.which==13){B.returnValue=false;B.cancel=true;document.getElementById(A).onclick()}}}}}function clearText2(A){if(A.value=="Search"){A.value=""}}function highlightNav(){return }var FastSearchLibrary=new Object();var gFastSearchLibrary=null;FastSearchLibrary.Framework=function(){this.type="General"};var gFastobjIDs={"getAutoCompleteDivID":"dvAutoComplete","GetAutocompletelistID":"liAutocompleteid"};var gFastClassColtn={"GetAutocCompleteDivClass":"acSearch_results","GetAutoCompleteSelectRowClass":"ac_gray","DisplayNone":"displayNone"};var gstrAutoCompleteUIStart='<ul id="ulautocomplte" >';var gstrAutoCompleteUIEnd="</ul>";var gStrAutoCompleteRowStart='<li  class="ac_even" id="'+gFastobjIDs.GetAutocompletelistID+'" onmouseover="gFastSearchLibrary.AutoCompleteMouseOver(this)" onmousedown="gFastSearchLibrary.AutoCompleteRowSelected(this);" ><span class="floatLeft">';var gStrAutoCompleteRowEnd="</li>";var gstrSpanEnd="</span>";var gIntAutocompleteSelectedRow=0;var gIntAutoCompleteFirstRow=0;var gIntAutoCompleteLastRow=0;var gSearchtextBox;var gSearchAnchorBtn;FastSearchLibrary.Framework.prototype={AddDivtoPage:function(C,B,A){if(A.keyCode!=40&&A.keyCode!=38){gSearchtextBox=B;gSearchAnchorBtn=document.getElementById(C);if($get(gFastobjIDs.getAutoCompleteDivID)){document.getElementsByTagName("BODY")[0].removeChild($get(gFastobjIDs.getAutoCompleteDivID))}if(gSearchtextBox.value.length>0){ret=MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.FaportalGetFASTCompletionList(gSearchtextBox.value,gFastSearchLibrary.OnAutoCompleteServiceSuccess,gFastSearchLibrary.OnError,gFastSearchLibrary.OnTimeOut)}}},OnAutoCompleteServiceSuccess:function(C){var F;var E;var B=true;var D;var A;if(!C){return false}if(C.length<1){return false}F=gstrAutoCompleteUIStart;for(E=0;E<C.length;E++){F=F+gStrAutoCompleteRowStart.replace(gFastobjIDs.GetAutocompletelistID,gFastobjIDs.GetAutocompletelistID+E);F=F+C[E]+gstrSpanEnd+gStrAutoCompleteRowEnd}gIntAutoCompleteLastRow=E;gIntAutocompleteSelectedRow=-1;F=F+gstrAutoCompleteUIEnd;D=document.createElement("DIV");D.id=gFastobjIDs.getAutoCompleteDivID;A=Sys.UI.DomElement.getBounds(gSearchtextBox);D.className=gFastClassColtn.GetAutocCompleteDivClass;Sys.UI.DomElement.setLocation(D,A.x,A.y+A.height);D.innerHTML=F;document.getElementsByTagName("BODY")[0].appendChild(D)},OnTimeOut:function(A){alert("TimeOut encountered when callin fast web service.")},OnError:function(A){alert("Error : "+A)},AutoCompleteRowDeselect:function(A){if(A){A.className=A.className.replace(" "+gFastClassColtn.GetAutoCompleteSelectRowClass,"")}},AutoCompleteMouseOver:function(A){if(A){gFastSearchLibrary.AutoCompleteRowDeselect($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow));A.className=A.className+" "+gFastClassColtn.GetAutoCompleteSelectRowClass;gIntAutocompleteSelectedRow=A.id.replace(gFastobjIDs.GetAutocompletelistID,"")*1}},AutoCompleteRowSelected:function(A){if("string"==typeof A.textContent){gSearchtextBox.value=A.textContent}if("string"==typeof A.innerText){gSearchtextBox.value=A.innerText}gSearchAnchorBtn.onclick();return false},AutoCompleteRemove:function(){try{if($get(gFastobjIDs.getAutoCompleteDivID)){document.getElementsByTagName("BODY")[0].removeChild($get(gFastobjIDs.getAutoCompleteDivID))}}catch(A){}},GetAutoCompleteSelectRowByArrowKeys:function(A){try{if(!$get(gFastobjIDs.getAutoCompleteDivID)){return }if(A.keyCode==40){if($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow)){gFastSearchLibrary.AutoCompleteRowDeselect($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}gIntAutocompleteSelectedRow+=1;if($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow)){gFastSearchLibrary.AutoCompleteMouseOver($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}else{gIntAutocompleteSelectedRow=gIntAutoCompleteFirstRow;gFastSearchLibrary.AutoCompleteMouseOver($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}}else{if(A.keyCode==38){if($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow)){gFastSearchLibrary.AutoCompleteRowDeselect($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}gIntAutocompleteSelectedRow-=1;if($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow)){gFastSearchLibrary.AutoCompleteMouseOver($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}else{gIntAutocompleteSelectedRow=gIntAutoCompleteLastRow;gFastSearchLibrary.AutoCompleteMouseOver($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}}else{if(A.keyCode==13){gFastSearchLibrary.AutoCompleteRowSelected($get(gFastobjIDs.GetAutocompletelistID+gIntAutocompleteSelectedRow))}}}}catch(B){}}};gFastSearchLibrary=new FastSearchLibrary.Framework();Type.registerNamespace("MerrillLynch.Application.ECMS.Service");MerrillLynch.Application.ECMS.Service.ECMSContentService=function(){MerrillLynch.Application.ECMS.Service.ECMSContentService.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MerrillLynch.Application.ECMS.Service.ECMSContentService.prototype={_get_path:function(){var A=this.get_path();if(A){return A}else{return MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.get_path()}},GetContent:function(D,C,A,E,B,F){return this._invoke(this._get_path(),"GetContent",false,{strRootDocument:D,strDesignParams:C,strRuntimeParams:A},E,B,F)},GetCCMScript:function(C,E,D,A,F,B,G){return this._invoke(this._get_path(),"GetCCMScript",false,{strControlId:C,strRootDocument:E,strDesignParams:D,strRuntimeParams:A},F,B,G)},GetContentCCMScript:function(C,E,D,A,F,B,G){return this._invoke(this._get_path(),"GetContentCCMScript",false,{strControlId:C,strRootDocument:E,strDesignParams:D,strRuntimeParams:A},F,B,G)},GetRootDocumentByName:function(A,C,B,D){return this._invoke(this._get_path(),"GetRootDocumentByName",false,{strRDN:A},C,B,D)}};MerrillLynch.Application.ECMS.Service.ECMSContentService.registerClass("MerrillLynch.Application.ECMS.Service.ECMSContentService",Sys.Net.WebServiceProxy);MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance=new MerrillLynch.Application.ECMS.Service.ECMSContentService();MerrillLynch.Application.ECMS.Service.ECMSContentService.set_path=function(A){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.set_path(A)};MerrillLynch.Application.ECMS.Service.ECMSContentService.get_path=function(){return MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.get_path()};MerrillLynch.Application.ECMS.Service.ECMSContentService.set_timeout=function(A){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.set_timeout(A)};MerrillLynch.Application.ECMS.Service.ECMSContentService.get_timeout=function(){return MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.get_timeout()};MerrillLynch.Application.ECMS.Service.ECMSContentService.set_defaultUserContext=function(A){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.set_defaultUserContext(A)};MerrillLynch.Application.ECMS.Service.ECMSContentService.get_defaultUserContext=function(){return MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.get_defaultUserContext()};MerrillLynch.Application.ECMS.Service.ECMSContentService.set_defaultSucceededCallback=function(A){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.set_defaultSucceededCallback(A)};MerrillLynch.Application.ECMS.Service.ECMSContentService.get_defaultSucceededCallback=function(){return MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.get_defaultSucceededCallback()};MerrillLynch.Application.ECMS.Service.ECMSContentService.set_defaultFailedCallback=function(A){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.set_defaultFailedCallback(A)};MerrillLynch.Application.ECMS.Service.ECMSContentService.get_defaultFailedCallback=function(){return MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.get_defaultFailedCallback()};MerrillLynch.Application.ECMS.Service.ECMSContentService.set_path("/EC_ContentServiceXC/ECMSContentService.asmx");MerrillLynch.Application.ECMS.Service.ECMSContentService.GetContent=function(D,C,A,E,B,F){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.GetContent(D,C,A,E,B,F)};MerrillLynch.Application.ECMS.Service.ECMSContentService.GetCCMScript=function(C,E,D,A,F,B,G){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.GetCCMScript(C,E,D,A,F,B,G)};MerrillLynch.Application.ECMS.Service.ECMSContentService.GetContentCCMScript=function(C,E,D,A,F,B,G){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.GetContentCCMScript(C,E,D,A,F,B,G)};MerrillLynch.Application.ECMS.Service.ECMSContentService.GetRootDocumentByName=function(A,C,B,D){MerrillLynch.Application.ECMS.Service.ECMSContentService._staticInstance.GetRootDocumentByName(A,C,B,D)};Type.registerNamespace("MerrillLynch.Application.ECMS.WebUI");function writeDocument(A){document.write(A)}function FormatSpecParams(B,C){var E;var D='<specializations><specialization name="'+B+'" >';for(var A in C){E=C[A].split("|");D+='<spec_param name="'+A+'"><spec_value name="'+E[0]+'">'+E[1]+"</spec_value></spec_param>"}D+="</specialization></specializations>";return D}MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl=function(A){MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl.initializeBase(this,[A]);this._RootDocumentName=null;this._DesignParams=null;this._RuntimeParams=null;this._Application=null;this._ControlId=null;this._ServicePath=null;this._SuppressHtmlMarkup=null;this._SuppressContentOnLoad=null;this._Specializations=null;this._ContentLocations=null;this._Mode=null};MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl.prototype={initialize:function(){MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl.callBaseMethod(this,"initialize")},get_RootDocumentName:function(){return this._RootDocumentName},set_RootDocumentName:function(A){this._RootDocumentName=A},get_DesignParams:function(){return this._DesignParams},set_DesignParams:function(A){this._DesignParams=A},get_RuntimeParams:function(){return this._RuntimeParams},set_RuntimeParams:function(A){this._RuntimeParams=A},get_Application:function(){return this._Application},set_Application:function(A){this._Application=A},get_ControlId:function(){return this._ControlId},set_ControlId:function(A){this._ControlId=A},get_ServicePath:function(){return this._ServicePath},set_ServicePath:function(A){this._ServicePath=A},get_SuppressHtmlMarkup:function(){return this._SuppressHtmlMarkup},set_SuppressHtmlMarkup:function(A){this._SuppressHtmlMarkup=A},get_SuppressContentOnLoad:function(){return this._SuppressContentOnLoad},set_SuppressContentOnLoad:function(A){this._SuppressContentOnLoad=A},get_Specializations:function(){return this._Specializations},set_Specializations:function(A){this._Specializations=A},get_ContentLocations:function(){return this._ContentLocations},set_ContentLocations:function(A){this._ContentLocations=A},get_Mode:function(){return this._Mode},set_Mode:function(A){this._Mode=A},dispose:function(){this._RootDocumentName=null;this._DesignParams=null;this._RuntimeParams=null;this._Specializations=null;this._ContentLocations=null;MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl.callBaseMethod(this,"dispose")},setSpecParam:function(A,C,B){A[C]=B},setRuntimeXMLParameters:function(A){this.set_RuntimeParams(A)},LoadContent:function(){if(this.get_Mode().toLowerCase()=="stub"){this._onLoadComplete("<p>Client Refresh - LoadContent called.  Your content would be here.</p>",null,null)}else{MerrillLynch.Application.ECMS.Service.ECMSContentService.GetContentCCMScript(this.get_ControlId(),this.get_RootDocumentName(),this.get_DesignParams(),this.get_RuntimeParams(),Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed))}},GetContent:function(A){if(this.get_Mode().toLowerCase()=="stub"){A("<p>Client Refresh - GetContent called.  Your content would be here.</p>",null,null)}else{MerrillLynch.Application.ECMS.Service.ECMSContentService.GetContent(this.get_RootDocumentName(),this.get_DesignParams(),this.get_RuntimeParams(),Function.createDelegate(this,A),Function.createDelegate(this,A))}},_onLoadComplete:function(A,D,B){var C=$get(this.get_ControlId());C.innerHTML=A},_onLoadFailed:function(A,C,B){alert("error = "+A.get_message())},_onGetComplete:function(A,D,B){var C=$get(this.get_ControlId());C.innerHTML=A}};MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl.registerClass("MerrillLynch.Application.ECMS.WebUI.ECMSContentCtrl",Sys.UI.Control);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}Type.registerNamespace("MerrillLynch.Application.ECMS.WebUI");ControlManager=function(){this._Subscribers=[];this._events=new Sys.EventHandlerList()};ControlManager.instance=null;ControlManager.getInstance=function(){if(ControlManager.instance==null){ControlManager.instance=new ControlManager()}return ControlManager.instance};ControlManager.prototype={initialize:function(){},dispose:function(){this._Subscribers=null}};ControlManager.publish=function(E,D){var A=ControlManager.getInstance();var B=A._Subscribers.length;for(var C=0;C<B;C++){A._Subscribers[C][1](D)}};ControlManager.subscribe=function(D,B){var A=ControlManager.getInstance();var C=new Array(D,B);A._Subscribers.push(C)};Type.registerNamespace("MerrillLynch.Application.Online.OSE.UI.UIServices");MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService=function(){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.prototype={RetrieveContactUsControlData:function(A,C,B,D){return this._invoke(MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_path(),"RetrieveContactUsControlData",false,{strControlID:A},C,B,D)},GetQuoteResult:function(B,C,A,D){return this._invoke(MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_path(),"GetQuoteResult",false,{strFilter:B},C,A,D)},GetQuoteDetails:function(B,C,A,D){return this._invoke(MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_path(),"GetQuoteDetails",false,{strFilter:B},C,A,D)}};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.registerClass("MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService",Sys.Net.WebServiceProxy);MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance=new MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService();MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_path=function(A){var B=Function._validateParams(arguments,[{name:"path",type:String}]);if(B){throw B}MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._path=A};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_path=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._path};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_timeout=function(A){var B=Function._validateParams(arguments,[{name:"timeout",type:Number}]);if(B){throw B}if(A<0){throw Error.argumentOutOfRange("value",A,Sys.Res.invalidTimeout)}MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._timeout=A};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_timeout=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._timeout};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_defaultUserContext=function(A){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._userContext=A};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_defaultUserContext=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._userContext};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_defaultSucceededCallback=function(A){var B=Function._validateParams(arguments,[{name:"defaultSucceededCallback",type:Function}]);if(B){throw B}MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._succeeded=A};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_defaultSucceededCallback=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._succeeded};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_defaultFailedCallback=function(A){var B=Function._validateParams(arguments,[{name:"defaultFailedCallback",type:Function}]);if(B){throw B}MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._failed=A};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_defaultFailedCallback=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance._failed};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_path("/m/UIServices/OnlineSalesUIService.asmx");MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.RetrieveContactUsControlData=function(A,C,B,D){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.RetrieveContactUsControlData(A,C,B,D)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.GetQuoteResult=function(B,C,A,D){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.GetQuoteResult(B,C,A,D)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.GetQuoteDetails=function(B,C,A,D){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.GetQuoteDetails(B,C,A,D)};var gtc=Sys.Net.WebServiceProxy._generateTypedConstructor;Type.registerNamespace("MerrillLynch.Application.Online.OSE.Types.Complex");if(typeof (MerrillLynch.Application.Online.OSE.Types.Complex.GetQuoteDetails)==="undefined"){MerrillLynch.Application.Online.OSE.Types.Complex.GetQuoteDetails=gtc("MerrillLynch.Application.Online.OSE.Types.Complex.GetQuoteDetails");MerrillLynch.Application.Online.OSE.Types.Complex.GetQuoteDetails.registerClass("MerrillLynch.Application.Online.OSE.Types.Complex.GetQuoteDetails")}Type.registerNamespace("MerrillLynch.Application.Online.OSE.UI.UIServices");MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper=function(){MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.prototype={FaportalGetFASTCompletionList:function(C,B,A,D){return this._invoke(MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_path(),"FaportalGetFASTCompletionList",false,{prefixText:C},B,A,D)}};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.registerClass("MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper",Sys.Net.WebServiceProxy);MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance=new MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper();MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.set_path=function(A){var B=Function._validateParams(arguments,[{name:"path",type:String}]);if(B){throw B}MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._path=A};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_path=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._path};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.set_timeout=function(A){var B=Function._validateParams(arguments,[{name:"timeout",type:Number}]);if(B){throw B}if(A<0){throw Error.argumentOutOfRange("value",A,Sys.Res.invalidTimeout)}MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._timeout=A};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_timeout=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._timeout};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.set_defaultUserContext=function(A){MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._userContext=A};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_defaultUserContext=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._userContext};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.set_defaultSucceededCallback=function(A){var B=Function._validateParams(arguments,[{name:"defaultSucceededCallback",type:Function}]);if(B){throw B}MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._succeeded=A};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_defaultSucceededCallback=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._succeeded};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.set_defaultFailedCallback=function(A){var B=Function._validateParams(arguments,[{name:"defaultFailedCallback",type:Function}]);if(B){throw B}MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._failed=A};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_defaultFailedCallback=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance._failed};MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.set_path("/m/UIServices/AutoCompleteWebServiceWrapper.asmx");MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.FaportalGetFASTCompletionList=function(B,C,A,D){MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance.FaportalGetFASTCompletionList(B,C,A,D)};Type.registerNamespace("MerrillLynch.Application.Online.MicroSite.GlobalNavigation");MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu=function(A){MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu.initializeBase(this,[A]);this._ArraylstXmlHeaderName=null};var g_ml_tcs_nav_cntrl;MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu.prototype={initialize:function(){MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu.callBaseMethod(this,"initialize");g_ml_tcs_nav_cntrl=this;g_ml_tcs_nav_cntrl.find_xmlDiv_class()},dispose:function(){MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu.callBaseMethod(this,"dispose")},get_ArraylstXmlHeaderName:function(){return this._ArraylstXmlHeaderName},set_ArraylstXmlHeaderName:function(A){this._ArraylstXmlHeaderName=A},find_xmlDiv_class:function(){var divCollection=eval("("+this.get_ArraylstXmlHeaderName()+")");if(divCollection){for(var cnt=0;cnt<divCollection.length;cnt++){if(document.getElementById(divCollection[cnt].XmlDivId)){document.getElementById(divCollection[cnt].XmlDivId).innerHTML=divCollection[cnt].XmlHeaderName}}}},displayChildMenu:function(B){var B=window.event||B;var A=B.target||B.srcElement;var C=A.parentNode.parentNode.getElementsByTagName("UL");if(C){C.item(0).style.display="block";C.item(0).onmouseover=function(){C.item(0).style.display="block"}}},hideChildMenu:function(B){var B=window.event||B;var A=B.target||B.srcElement;var C=A.parentNode.parentNode.getElementsByTagName("UL");if(C){C.item(0).style.display="none";C.item(0).onmouseout=function(){C.item(0).style.display="none"}}}};MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu.registerClass("MerrillLynch.Application.Online.MicroSite.GlobalNavigation.RenderMenu",Sys.UI.Control);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}var Prototype={Version:"1.5.1.1",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:(document.createElement("div").__proto__!==document.createElement("form").__proto__)},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.extend(Object,{inspect:function(A){try{if(A===undefined){return"undefined"}if(A===null){return"null"}return A.inspect?A.inspect():A.toString()}catch(B){if(B instanceof RangeError){return"..."}throw B}},toJSON:function(A){var C=typeof A;switch(C){case"undefined":case"function":case"unknown":return ;case"boolean":return A.toString()}if(A===null){return"null"}if(A.toJSON){return A.toJSON()}if(A.ownerDocument===document){return }var B=[];for(var E in A){var D=Object.toJSON(A[E]);if(D!==undefined){B.push(E.toJSON()+": "+D)}}return"{"+B.join(", ")+"}"},keys:function(A){var B=[];for(var C in A){B.push(C)}return B},values:function(B){var A=[];for(var C in B){A.push(B[C])}return A},clone:function(A){return Object.extend({},A)}});Function.prototype.bind=function(){var A=this,C=$A(arguments),B=C.shift();return function(){return A.apply(B,C.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(C){var A=this,B=$A(arguments),C=B.shift();return function(D){return A.apply(C,[D||window.event].concat(B))}};Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(A){$R(0,this,true).each(A);return this},toPaddedString:function(C,B){var A=this.toString(B||10);return"0".times(C-A.length)+A},toJSON:function(){return isFinite(this)?this.toString():"null"}});Date.prototype.toJSON=function(){return'"'+this.getFullYear()+"-"+(this.getMonth()+1).toPaddedString(2)+"-"+this.getDate().toPaddedString(2)+"T"+this.getHours().toPaddedString(2)+":"+this.getMinutes().toPaddedString(2)+":"+this.getSeconds().toPaddedString(2)+'"'};var Try={these:function(){var C;for(var B=0,D=arguments.length;B<D;B++){var A=arguments[B];try{C=A();break}catch(E){}}return C}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(B,A){this.callback=B;this.frequency=A;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}}};Object.extend(String,{interpret:function(A){return A==null?"":String(A)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(E,C){var A="",D=this,B;C=arguments.callee.prepareReplacement(C);while(D.length>0){if(B=D.match(E)){A+=D.slice(0,B.index);A+=String.interpret(C(B));D=D.slice(B.index+B[0].length)}else{A+=D,D=""}}return A},sub:function(C,A,B){A=this.gsub.prepareReplacement(A);B=B===undefined?1:B;return this.gsub(C,function(D){if(--B<0){return D[0]}return A(D)})},scan:function(B,A){this.gsub(B,A);return this},truncate:function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var B=new RegExp(Prototype.ScriptFragment,"img");var A=new RegExp(Prototype.ScriptFragment,"im");return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var A=arguments.callee;A.text.data=this;return A.div.innerHTML},unescapeHTML:function(){var A=document.createElement("div");A.innerHTML=this.stripTags();return A.childNodes[0]?(A.childNodes.length>1?$A(A.childNodes).inject("",function(B,C){return B+C.nodeValue}):A.childNodes[0].nodeValue):""},toQueryParams:function(B){var A=this.strip().match(/([^?#]*)(#.*)?$/);if(!A){return{}}return A[1].split(B||"&").inject({},function(E,F){if((F=F.split("="))[0]){var C=decodeURIComponent(F.shift());var D=F.length>1?F.join("="):F[0];if(D!=undefined){D=decodeURIComponent(D)}if(C in E){if(E[C].constructor!=Array){E[C]=[E[C]]}E[C].push(D)}else{E[C]=D}}return E})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(C){var A="";for(var B=0;B<C;B++){A+=this}return A},camelize:function(){var D=this.split("-"),A=D.length;if(A==1){return D[0]}var C=this.charAt(0)=="-"?D[0].charAt(0).toUpperCase()+D[0].substring(1):D[0];for(var B=1;B<A;B++){C+=D[B].charAt(0).toUpperCase()+D[B].substring(1)}return C},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(B){var A=this.gsub(/[\x00-\x1f\\]/,function(C){var D=String.specialChar[C[0]];return D?D:"\\u00"+C[0].charCodeAt().toPaddedString(2,16)});if(B){return'"'+A.replace(/"/g,'\\"')+'"'}return"'"+A.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(A){return this.sub(A||Prototype.JSONFilter,"#{1}")},isJSON:function(){var A=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(A)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(A){return this.indexOf(A)>-1},startsWith:function(A){return this.indexOf(A)===0},endsWith:function(A){var B=this.length-A.length;return B>=0&&this.lastIndexOf(A)===B},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(B){if(typeof B=="function"){return B}var A=new Template(B);return function(C){return A.evaluate(C)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(A,B){this.template=A.toString();this.pattern=B||Template.Pattern},evaluate:function(A){return this.template.gsub(this.pattern,function(B){var C=B[1];if(C=="\\"){return B[2]}return C+String.interpret(A[B[3]])})}};var $break={},$continue=new Error('"throw $continue" is deprecated, use "return" instead');var Enumerable={each:function(B){var A=0;try{this._each(function(D){B(D,A++)})}catch(C){if(C!=$break){throw C}}return this},eachSlice:function(C,B){var A=-C,D=[],E=this.toArray();while((A+=C)<E.length){D.push(E.slice(A,A+C))}return D.map(B)},all:function(B){var A=true;this.each(function(D,C){A=A&&!!(B||Prototype.K)(D,C);if(!A){throw $break}});return A},any:function(B){var A=false;this.each(function(D,C){if(A=!!(B||Prototype.K)(D,C)){throw $break}});return A},collect:function(B){var A=[];this.each(function(D,C){A.push((B||Prototype.K)(D,C))});return A},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;throw $break}});return A},findAll:function(B){var A=[];this.each(function(D,C){if(B(D,C)){A.push(D)}});return A},grep:function(C,B){var A=[];this.each(function(F,E){var D=F.toString();if(D.match(C)){A.push((B||Prototype.K)(F,E))}});return A},include:function(A){var B=false;this.each(function(C){if(C==A){B=true;throw $break}});return B},inGroupsOf:function(B,A){A=A===undefined?null:A;return this.eachSlice(B,function(C){while(C.length<B){C.push(A)}return C})},inject:function(A,B){this.each(function(D,C){A=B(A,D,C)});return A},invoke:function(B){var A=$A(arguments).slice(1);return this.map(function(C){return C[B].apply(C,A)})},max:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D>=A){A=D}});return A},min:function(B){var A;this.each(function(D,C){D=(B||Prototype.K)(D,C);if(A==undefined||D<A){A=D}});return A},partition:function(C){var B=[],A=[];this.each(function(E,D){((C||Prototype.K)(E,D)?B:A).push(E)});return[B,A]},pluck:function(B){var A=[];this.each(function(D,C){A.push(D[B])});return A},reject:function(B){var A=[];this.each(function(D,C){if(!B(D,C)){A.push(D)}});return A},sortBy:function(A){return this.map(function(C,B){return{value:C,criteria:A(C,B)}}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var B=Prototype.K,A=$A(arguments);if(typeof A.last()=="function"){B=A.pop()}var C=[this].concat(A).map($A);return this.map(function(E,D){return B(C.pluck(D))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(D){if(!D){return[]}if(D.toArray){return D.toArray()}else{var B=[];for(var A=0,C=D.length;A<C;A++){B.push(D[A])}return B}};if(Prototype.Browser.WebKit){$A=Array.from=function(D){if(!D){return[]}if(!(typeof D=="function"&&D=="[object NodeList]")&&D.toArray){return D.toArray()}else{var B=[];for(var A=0,C=D.length;A<C;A++){B.push(D[A])}return B}}}Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(B){for(var A=0,C=this.length;A<C;A++){B(this[A])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(A){return A!=null})},flatten:function(){return this.inject([],function(B,A){return B.concat(A&&A.constructor==Array?A.flatten():[A])})},without:function(){var A=$A(arguments);return this.select(function(B){return !A.include(B)})},indexOf:function(A){for(var B=0,C=this.length;B<C;B++){if(this[B]==A){return B}}return -1},reverse:function(A){return(A!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(A){return this.inject([],function(D,C,B){if(0==B||(A?D.last()!=C:!D.include(C))){D.push(C)}return D})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var A=[];this.each(function(B){var C=Object.toJSON(B);if(C!==undefined){A.push(C)}});return"["+A.join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(A){A=A.strip();return A?A.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var E=[];for(var B=0,C=this.length;B<C;B++){E.push(this[B])}for(var B=0,C=arguments.length;B<C;B++){if(arguments[B].constructor==Array){for(var A=0,D=arguments[B].length;A<D;A++){E.push(arguments[B][A])}}else{E.push(arguments[B])}}return E}}var Hash=function(A){if(A instanceof Hash){this.merge(A)}else{Object.extend(this,A||{})}};Object.extend(Hash,{toQueryString:function(B){var A=[];A.add=arguments.callee.addPair;this.prototype._each.call(B,function(D){if(!D.key){return }var C=D.value;if(C&&typeof C=="object"){if(C.constructor==Array){C.each(function(E){A.add(D.key,E)})}return }A.add(D.key,C)});return A.join("&")},toJSON:function(A){var B=[];this.prototype._each.call(A,function(D){var C=Object.toJSON(D.value);if(C!==undefined){B.push(D.key.toJSON()+": "+C)}});return"{"+B.join(", ")+"}"}});Hash.toQueryString.addPair=function(A,C,B){A=encodeURIComponent(A);if(C===undefined){this.push(A)}else{this.push(A+"="+(C==null?"":encodeURIComponent(C)))}};Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(B){for(var A in this){var C=this[A];if(C&&C==Hash.prototype[A]){continue}var D=[A,C];D.key=A;D.value=C;B(D)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(A){return $H(A).inject(this,function(B,C){B[C.key]=C.value;return B})},remove:function(){var A;for(var B=0,C=arguments.length;B<C;B++){var D=this[arguments[B]];if(D!==undefined){if(A===undefined){A=D}else{if(A.constructor!=Array){A=[A]}A.push(D)}}delete this[arguments[B]]}return A},toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Hash.toJSON(this)}});function $H(A){if(A instanceof Hash){return A}return new Hash(A)}if(function(){var A=0,C=function(D){this.key=D};C.prototype.key="foo";for(var B in new C("bar")){A++}return A>1}()){Hash.prototype._each=function(C){var A=[];for(var B in this){var D=this[B];if((D&&D==Hash.prototype[B])||A.include(B)){continue}A.push(B);var E=[B,D];E.key=B;E.value=D;C(E)}}}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(C,A,B){this.start=C;this.end=A;this.exclusive=B},_each:function(A){var B=this.start;while(this.include(B)){A(B);B=B.succ()}},include:function(A){if(A<this.start){return false}if(this.exclusive){return A<this.end}return A<=this.end}});var $R=function(C,A,B){return new ObjectRange(C,A,B)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(A){this.responders._each(A)},register:function(A){if(!this.include(A)){this.responders.push(A)}},unregister:function(A){this.responders=this.responders.without(A)},dispatch:function(D,B,C,A){this.each(function(E){if(typeof E[D]=="function"){try{E[D].apply(E,[B,C,A])}catch(F){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(A){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,A||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=this.options.parameters.toQueryParams()}}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(B,A){this.transport=Ajax.getTransport();this.setOptions(A);this.request(B)},request:function(A){this.url=A;this.method=this.options.method;var C=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){C["_method"]=this.method;this.method="post"}this.parameters=C;if(C=Hash.toQueryString(C)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+C}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){C+="&_="}}}try{if(this.options.onCreate){this.options.onCreate(this.transport)}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||C):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(B){this.dispatchException(B)}},onStateChange:function(){var A=this.transport.readyState;if(A>1&&!((A==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var E={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){E["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){E["Connection"]="close"}}if(typeof this.options.requestHeaders=="object"){var C=this.options.requestHeaders;if(typeof C.push=="function"){for(var B=0,D=C.length;B<D;B+=2){E[C[B]]=C[B+1]}}else{$H(C).each(function(F){E[F.key]=F.value})}}for(var A in E){this.transport.setRequestHeader(A,E[A])}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300)},respondToReadyState:function(A){var C=Ajax.Request.Events[A];var F=this.transport,B=this.evalJSON();if(C=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(F,B)}catch(D){this.dispatchException(D)}var E=this.getHeader("Content-type");if(E&&E.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+C]||Prototype.emptyFunction)(F,B);Ajax.Responders.dispatch("on"+C,this,F,B)}catch(D){this.dispatchException(D)}if(C=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(A){try{return this.transport.getResponseHeader(A)}catch(B){return null}},evalJSON:function(){try{var A=this.getHeader("X-JSON");return A?A.evalJSON():null}catch(B){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(A){(this.options.onException||Prototype.emptyFunction)(this,A);Ajax.Responders.dispatch("onException",this,A)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(A,C,B){this.container={success:(A.success||A),failure:(A.failure||(A.success?null:A))};this.transport=Ajax.getTransport();this.setOptions(B);var D=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(F,E){this.updateContent();D(F,E)}).bind(this);this.request(C)},updateContent:function(){var B=this.container[this.success()?"success":"failure"];var A=this.transport.responseText;if(!this.options.evalScripts){A=A.stripScripts()}if(B=$(B)){if(this.options.insertion){new this.options.insertion(B,A)}else{B.update(A)}}if(this.success()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(A,C,B){this.setOptions(B);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=A;this.url=C;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(A){if(this.options.decay){this.decay=(A.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=A.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push($(arguments[A]))}return D}if(typeof B=="string"){B=document.getElementById(B)}return Element.extend(B)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(F,A){var C=[];var E=document.evaluate(F,$(A)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0,D=E.snapshotLength;B<D;B++){C.push(E.snapshotItem(B))}return C};document.getElementsByClassName=function(B,A){var C=".//*[contains(concat(' ', @class, ' '), ' "+B+" ')]";return document._getElementsByXPath(C,A)}}else{document.getElementsByClassName=function(G,I){var D=($(I)||document.body).getElementsByTagName("*");var A=[],B,F=new RegExp("(^|\\s)"+G+"(\\s|$)");for(var E=0,C=D.length;E<C;E++){B=D[E];var H=B.className;if(H.length==0){continue}if(H==G||H.match(F)){A.push(Element.extend(B))}}return A}}if(!window.Element){var Element={}}Element.extend=function(E){var G=Prototype.BrowserFeatures;if(!E||!E.tagName||E.nodeType==3||E._extended||G.SpecificElementExtensions||E==window){return E}var B={},D=E.tagName,A=Element.extend.cache,C=Element.Methods.ByTag;if(!G.ElementExtensions){Object.extend(B,Element.Methods),Object.extend(B,Element.Methods.Simulated)}if(C[D]){Object.extend(B,C[D])}for(var I in B){var H=B[I];if(typeof H=="function"&&!(I in E)){E[I]=A.findOrStore(H)}}E._extended=Prototype.emptyFunction;return E};Element.extend.cache={findOrStore:function(A){return this[A]=this[A]||function(){return A.apply(null,[this].concat($A(arguments)))}}};Element.Methods={visible:function(A){return $(A).style.display!="none"},toggle:function(A){A=$(A);Element[Element.visible(A)?"hide":"show"](A);return A},hide:function(A){$(A).style.display="none";return A},show:function(A){$(A).style.display="";return A},remove:function(A){A=$(A);A.parentNode.removeChild(A);return A},update:function(B,A){A=typeof A=="undefined"?"":A.toString();$(B).innerHTML=A.stripScripts();setTimeout(function(){A.evalScripts()},10);return B},replace:function(C,B){C=$(C);B=typeof B=="undefined"?"":B.toString();if(C.outerHTML){C.outerHTML=B.stripScripts()}else{var A=C.ownerDocument.createRange();A.selectNodeContents(C);C.parentNode.replaceChild(A.createContextualFragment(B.stripScripts()),C)}setTimeout(function(){B.evalScripts()},10);return C},inspect:function(B){B=$(B);var A="<"+B.tagName.toLowerCase();$H({"id":"id","className":"class"}).each(function(F){var E=F.first(),C=F.last();var D=(B[E]||"").toString();if(D){A+=" "+C+"="+D.inspect(true)}});return A+">"},recursivelyCollect:function(A,C){A=$(A);var B=[];while(A=A[C]){if(A.nodeType==1){B.push(Element.extend(A))}}return B},ancestors:function(A){return $(A).recursivelyCollect("parentNode")},descendants:function(A){return $A($(A).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(A){A=$(A).firstChild;while(A&&A.nodeType!=1){A=A.nextSibling}return $(A)},immediateDescendants:function(A){if(!(A=$(A).firstChild)){return[]}while(A&&A.nodeType!=1){A=A.nextSibling}if(A){return[A].concat($(A).nextSiblings())}return[]},previousSiblings:function(A){return $(A).recursivelyCollect("previousSibling")},nextSiblings:function(A){return $(A).recursivelyCollect("nextSibling")},siblings:function(A){A=$(A);return A.previousSiblings().reverse().concat(A.nextSiblings())},match:function(B,A){if(typeof A=="string"){A=new Selector(A)}return A.match($(B))},up:function(B,D,A){B=$(B);if(arguments.length==1){return $(B.parentNode)}var C=B.ancestors();return D?Selector.findElement(C,D,A):C[A||0]},down:function(B,C,A){B=$(B);if(arguments.length==1){return B.firstDescendant()}var D=B.descendants();return C?Selector.findElement(D,C,A):D[A||0]},previous:function(B,D,A){B=$(B);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(B))}var C=B.previousSiblings();return D?Selector.findElement(C,D,A):C[A||0]},next:function(C,D,B){C=$(C);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(C))}var A=C.nextSiblings();return D?Selector.findElement(A,D,B):A[B||0]},getElementsBySelector:function(){var A=$A(arguments),B=$(A.shift());return Selector.findChildElements(B,A)},getElementsByClassName:function(A,B){return document.getElementsByClassName(B,A)},readAttribute:function(C,A){C=$(C);if(Prototype.Browser.IE){if(!C.attributes){return null}var B=Element._attributeTranslations;if(B.values[A]){return B.values[A](C,A)}if(B.names[A]){A=B.names[A]}var D=C.attributes[A];return D?D.nodeValue:null}return C.getAttribute(A)},getHeight:function(A){return $(A).getDimensions().height},getWidth:function(A){return $(A).getDimensions().width},classNames:function(A){return new Element.ClassNames(A)},hasClassName:function(A,B){if(!(A=$(A))){return }var C=A.className;if(C.length==0){return false}if(C==B||C.match(new RegExp("(^|\\s)"+B+"(\\s|$)"))){return true}return false},addClassName:function(A,B){if(!(A=$(A))){return }Element.classNames(A).add(B);return A},removeClassName:function(A,B){if(!(A=$(A))){return }Element.classNames(A).remove(B);return A},toggleClassName:function(A,B){if(!(A=$(A))){return }Element.classNames(A)[A.hasClassName(B)?"remove":"add"](B);return A},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(B){B=$(B);var C=B.firstChild;while(C){var A=C.nextSibling;if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(C)}C=A}return B},empty:function(A){return $(A).innerHTML.blank()},descendantOf:function(B,A){B=$(B),A=$(A);while(B=B.parentNode){if(B==A){return true}}return false},scrollTo:function(A){A=$(A);var B=Position.cumulativeOffset(A);window.scrollTo(B[0],B[1]);return A},getStyle:function(B,C){B=$(B);C=C=="float"?"cssFloat":C.camelize();var D=B.style[C];if(!D){var A=document.defaultView.getComputedStyle(B,null);D=A?A[C]:null}if(C=="opacity"){return D?parseFloat(D):1}return D=="auto"?null:D},getOpacity:function(A){return $(A).getStyle("opacity")},setStyle:function(A,C,B){A=$(A);var E=A.style;for(var D in C){if(D=="opacity"){A.setOpacity(C[D])}else{E[(D=="float"||D=="cssFloat")?(E.styleFloat===undefined?"cssFloat":"styleFloat"):(B?D:D.camelize())]=C[D]}}return A},setOpacity:function(A,B){A=$(A);A.style.opacity=(B==1||B==="")?"":(B<0.00001)?0:B;return A},getDimensions:function(C){C=$(C);var G=$(C).getStyle("display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight}}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E}},makePositioned:function(A){A=$(A);var B=Element.getStyle(A,"position");if(B=="static"||!B){A._madePositioned=true;A.style.position="relative";if(window.opera){A.style.top=0;A.style.left=0}}return A},undoPositioned:function(A){A=$(A);if(A._madePositioned){A._madePositioned=undefined;A.style.position=A.style.top=A.style.left=A.style.bottom=A.style.right=""}return A},makeClipping:function(A){A=$(A);if(A._overflow){return A}A._overflow=A.style.overflow||"auto";if((Element.getStyle(A,"overflow")||"visible")!="hidden"){A.style.overflow="hidden"}return A},undoClipping:function(A){A=$(A);if(!A._overflow){return A}A.style.overflow=A._overflow=="auto"?"":A._overflow;A._overflow=null;return A}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf,childElements:Element.Methods.immediateDescendants});if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(A,B){switch(B){case"left":case"top":case"right":case"bottom":if(Element._getStyle(A,"position")=="static"){return null}default:return Element._getStyle(A,B)}}}else{if(Prototype.Browser.IE){Element.Methods.getStyle=function(A,B){A=$(A);B=(B=="float"||B=="cssFloat")?"styleFloat":B.camelize();var C=A.style[B];if(!C&&A.currentStyle){C=A.currentStyle[B]}if(B=="opacity"){if(C=(A.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(C[1]){return parseFloat(C[1])/100}}return 1}if(C=="auto"){if((B=="width"||B=="height")&&(A.getStyle("display")!="none")){return A["offset"+B.capitalize()]+"px"}return null}return C};Element.Methods.setOpacity=function(A,D){A=$(A);var C=A.getStyle("filter"),B=A.style;if(D==1||D===""){B.filter=C.replace(/alpha\([^\)]*\)/gi,"");return A}else{if(D<0.00001){D=0}}B.filter=C.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(D*100)+")";return A};Element.Methods.update=function(C,B){C=$(C);B=typeof B=="undefined"?"":B.toString();var A=C.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(A)){var D=document.createElement("div");switch(A){case"THEAD":case"TBODY":D.innerHTML="<table><tbody>"+B.stripScripts()+"</tbody></table>";depth=2;break;case"TR":D.innerHTML="<table><tbody><tr>"+B.stripScripts()+"</tr></tbody></table>";depth=3;break;case"TD":D.innerHTML="<table><tbody><tr><td>"+B.stripScripts()+"</td></tr></tbody></table>";depth=4}$A(C.childNodes).each(function(E){C.removeChild(E)});depth.times(function(){D=D.firstChild});$A(D.childNodes).each(function(E){C.appendChild(E)})}else{C.innerHTML=B.stripScripts()}setTimeout(function(){B.evalScripts()},10);return C}}else{if(Prototype.Browser.Gecko){Element.Methods.setOpacity=function(A,B){A=$(A);A.style.opacity=(B==1)?0.999999:(B==="")?"":(B<0.00001)?0:B;return A}}}}Element._attributeTranslations={names:{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"},values:{_getAttr:function(A,B){return A.getAttribute(B,2)},_flag:function(A,B){return $(A).hasAttribute(B)?B:null},style:function(A){return A.style.cssText.toLowerCase()},title:function(A){var B=A.getAttributeNode("title");return B.specified?B.nodeValue:null}}};(function(){Object.extend(this,{href:this._getAttr,src:this._getAttr,type:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag})}).call(Element._attributeTranslations.values);Element.Methods.Simulated={hasAttribute:function(B,D){var A=Element._attributeTranslations,C;D=A.names[D]||D;C=$(B).getAttributeNode(D);return C&&C.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.hasAttribute=function(A,B){if(A.hasAttribute){return A.hasAttribute(B)}return Element.Methods.Simulated.hasAttribute(A,B)};Element.addMethods=function(C){var I=Prototype.BrowserFeatures,D=Element.Methods.ByTag;if(!C){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)})}if(arguments.length==2){var B=C;C=arguments[1]}if(!B){Object.extend(Element.Methods,C||{})}else{if(B.constructor==Array){B.each(H)}else{H(B)}}function H(F){F=F.toUpperCase();if(!Element.Methods.ByTag[F]){Element.Methods.ByTag[F]={}}Object.extend(Element.Methods.ByTag[F],C)}function A(M,K,F){F=F||false;var L=Element.extend.cache;for(var O in M){var N=M[O];if(!F||!(O in K)){K[O]=L.findOrStore(N)}}}function E(L){var F;var K={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(K[L]){F="HTML"+K[L]+"Element"}if(window[F]){return window[F]}F="HTML"+L+"Element";if(window[F]){return window[F]}F="HTML"+L.capitalize()+"Element";if(window[F]){return window[F]}window[F]={};window[F].prototype=document.createElement(L).__proto__;return window[F]}if(I.ElementExtensions){A(Element.Methods,HTMLElement.prototype);A(Element.Methods.Simulated,HTMLElement.prototype,true)}if(I.SpecificElementExtensions){for(var J in Element.Methods.ByTag){var G=E(J);if(typeof G=="undefined"){continue}A(D[J],G.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag};var Toggle={display:Element.toggle};Abstract.Insertion=function(A){this.adjacency=A};Abstract.Insertion.prototype={initialize:function(B,C){this.element=$(B);this.content=C.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(D){var A=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(A)){this.insertContent(this.contentFromAnonymousTable())}else{throw D}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){C.evalScripts()},10)},contentFromAnonymousTable:function(){var A=document.createElement("div");A.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(A.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(A){A.reverse(false).each((function(B){this.element.insertBefore(B,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(A){A.each((function(B){this.element.appendChild(B)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(A){A.each((function(B){this.element.parentNode.insertBefore(B,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(A){this.element=$(A)},_each:function(A){this.element.className.split(/\s+/).select(function(B){return B.length>0})._each(A)},set:function(A){this.element.className=A},add:function(A){if(this.include(A)){return }this.set($A(this).concat(A).join(" "))},remove:function(A){if(!this.include(A)){return }this.set($A(this).without(A).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(A){this.expression=A.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/\[[\w-]*?:/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(typeof c[i]=="function"?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var E=this.expression,F=Selector.patterns,B=Selector.xpath,D,A;if(Selector._cache[E]){this.xpath=Selector._cache[E];return }this.matcher=[".//*"];while(E&&D!=E&&(/\S/).test(E)){D=E;for(var C in F){if(A=E.match(F[C])){this.matcher.push(typeof B[C]=="function"?B[C](A):new Template(B[C]).evaluate(A));E=E.replace(A[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(A){A=A||document;if(this.xpath){return document._getElementsByXPath(this.xpath,A)}return this.matcher(A)},match:function(A){return this.findElements(document).include(A)},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}};Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(A){if(A[1]=="*"){return""}return"[local-name()='"+A[1].toLowerCase()+"' or local-name()='"+A[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(A){A[3]=A[5]||A[6];return new Template(Selector.xpath.operators[A[2]]).evaluate(A)},pseudo:function(A){var B=Selector.xpath.pseudos[A[1]];if(!B){return""}if(typeof B==="function"){return B(A)}return new Template(Selector.xpath.pseudos[A[1]]).evaluate(A)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]","empty":"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]","checked":"[@checked]","disabled":"[@disabled]","enabled":"[not(@disabled)]","not":function(B){var H=B[6],G=Selector.patterns,A=Selector.xpath,E,B,C;var F=[];while(H&&E!=H&&(/\S/).test(H)){E=H;for(var D in G){if(B=H.match(G[D])){C=typeof A[D]=="function"?A[D](B):new Template(A[D]).evaluate(B);F.push("("+C.substring(1,C.length-1)+")");H=H.replace(B[0],"");break}}}return"[not("+F.join(" and ")+")]"},"nth-child":function(A){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",A)},"nth-last-child":function(A){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",A)},"nth-of-type":function(A){return Selector.xpath.pseudos.nth("position() ",A)},"nth-last-of-type":function(A){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",A)},"first-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-of-type"](A)},"last-of-type":function(A){A[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](A)},"only-of-type":function(A){var B=Selector.xpath.pseudos;return B["first-of-type"](A)+B["last-of-type"](A)},nth:function(E,C){var F,G=C[6],B;if(G=="even"){G="2n+0"}if(G=="odd"){G="2n+1"}if(F=G.match(/^(\d+)$/)){return"["+E+"= "+F[1]+"]"}if(F=G.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(F[1]=="-"){F[1]=-1}var D=F[1]?Number(F[1]):1;var A=F[2]?Number(F[2]):0;B="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(B).evaluate({fragment:E,a:D,b:A})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(A){A[3]=(A[5]||A[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(A)},pseudo:function(A){if(A[6]){A[6]=A[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(A)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/},handlers:{concat:function(B,A){for(var C=0,D;D=A[C];C++){B.push(D)}return B},mark:function(A){for(var B=0,C;C=A[B];B++){C._counted=true}return A},unmark:function(A){for(var B=0,C;C=A[B];B++){C._counted=undefined}return A},index:function(A,D,F){A._counted=true;if(D){for(var B=A.childNodes,E=B.length-1,C=1;E>=0;E--){node=B[E];if(node.nodeType==1&&(!F||node._counted)){node.nodeIndex=C++}}}else{for(var E=0,C=1,B=A.childNodes;node=B[E];E++){if(node.nodeType==1&&(!F||node._counted)){node.nodeIndex=C++}}}},unique:function(B){if(B.length==0){return B}var D=[],E;for(var C=0,A=B.length;C<A;C++){if(!(E=B[C])._counted){E._counted=true;D.push(Element.extend(E))}}return Selector.handlers.unmark(D)},descendant:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,E.getElementsByTagName("*"))}return B},child:function(A){var F=Selector.handlers;for(var E=0,D=[],G;G=A[E];E++){for(var B=0,C=[],H;H=G.childNodes[B];B++){if(H.nodeType==1&&H.tagName!="!"){D.push(H)}}}return D},adjacent:function(A){for(var C=0,B=[],E;E=A[C];C++){var D=this.nextElementSibling(E);if(D){B.push(D)}}return B},laterSibling:function(A){var D=Selector.handlers;for(var C=0,B=[],E;E=A[C];C++){D.concat(B,Element.nextSiblings(E))}return B},nextElementSibling:function(A){while(A=A.nextSibling){if(A.nodeType==1){return A}}return null},previousElementSibling:function(A){while(A=A.previousSibling){if(A.nodeType==1){return A}}return null},tagName:function(B,A,E,H){E=E.toUpperCase();var D=[],F=Selector.handlers;if(B){if(H){if(H=="descendant"){for(var C=0,G;G=B[C];C++){F.concat(D,G.getElementsByTagName(E))}return D}else{B=this[H](B)}if(E=="*"){return B}}for(var C=0,G;G=B[C];C++){if(G.tagName.toUpperCase()==E){D.push(G)}}return D}else{return A.getElementsByTagName(E)}},id:function(B,A,H,F){var G=$(H),D=Selector.handlers;if(!B&&A==document){return G?[G]:[]}if(B){if(F){if(F=="child"){for(var C=0,E;E=B[C];C++){if(G.parentNode==E){return[G]}}}else{if(F=="descendant"){for(var C=0,E;E=B[C];C++){if(Element.descendantOf(G,E)){return[G]}}}else{if(F=="adjacent"){for(var C=0,E;E=B[C];C++){if(Selector.handlers.previousElementSibling(G)==E){return[G]}}}else{B=D[F](B)}}}}for(var C=0,E;E=B[C];C++){if(E==G){return[G]}}return[]}return(G&&Element.descendantOf(G,A))?[G]:[]},className:function(B,A,C,D){if(B&&D){B=this[D](B)}return Selector.handlers.byClassName(B,A,C)},byClassName:function(C,B,F){if(!C){C=Selector.handlers.descendant([B])}var H=" "+F+" ";for(var E=0,D=[],G,A;G=C[E];E++){A=G.className;if(A.length==0){continue}if(A==F||(" "+A+" ").include(H)){D.push(G)}}return D},attrPresence:function(C,B,A){var E=[];for(var D=0,F;F=C[D];D++){if(Element.hasAttribute(F,A)){E.push(F)}}return E},attr:function(A,H,G,I,B){if(!A){A=H.getElementsByTagName("*")}var J=Selector.operators[B],D=[];for(var E=0,C;C=A[E];E++){var F=Element.readAttribute(C,G);if(F===null){continue}if(J(F,I)){D.push(C)}}return D},pseudo:function(B,C,E,A,D){if(B&&D){B=this[D](B)}if(!B){B=A.getElementsByTagName("*")}return Selector.pseudos[C](B,E,A)}},pseudos:{"first-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.previousElementSibling(E)){continue}C.push(E)}return C},"last-child":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(Selector.handlers.nextElementSibling(E)){continue}C.push(E)}return C},"only-child":function(B,G,A){var E=Selector.handlers;for(var D=0,C=[],F;F=B[D];D++){if(!E.previousElementSibling(F)&&!E.nextElementSibling(F)){C.push(F)}}return C},"nth-child":function(B,C,A){return Selector.pseudos.nth(B,C,A)},"nth-last-child":function(B,C,A){return Selector.pseudos.nth(B,C,A,true)},"nth-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,false,true)},"nth-last-of-type":function(B,C,A){return Selector.pseudos.nth(B,C,A,true,true)},"first-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,false,true)},"last-of-type":function(B,C,A){return Selector.pseudos.nth(B,"1",A,true,true)},"only-of-type":function(B,D,A){var C=Selector.pseudos;return C["last-of-type"](C["first-of-type"](B,D,A),D,A)},getIndices:function(B,A,C){if(B==0){return A>0?[A]:[]}return $R(1,C).inject([],function(D,E){if(0==(E-A)%B&&(E-A)/B>=0){D.push(E)}return D})},nth:function(A,L,N,K,C){if(A.length==0){return[]}if(L=="even"){L="2n+0"}if(L=="odd"){L="2n+1"}var J=Selector.handlers,I=[],B=[],E;J.mark(A);for(var H=0,D;D=A[H];H++){if(!D.parentNode._counted){J.index(D.parentNode,K,C);B.push(D.parentNode)}}if(L.match(/^\d+$/)){L=Number(L);for(var H=0,D;D=A[H];H++){if(D.nodeIndex==L){I.push(D)}}}else{if(E=L.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(E[1]=="-"){E[1]=-1}var O=E[1]?Number(E[1]):1;var M=E[2]?Number(E[2]):0;var P=Selector.pseudos.getIndices(O,M,A.length);for(var H=0,D,F=P.length;D=A[H];H++){for(var G=0;G<F;G++){if(D.nodeIndex==P[G]){I.push(D)}}}}}J.unmark(A);J.unmark(B);return I},"empty":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.tagName=="!"||(E.firstChild&&!E.innerHTML.match(/^\s*$/))){continue}C.push(E)}return C},"not":function(A,D,I){var G=Selector.handlers,J,C;var H=new Selector(D).findElements(I);G.mark(H);for(var F=0,E=[],B;B=A[F];F++){if(!B._counted){E.push(B)}}G.unmark(H);return E},"enabled":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(!E.disabled){C.push(E)}}return C},"disabled":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.disabled){C.push(E)}}return C},"checked":function(B,F,A){for(var D=0,C=[],E;E=B[D];D++){if(E.checked){C.push(E)}}return C}},operators:{"=":function(B,A){return B==A},"!=":function(B,A){return B!=A},"^=":function(B,A){return B.startsWith(A)},"$=":function(B,A){return B.endsWith(A)},"*=":function(B,A){return B.include(A)},"~=":function(B,A){return(" "+B+" ").include(" "+A+" ")},"|=":function(B,A){return("-"+B.toUpperCase()+"-").include("-"+A.toUpperCase()+"-")}},matchElements:function(F,G){var E=new Selector(G).findElements(),D=Selector.handlers;D.mark(E);for(var C=0,B=[],A;A=F[C];C++){if(A._counted){B.push(A)}}D.unmark(E);return B},findElement:function(B,C,A){if(typeof C=="number"){A=C;C=false}return Selector.matchElements(B,C||"*")[A||0]},findChildElements:function(E,G){var H=G.join(","),G=[];H.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(I){G.push(I[1].strip())});var D=[],F=Selector.handlers;for(var C=0,B=G.length,A;C<B;C++){A=new Selector(G[C].strip());F.concat(D,A.findElements(E))}return(B>1)?F.unique(D):D}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(A){$(A).reset();return A},serializeElements:function(C,A){var B=C.inject({},function(D,F){if(!F.disabled&&F.name){var E=F.name,G=$(F).getValue();if(G!=null){if(E in D){if(D[E].constructor!=Array){D[E]=[D[E]]}D[E].push(G)}else{D[E]=G}}}return D});return A?B:Hash.toQueryString(B)}};Form.Methods={serialize:function(B,A){return Form.serializeElements(Form.getElements(B),A)},getElements:function(A){return $A($(A).getElementsByTagName("*")).inject([],function(B,C){if(Form.Element.Serializers[C.tagName.toLowerCase()]){B.push(Element.extend(C))}return B})},getInputs:function(G,C,D){G=$(G);var A=G.getElementsByTagName("input");if(!C&&!D){return $A(A).map(Element.extend)}for(var E=0,H=[],F=A.length;E<F;E++){var B=A[E];if((C&&B.type!=C)||(D&&B.name!=D)){continue}H.push(Element.extend(B))}return H},disable:function(A){A=$(A);Form.getElements(A).invoke("disable");return A},enable:function(A){A=$(A);Form.getElements(A).invoke("enable");return A},findFirstElement:function(A){return $(A).getElements().find(function(B){return B.type!="hidden"&&!B.disabled&&["input","select","textarea"].include(B.tagName.toLowerCase())})},focusFirstElement:function(A){A=$(A);A.findFirstElement().activate();return A},request:function(B,A){B=$(B),A=Object.clone(A||{});var C=A.parameters;A.parameters=B.serialize(true);if(C){if(typeof C=="string"){C=C.toQueryParams()}Object.extend(A.parameters,C)}if(B.hasAttribute("method")&&!A.method){A.method=B.method}return new Ajax.Request(B.readAttribute("action"),A)}};Form.Element={focus:function(A){$(A).focus();return A},select:function(A){$(A).select();return A}};Form.Element.Methods={serialize:function(A){A=$(A);if(!A.disabled&&A.name){var B=A.getValue();if(B!=undefined){var C={};C[A.name]=B;return Hash.toQueryString(C)}}return""},getValue:function(A){A=$(A);var B=A.tagName.toLowerCase();return Form.Element.Serializers[B](A)},clear:function(A){$(A).value="";return A},present:function(A){return $(A).value!=""},activate:function(A){A=$(A);try{A.focus();if(A.select&&(A.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(A.type))){A.select()}}catch(B){}return A},disable:function(A){A=$(A);A.blur();A.disabled=true;return A},enable:function(A){A=$(A);A.disabled=false;return A}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(A){switch(A.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(A);default:return Form.Element.Serializers.textarea(A)}},inputSelector:function(A){return A.checked?A.value:null},textarea:function(A){return A.value},select:function(A){return this[A.type=="select-one"?"selectOne":"selectMany"](A)},selectOne:function(B){var A=B.selectedIndex;return A>=0?this.optionValue(B.options[A]):null},selectMany:function(D){var A,E=D.length;if(!E){return null}for(var C=0,A=[];C<E;C++){var B=D.options[C];if(B.selected){A.push(this.optionValue(B))}}return A},optionValue:function(A){return Element.extend(A).hasAttribute("value")?A.value:A.text}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(A,B,C){this.frequency=B;this.element=$(A);this.callback=C;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var A=this.getValue();var B=("string"==typeof this.lastValue&&"string"==typeof A?this.lastValue!=A:String(this.lastValue)!=String(A));if(B){this.callback(this.element,A);this.lastValue=A}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(A,B){this.element=$(A);this.callback=B;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var A=this.getValue();if(this.lastValue!=A){this.callback(this.element,A);this.lastValue=A}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this))},registerCallback:function(A){if(A.type){switch(A.type.toLowerCase()){case"checkbox":case"radio":Event.observe(A,"click",this.onElementEvent.bind(this));break;default:Event.observe(A,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(A){return $(A.target||A.srcElement)},isLeftClick:function(A){return(((A.which)&&(A.which==1))||((A.button)&&(A.button==1)))},pointerX:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(A){if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}},findElement:function(C,B){var A=Event.element(C);while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A},observers:false,_observeAndCache:function(D,C,B,A){if(!this.observers){this.observers=[]}if(D.addEventListener){this.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){this.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},unloadCache:function(){if(!Event.observers){return }for(var A=0,B=Event.observers.length;A<B;A++){Event.stopObserving.apply(this,Event.observers[A]);Event.observers[A][0]=null}Event.observers=false},observe:function(D,C,B,A){D=$(D);A=A||false;if(C=="keypress"&&(Prototype.Browser.WebKit||D.attachEvent)){C="keydown"}Event._observeAndCache(D,C,B,A)},stopObserving:function(D,C,B,A){D=$(D);A=A||false;if(C=="keypress"&&(Prototype.Browser.WebKit||D.attachEvent)){C="keydown"}if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){try{D.detachEvent("on"+C,B)}catch(E){}}}}});if(Prototype.Browser.IE){Event.observe(window,"unload",Event.unloadCache,false)}var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(B){var A=0,C=0;do{A+=B.scrollTop||0;C+=B.scrollLeft||0;B=B.parentNode}while(B);return[C,A]},cumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return[C,A]},positionedOffset:function(B){var A=0,D=0;do{A+=B.offsetTop||0;D+=B.offsetLeft||0;B=B.offsetParent;if(B){if(B.tagName=="BODY"){break}var C=Element.getStyle(B,"position");if(C=="relative"||C=="absolute"){break}}}while(B);return[D,A]},offsetParent:function(A){if(A.offsetParent){return A.offsetParent}if(A==document.body){return A}while((A=A.parentNode)&&A!=document.body){if(Element.getStyle(A,"position")!="static"){return A}}return document.body},within:function(B,A,C){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(B,A,C)}this.xcomp=A;this.ycomp=C;this.offset=this.cumulativeOffset(B);return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)},withinIncludingScrolloffsets:function(B,A,D){var C=this.realOffset(B);this.xcomp=A+C[0]-this.deltaX;this.ycomp=D+C[1]-this.deltaY;this.offset=this.cumulativeOffset(B);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+B.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+B.offsetWidth)},overlap:function(B,A){if(!B){return 0}if(B=="vertical"){return((this.offset[1]+A.offsetHeight)-this.ycomp)/A.offsetHeight}if(B=="horizontal"){return((this.offset[0]+A.offsetWidth)-this.xcomp)/A.offsetWidth}},page:function(D){var A=0,C=0;var B=D;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}}while(B=B.offsetParent);B=D;do{if(!window.opera||B.tagName=="BODY"){A-=B.scrollTop||0;C-=B.scrollLeft||0}}while(B=B.parentNode);return[C,A]},clone:function(C,E){var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});C=$(C);var D=Position.page(C);E=$(E);var F=[0,0];var B=null;if(Element.getStyle(E,"position")=="absolute"){B=Position.offsetParent(E);F=Position.page(B)}if(B==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}if(A.setLeft){E.style.left=(D[0]-F[0]+A.offsetLeft)+"px"}if(A.setTop){E.style.top=(D[1]-F[1]+A.offsetTop)+"px"}if(A.setWidth){E.style.width=C.offsetWidth+"px"}if(A.setHeight){E.style.height=C.offsetHeight+"px"}},absolutize:function(B){B=$(B);if(B.style.position=="absolute"){return }Position.prepare();var D=Position.positionedOffset(B);var F=D[1];var E=D[0];var C=B.clientWidth;var A=B.clientHeight;B._originalLeft=E-parseFloat(B.style.left||0);B._originalTop=F-parseFloat(B.style.top||0);B._originalWidth=B.style.width;B._originalHeight=B.style.height;B.style.position="absolute";B.style.top=F+"px";B.style.left=E+"px";B.style.width=C+"px";B.style.height=A+"px"},relativize:function(A){A=$(A);if(A.style.position=="relative"){return }Position.prepare();A.style.position="relative";var C=parseFloat(A.style.top||0)-(A._originalTop||0);var B=parseFloat(A.style.left||0)-(A._originalLeft||0);A.style.top=C+"px";A.style.left=B+"px";A.style.height=A._originalHeight;A.style.width=A._originalWidth}};if(Prototype.Browser.WebKit){Position.cumulativeOffset=function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;if(B.offsetParent==document.body){if(Element.getStyle(B,"position")=="absolute"){break}}B=B.offsetParent}while(B);return[C,A]}}Element.addMethods();var MLOSEJsLibrary=new Object();var gObjMLOSEJsLibrary=null;MLOSEJsLibrary.Framework=function(){this.version="1.0";this.type="General"};var gObjMLOSEJsContactUs={"ContactUsWidgetContentDataId":"ContactUsWidgetContentData"};var gObjMLOSEJsClassColtn={"DisplayNone":"displayNone"};var gObjMLOSEJsNavigationMenu={"MnuNavigationXmlPath":"/publish/OSE/XML/NavigationMenu.xml","MnuPageHref":"href","MnuHeaderText":"headerName","PageTitleDivId":"pageTitle"};var gExpanderWidthPixelDifference=6;var gExpanderHeightPixelDifference=4.7;var gExpanderMaxWidth=210;var gExpanderMaxHeight=210;var gTimerObj=0;var gExpanderFlag=0;var gObjContactUsOptionsDivHeight=0;var gObjContactUsOptionsDivWidth=0;var gStrVisible="visible";var gStrTacticParameter="src_cd";var gBlnShowAccordion=true;var gObjShowHideAccordionInterval=[];var gStrModalPopupID="mppbmpExt";var gStrModalPopupHeadID="ttlbmpHead";var gStrModalPopupBodyID="bodybmpExt";var gStrModalPopupFrameID="pucbmpExt";var gBlnRepositionOnScroll=true;var gStrUnsupportedBrowserMsgDivId="dvUnsupportedBrowserMsg";var gIntUnsupportedBrowserMsgDivHeight=0;var gIntUnsupportedBrowserMsgDivWidth=0;var gObjUnsupportedBrowserTimer;var gIntUnsupportedBrowserFlag=0;var gIntUnsupportedBrowserMsgDivMaxWidth=210;var gIntUnsupportedBrowserMsgDivMaxHeight=210;var gIntUnsupportedBrowserMsgDivWidthDiff=6;var gIntUnsupportedBrowserMsgDivHeightDiff=4.7;MLOSEJsLibrary.Framework.prototype={LogError:function(B,A){var E=0;var C="";try{E=B.get_statusCode();C=B.get_message()}catch(D){E=0;C=B.message}},ShowContactUsOptions:function(){try{var A=document.getElementById(gObjMLOSEJsContactUs.ContactUsWidgetContentDataId);MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.RetrieveContactUsControlData(A.id,gObjMLOSEJsLibrary.OnSuccessRetrieveControlContent,gObjMLOSEJsLibrary.OnFailedRetrieveControlContent)}catch(B){gObjMLOSEJsLibrary.LogError(B,"ShowContactUsOptions")}},OnHoverDisplayChildMenu:function(B){var B=window.event||B;var A=B.target||B.srcElement;var C=A.parentNode.parentNode.parentNode.getElementsByTagName("UL");if(C){gObjMLOSEJsLibrary.RemoveClass(C.item(0),"displayNone");C.item(0).onmouseover=function(){gObjMLOSEJsLibrary.RemoveClass(C.item(0),"displayNone")}}},OnMenuMouseOut:function(B){var B=window.event||B;var A=B.target||B.srcElement;var C=A.parentNode.parentNode.parentNode.getElementsByTagName("UL");if(C){gObjMLOSEJsLibrary.AttachClass(C.item(0),"displayNone");C.item(0).onmouseout=function(){gObjMLOSEJsLibrary.AttachClass(C.item(0),"displayNone")}}},AttachClass:function(A,C){try{if(A){A.className=A.className+" "+C}}catch(B){gObjMLOSEJsLibrary.LogError(B,"AttachClass")}},RemoveClass:function(A,C){var D;try{if(A){D=new RegExp(C,"gi");A.className=A.className.replace(D,"")}}catch(B){gObjMLOSEJsLibrary.LogError(B,"RemoveClass")}},GetQSParamValue:function(A){var F;var C;var E;var D;try{A=A.toUpperCase();if(window.location.search&&window.location.search.length>0&&window.location.search.toUpperCase().indexOf(A,0)>-1){E=window.location.search.toUpperCase();F=E.indexOf(A,0)+A.length+1;if(E.indexOf("&",0)>-1){C=E.indexOf("&",0)}else{C=E.length}D=E.substring(F,C)}return D}catch(B){gObjMLOSEJsLibrary.LogError(B,"GetQSParamValue")}},OnSuccessRetrieveControlContent:function(A){try{var B=document.getElementById(gObjMLOSEJsContactUs.ContactUsWidgetContentDataId);B.innerHTML=A;if(gExpanderFlag==0){gObjContactUsOptionsDivHeight=0;gObjContactUsOptionsDivWidth=0;gTimerObj=window.setInterval("gObjMLOSEJsLibrary.IncreaseHeightWidth();",1)}else{gTimerObj=window.setInterval("gObjMLOSEJsLibrary.DecreaseHeightWidth();",1)}}catch(C){gObjMLOSEJsLibrary.LogError(C,"OnSuccessRetrieveControlContent")}},OnFailedRetrieveControlContent:function(){alert("Transaction Failed")},IncreaseHeightWidth:function(){try{if(gObjContactUsOptionsDivWidth<gExpanderMaxWidth){if(gObjContactUsOptionsDivHeight<gExpanderMaxHeight){gObjContactUsOptionsDivHeight=gObjContactUsOptionsDivHeight+gExpanderHeightPixelDifference}gObjContactUsOptionsDivWidth=gObjContactUsOptionsDivWidth+gExpanderWidthPixelDifference}else{gExpanderFlag=1;window.clearInterval(gTimerObj)}var A=document.getElementById(gObjMLOSEJsContactUs.ContactUsWidgetContentDataId);A.style.display="block";A.style.height=gObjContactUsOptionsDivHeight+"px";A.style.width=gObjContactUsOptionsDivWidth+"px"}catch(B){gObjMLOSEJsLibrary.LogError(B,"IncreaseHeightWidth")}},DecreaseHeightWidth:function(){try{var A=document.getElementById(gObjMLOSEJsContactUs.ContactUsWidgetContentDataId);if(gObjContactUsOptionsDivWidth>0){if(gObjContactUsOptionsDivHeight>0){gObjContactUsOptionsDivHeight=gObjContactUsOptionsDivHeight-gExpanderHeightPixelDifference}gObjContactUsOptionsDivWidth=gObjContactUsOptionsDivWidth-gExpanderWidthPixelDifference}else{gExpanderFlag=0;A.style.display="none";window.clearInterval(gTimerObj)}A.style.height=gObjContactUsOptionsDivHeight+"px";A.style.width=gObjContactUsOptionsDivWidth+"px"}catch(B){gObjMLOSEJsLibrary.LogError(B,"DecreaseHeightWidth")}},OnFailWebService:function(A){gObjMLOSEJsLibrary.LogError(A,"OnFailWebService")},CheckNullPropertyValue:function(A){try{if(A){return A}else{return"&nbsp;"}}catch(B){gObjMLOSEJsLibrary.LogError(B,"CheckNullPropertyValue")}},handleHttpStatusError:function(E,B,A){var D="";try{D=B;if(E=="ERRMODULE"&&A!=null&&A!=""){document.write("<p>Requested page: '"+D+"'</p>");document.write("<br/><p>Error Source:"+A+"</p>")}else{if(D.toLowerCase().indexOf("rrsum_registration_form_b")>-1){window.location.href="http://new.totalmerrill.com/TotalMerrill/Pages/Campaign_Retirement%20.aspx"}else{document.write("<div class=article><table cellpadding=0 cellspacing=0 border=0><tr><td height=25px></td></tr></table></div><div id=homePage class=article><h1>Page Not Found</h1><div class=clear></div><div><p>&nbsp;</p>We're sorry, the page you've requested does not exist at this address.<br /><br />Please try one of the following to find the information you are looking for: <br /><br /><li>If you typed in the address, check to make sure it is spelled correctly </li><li>Use the search box at the top of this page to search our website</li><li>Return to the <a href=http://www.totalmerrill.com>totalmerrill.com</a> homepage</li><li><script language=javascript>g_ml_tm_jsLib_1_0.writeHrefTag(g_ml_tm_jsLib_1_0_sitemap.PageKey_ContactMLFindFAOrBranch_Modal,'modal',null,'Click Here', '?modal=findBranch');<\/script> if you are looking for a Merrill Lynch Financial Advisor or Branch Office </li></div><div class=article><table cellpadding=0 cellspacing=0 border=0><tr><td height=300px></td></tr></table></div></div>")}}}catch(C){gObjMLOSEJsLibrary.LogError(C,"handleHttpStatusError")}},writeErrorMessage:function(A,C,B){document.write('<div id="errorPage" class="content"><div class="message"><p class="error">');document.write("The requested page '"+C+"' has resulted in an error.  Please try again later.<br/>");document.write("Error GUID: "+A+" <br/><hr>");document.write('<br/><br/><a href="javascript:gObjMLOSEJsLibrary.showErrorModuleFromDiv();">.</a>');document.write("</p></div></div>")},showErrorModuleFromDiv:function(){var A=document.getElementById("errModulePH")},addTacticFromSPC:function(){if(SPC){return"?src_cd="+SPC["Tactic"]}else{return"?src_cd=other"}},NormalizeLinksToTriage:function(){try{var G=document.getElementsByTagName("A");if(G.length>0){for(var F=0;F<G.length;F++){var E=G[F].href.toUpperCase().indexOf("/OR/");var C=G[F].href.toUpperCase().indexOf("VOID(0)");var B=G[F].href.toUpperCase().indexOf("SEARCHRESULTS.ASPX");var A=G[F].href.toUpperCase().indexOf("?SRC_CD");if(B>-1){if(A==-1){G[F].href=G[F].href.replace("?k=",gObjMLOSEJsLibrary.addTacticFromSPC())+"&k="}}else{if(A==-1&&C==-1){G[F].href=G[F].href+gObjMLOSEJsLibrary.addTacticFromSPC()}}}}}catch(D){}},Initialize:function(){try{gObjMLOSEJsLibrary.NormalizeLinksToTriage();gObjMLOSEJsLibrary.SetPxName();gObjMLOSEJsLibrary.SuppressTextChatLink()}catch(A){}},CheckForSearchPage:function(){try{var A=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1).split(".")[0];if(A.toUpperCase().indexOf("SEARCHRESULTS")!=-1){var B=document.getElementById("pageContent");if(B){var D=document.createElement("DIV");D.id="searchClear";D.className="clear";B.appendChild(D)}}}catch(C){throw C}},loadXMLDoc:function(B){try{if(window.XMLHttpRequest){xhttp=new XMLHttpRequest()}else{xhttp=new ActiveXObject("Microsoft.XMLHTTP")}xhttp.open("GET",B,false);xhttp.send("");return xhttp.responseXML}catch(A){gObjMLOSEJsLibrary.LogError(A,"loadXMLDoc")}},mnuLevel3:new Array(),CreateMnuTitleArray:function(){var J=null;var H=null;var C=null;var E=new Array();var A=new Array();var D=null;var I=null;J=gObjMLOSEJsLibrary.loadXMLDoc(gObjMLOSEJsNavigationMenu.MnuNavigationXmlPath);try{if(J){if(J.evaluate!="undefined"&&J.evaluate!=null){I=J.evaluate("//MenuItems/MenuItem/MenuItem/MenuItem",J,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var B=0;B<I.snapshotLength;B++){H=I.snapshotItem(B).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(I.snapshotItem(B).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];C=I.snapshotItem(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);gObjMLOSEJsLibrary.mnuLevel3[H]=C}D=J.evaluate("//*[@isJsHeader='true']",J,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var G=0;G<D.snapshotLength;G++){H=D.snapshotItem(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(D.snapshotItem(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];C=D.snapshotItem(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);E[H]=C}}else{I=J.selectNodes("//MenuItems/MenuItem/MenuItem/MenuItem");for(var B=0;B<I.length;B++){H=I.item(B).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(I.item(B).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];C=I.item(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);gObjMLOSEJsLibrary.mnuLevel3[H]=C}D=J.selectNodes("//*[@isJsHeader='true']");for(var G=0;G<D.length;G++){H=D.item(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(D.item(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];C=D.item(G).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);E[H]=C}}}}catch(F){gObjMLOSEJsLibrary.LogError(F,"CreateMnuTitleArray")}return E},SetMenuTitle:function(){var C=null;var A=null;try{C=gObjMLOSEJsLibrary.CreateMnuTitleArray();if(C!=null){A=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1).split(".")[0];if(A.toLowerCase()=="home"){return false}if(C[A.toLowerCase()]){if(document.getElementById(gObjMLOSEJsNavigationMenu.PageTitleDivId)){document.getElementById(gObjMLOSEJsNavigationMenu.PageTitleDivId).innerHTML="<h1>"+C[A.toLowerCase()]+"</h1>"}if(gObjMLOSEJsLibrary.mnuLevel3[A.toLowerCase()]){document.getElementById(gObjMLOSEJsNavigationMenu.PageTitleDivId).className="pageTitle_Pad15px"}}else{if(document.getElementById(gObjMLOSEJsNavigationMenu.PageTitleDivId)){document.getElementById(gObjMLOSEJsNavigationMenu.PageTitleDivId).className=gObjMLOSEJsClassColtn.DisplayNone}}}}catch(B){gObjMLOSEJsLibrary.LogError(B,"SetMenuTitle")}},CloseDOMWindow:function(){$.closeDOMWindow()},OpenDOMWindow:function(A){$("#DOMWindow").trigger("unload").empty();$.openDOMWindow(A)},SetNavigationURLs:function(){var C;var A;try{C=document.getElementsByTagName("A");for(A=0;A<C.length;A++){if(C[A].href.toUpperCase().indexOf(".ASPX")>-1){if(C[A].href.toUpperCase().indexOf("/HOME.ASPX")>-1){C[A].href=C[A].href.replace("http:","https:")}else{C[A].href=C[A].href.replace("https:","http:")}}}}catch(B){gObjMLOSEJsLibrary.LogError(B,"SetNavigationURLs")}},ChangeTacticRelationshipStore:function(){var A=new Date(2010,6,11);var E=new Date(2010,6,19);var B=new Date();try{if(B>=A&&B<=E){if(document.getElementById("spnOSEContactUsPhoneNo").innerHTML=="888-637-3343"){document.getElementById("spnOSEContactUsPhoneNo").innerHTML="888-782-7594";var C="Monday - Friday<br> 8:00 AM - 10:00 PM ET<br>";document.getElementById("dvOSEContactUsHours").innerHTML=C}}}catch(D){gObjMLOSEJsLibrary.LogError(D,"ChangeTacticRelationshipStore")}},SetPxName:function(){var B=null;var A=0;var D=0;var E=null;try{if(document.getElementById("ctl00_nmMenu_dvMenu")){B=document.getElementById("ctl00_nmMenu_dvMenu").getElementsByTagName("DIV");for(A=0;A<B.length;A++){objAnchr=document.getElementById(B[A].id).getElementsByTagName("A");for(D=0;D<objAnchr.length;D++){E=document.getElementById(objAnchr[D].id).getAttribute("pxname");gObjMLOSEJsLibrary.setPxName_Rec(document.getElementById(objAnchr[D].id),E)}}}}catch(C){gObjMLOSEJsLibrary.LogError(C,"SetPxName")}},setPxName_Rec:function(D,E){var C=null;var A=0;try{C=D.childNodes;for(A=0;A<C.length;A++){if(C[A].id){document.getElementById(C[A].id).setAttribute("pxname",E);if(document.getElementById(C[A].id).childNodes.length>0){gObjMLOSEJsLibrary.setPxName_Rec(document.getElementById(C[A].id),E)}}else{break}}}catch(B){gObjMLOSEJsLibrary.LogError(B,"SetPxName")}return false},CreateTextChatSuppressLnkLst:function(){var E=null;var B=null;var F=new Array();var D=new Array();E=gObjMLOSEJsLibrary.loadXMLDoc("/publish/OSE/XML/MLTextChat.xml");try{if(E){if(E.evaluate!="undefined"&&E.evaluate!=null){F=E.evaluate("//*[@suppressTextChatLink='true']",E,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var A=0;A<F.snapshotLength;A++){B=F.snapshotItem(A).getAttribute("id");D[B]=B}}else{F=E.selectNodes("//*[@suppressTextChatLink='true']");for(var A=0;A<F.length;A++){B=F.item(A).getAttribute("id");D[B]=B}}}}catch(C){gObjMLOSEJsLibrary.LogError(C,"CreateTextChatSuppressLnkLst")}return D},loginClearUserID:function(){var A=document.getElementById("userid");if(A){A.value="";if(A.onkeypress==null||A.onkeypress==""){A.onkeypress=gObjMLOSEJsLibrary.checkForCharacters}}},checkForCharacters:function(C){var C=C||window.event;var B=C.target||C.srcElement;var A=null;if(C.keyCode){A=C.keyCode}else{if(C.which){A=C.which}}if(A&&A==13){gObjMLOSEJsLibrary.loginGo();return false}else{B.focus();return }},loginGo:function(){var A=document.getElementById("userid").value;if((A=="")||(A=="Enter your Merrill Edge ID")){alert("Please enter a valid User ID");document.getElementById("userid").focus()}else{window.location.href="https://olui2.fs.ml.com/login/ConfirmIdentity.aspx?ufid="+A}},SuppressTextChatLink:function(){var A=null;A=gObjMLOSEJsLibrary.CreateTextChatSuppressLnkLst();if(A!=null){pageName=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1).split(".")[0];if(A[pageName.toLowerCase()]){if(document.getElementById("btnMEChat")){document.getElementById("btnMEChat").className=gObjMLOSEJsClassColtn.DisplayNone}}}},ShowUnsupportedBrowserMessage:function(){try{MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.RetrieveUnsupportedBrowserControlContent(gObjMLOSEJsLibrary.OnSuccessRetrieveUnsupportedBrowserControlContent,gObjMLOSEJsLibrary.OnFailedRetrieveUnsupportedBrowserControlContent)}catch(A){gObjMLOSEJsLibrary.LogError(A,"ShowUnsupportedBrowserMessage")}},OnSuccessRetrieveUnsupportedBrowserControlContent:function(A){var B;try{B=document.getElementById(gStrUnsupportedBrowserMsgDivId);B.innerHTML=A;if(gIntUnsupportedBrowserFlag==0){gIntUnsupportedBrowserMsgDivHeight=0;gIntUnsupportedBrowserMsgDivWidth=0;gObjUnsupportedBrowserTimer=window.setInterval("gObjMLOSEJsLibrary.IncreaseHeightWidthOfUnsupportedBrowserMsgDiv();",1)}else{gObjUnsupportedBrowserTimer=window.setInterval("gObjMLOSEJsLibrary.DecreaseHeightWidthOfUnsupportedBrowserMsgDiv();",1)}}catch(C){gObjMLOSEJsLibrary.LogError(C,"OnSuccessRetrieveUnsupportedBrowserControlContent")}},IncreaseHeightWidthOfUnsupportedBrowserMsgDiv:function(){var A;try{if(gIntUnsupportedBrowserMsgDivWidth<gIntUnsupportedBrowserMsgDivMaxWidth){if(gIntUnsupportedBrowserMsgDivHeight<gIntUnsupportedBrowserMsgDivMaxHeight){gIntUnsupportedBrowserMsgDivHeight=gIntUnsupportedBrowserMsgDivHeight+gIntUnsupportedBrowserMsgDivHeightDiff}gIntUnsupportedBrowserMsgDivWidth=gIntUnsupportedBrowserMsgDivWidth+gIntUnsupportedBrowserMsgDivWidthDiff}else{gIntUnsupportedBrowserFlag=1;window.clearInterval(gObjUnsupportedBrowserTimer)}A=document.getElementById(gStrUnsupportedBrowserMsgDivId);A.style.display="block";A.style.height=gIntUnsupportedBrowserMsgDivHeight+"px";A.style.width=gIntUnsupportedBrowserMsgDivWidth+"px"}catch(B){gObjMLOSEJsLibrary.LogError(B,"IncreaseHeightWidthOfUnsupportedBrowserMsgDiv")}},DecreaseHeightWidthOfUnsupportedBrowserMsgDiv:function(){var A;try{A=document.getElementById(gStrUnsupportedBrowserMsgDivId);if(gIntUnsupportedBrowserMsgDivWidth>0){if(gIntUnsupportedBrowserMsgDivHeight>0){gIntUnsupportedBrowserMsgDivHeight=gIntUnsupportedBrowserMsgDivHeight-gIntUnsupportedBrowserMsgDivHeightDiff}gIntUnsupportedBrowserMsgDivWidth=gIntUnsupportedBrowserMsgDivWidth-gIntUnsupportedBrowserMsgDivWidthDiff}else{gIntUnsupportedBrowserFlag=0;A.style.display="none";window.clearInterval(gObjUnsupportedBrowserTimer)}A.style.height=gIntUnsupportedBrowserMsgDivHeight+"px";A.style.width=gIntUnsupportedBrowserMsgDivWidth+"px"}catch(B){gObjMLOSEJsLibrary.LogError(B,"DecreaseHeightWidthOfUnsupportedBrowserMsgDiv")}}};gObjMLOSEJsLibrary=new MLOSEJsLibrary.Framework();try{Sys.Application.add_load(gObjMLOSEJsLibrary.Initialize)}catch(e){window.onload=gObjMLOSEJsLibrary.Initialize}var MLOSEModalJs=new Object();MLOSEModalJs.Behavior=function(){this._headText='<a href="javascript:void(0);" onclick = "OnlineCommonJSFunctions.hideDiv(\'mppbmpExt\',\'pgms\');" id = "ancrClose" class="modalClose" title="Close" style="top: 0pt; left: 260px;">Close</a><span id="ttlbmpExt"></span>';this._bodyText='<iframe overflow="hidden" frameborder="0" src="" id="pucbmpExt" name="pucbmpExt" style="width: 100%; height: 100%; display: block;" class="frame"></iframe>';this._objInterval=null};var gBlnShowAccordion=true;var gObjShowHideAccordionInterval=[];var gStrModalPopupID="mppbmpExt";var gStrModalPopupHeadID="ttlbmpHead";var gStrModalPopupBodyID="bodybmpExt";var gStrModalPopupFrameID="pucbmpExt";var gBlnRepositionOnScroll=true;var startHeight=[];var endHeight=[];var _slide=[];MLOSEModalJs.Behavior.prototype={hideDiv:function(){if(arguments.length>0){for(j=0;j<arguments.length;j++){try{document.getElementsByTagName("BODY")[0].removeChild(document.getElementById(arguments[j]))}catch(A){document.getElementById(arguments[j]).style.display="none"}}}},getClientBounds:function(){var C=0;var A=0;try{switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:C=document.documentElement.clientWidth;A=document.documentElement.clientHeight;break;case Sys.Browser.Safari:C=window.innerWidth;A=window.innerHeight;break;case Sys.Browser.Opera:default:C=Math.min(window.innerWidth,document.documentElement.clientWidth);A=Math.min(window.innerHeight,document.documentElement.clientHeight);break}}catch(B){gObjMLOSEJsLibrary.LogError(B,"getClientBounds")}return{width:C,height:A}},setCenterPosition:function(C){var D=null;var A=0;var E=0;try{if(C){var D=OnlineCommonJSFunctions.getClientBounds();var A=(D.width-C.offsetWidth)/2;var E=(D.height-C.offsetHeight)/2;if(Sys.Browser.agent==Sys.Browser.InternetExplorer||Sys.Browser.agent==Sys.Browser.Firefox){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft}else{scrollTop=document.body.scrollTop;scrollLeft=document.body.scrollLeft}if(scrollTop){E=(scrollTop+E)}if(scrollLeft){A=(scrollLeft+A)}if(E+C.offsetHeight>=document.body.offsetHeight){E=E-C.offsetHeight}E=E>0?E:0;A=A>0?A:0}}catch(B){gObjMLOSEJsLibrary.LogError(B,"setCenterPosition")}return{top:E,left:A}},GetModalPopup:function(){return OnlineCommonJSFunctions.createModalPopup("mppbmpExt","modal",document.getElementsByTagName("BODY")[0])},Normalize:function(A){return(parseInt(A.replace("px",""))+"px")},LoadModalPopupByUrl:function(F,E,D,A,G){var B=null;try{B=OnlineCommonJSFunctions.GetModalPopup();if(B){if(D){OnlineCommonJSFunctions.set_Height(B,OnlineCommonJSFunctions.Normalize(D))}if(A){OnlineCommonJSFunctions.set_Width(B,OnlineCommonJSFunctions.Normalize(A))}if(E){OnlineCommonJSFunctions.set_Title(E)}if(G==false){OnlineCommonJSFunctions.set_ShowHeader(G)}OnlineCommonJSFunctions.set_URL(F);OnlineCommonJSFunctions.show(B)}}catch(C){gObjMLOSEJsLibrary.LogError(C,"LoadModalPopupByUrl")}},set_Height:function(B,A){B.style.height=A;A=(parseInt(A.replace("px",""))-59)+"px";document.getElementById("bodybmpExt").style.height=A},set_Width:function(B,A){B.style.width=A;A=(parseInt(A.replace("px",""))-30)+"px";document.getElementById("bodybmpExt").style.width=A},set_Title:function(A){var B=document.getElementById("ttlbmpExt");if(B){B.innerHTML=A}},set_ShowHeader:function(B){var A=document.getElementById("ttlbmpHead");if(!B&&A!=null){A.style.display="none"}},set_URL:function(A){var B=document.getElementById("pucbmpExt");if(B){B.src=A}},show:function(B){try{OnlineCommonJSFunctions.createMaskedBody();B.style.display="block";setTimeout(function(){if(Sys.Browser.agent!=Sys.Browser.InternetExplorer){var D="opacity:1"}else{var D="filter:alpha(opacity=100)"}var C=OnlineCommonJSFunctions.setCenterPosition(document.getElementById("mppbmpExt"));document.getElementById("mppbmpExt").style.cssText=document.getElementById("mppbmpExt").style.cssText+"visibility:visible;display:block;position:absolute;left:"+C.left+"px;top:"+C.top+"px;z-index: 9999; visibility: visible; display: block; overflow: hidden;"+D},15);window.onscroll=OnlineCommonJSFunctions.OnWindowScroll;window.onresize=OnlineCommonJSFunctions.onWindowResize}catch(A){gObjMLOSEJsLibrary.LogError(A,"show")}},onWindowResize:function(){if(document.getElementById("pgms")){var A=OnlineCommonJSFunctions.getClientBounds();document.getElementById("pgms").style.height=A.height;OnlineCommonJSFunctions.OnWindowScroll()}},createMaskedBody:function(){try{var B=OnlineCommonJSFunctions.getClientBounds();if(document.getElementById("pgms")){document.getElementById("pgms").style.visibility="visible";document.getElementById("pgms").style.display="block";document.getElementById("pgms").style.height=B.height}else{var C=document.createElement("DIV");C.id="pgms";C.className="pageMask";C.style.visibility="visible";C.style.height=B.height;document.getElementsByTagName("BODY")[0].appendChild(C)}}catch(A){gObjMLOSEJsLibrary.LogError(A,"createMaskedBody")}},OnWindowScroll:function(){try{if(!gBlnRepositionOnScroll){return }if(Sys.Browser.agent!=Sys.Browser.InternetExplorer){var B="opacity:1"}else{var B="filter:alpha(opacity=100)"}var A=OnlineCommonJSFunctions.setCenterPosition(document.getElementById("mppbmpExt"));document.getElementById("mppbmpExt").style.cssText=document.getElementById("mppbmpExt").style.cssText+"visibility:visible;display:block;position:absolute;left:"+A.left+"px;top:"+A.top+"px;z-index: 9999; visibility: visible; display: block; overflow: hidden;"+B}catch(C){gObjMLOSEJsLibrary.LogError(C,"OnWindowScroll")}},createModalPopup:function(){try{if(document.getElementById(arguments[0])){document.getElementById(arguments[0]).style.visibility="visible";document.getElementById(arguments[0]).style.display="block"}else{var D=document.createElement("DIV");if(arguments[0]){D.id=arguments[0]}if(arguments[1]){D.className=arguments[1]}D.style.visibility="hidden";D.style.display="none";var C=document.createElement("DIV");C.id="ttlbmpHead";C.className="head";C.innerHTML=this._headText;var A=document.createElement("DIV");A.className="body";A.id="bodybmpExt";A.innerHTML=this._bodyText;D.appendChild(C);D.appendChild(A);if(arguments[2]){arguments[2].appendChild(D)}return(document.getElementById(arguments[0]))?document.getElementById(arguments[0]):null}}catch(B){}},ShowHideCSContentModule:function(B,A,H,C,E,D){var I;var F;try{I=document.getElementById(B);F=document.getElementById(A);if(I&&F){E=parseInt(E.toString().replace("px",""));D=parseInt(D.toString().replace("px",""));if(F.className=="collapsed"){I.style.visibility="hidden";I.style.display="block";if(endHeight[I.id]==null){endHeight[I.id]=I.offsetHeight-D}if(startHeight[I.id]==null){startHeight[I.id]=I.offsetHeight-E}I.style.visibility="visible";I.style.display="none"}else{if(endHeight[I.id]==null){endHeight[I.id]=I.offsetHeight-D}if(startHeight[I.id]==null){startHeight[I.id]=I.offsetHeight-E}}if(F.className=="collapsed"){_slide[I.id]=F.onclick;F.onclick=null;I.style.height=D+"px";gObjShowHideAccordionInterval[I.id]=setInterval("OnlineCommonJSFunctions.ShowAccordion('"+B+"','"+A+"',"+endHeight[I.id]+");",2)}else{_slide[I.id]=F.onclick;F.onclick=null;E=0;I.style.height=I.offsetHeight+"px";gObjShowHideAccordionInterval[I.id]=setInterval("OnlineCommonJSFunctions.HideAccordion('"+B+"','"+A+"',"+E+");",2)}}}catch(G){gObjMLOSEJsLibrary.LogError(G,"ShowHideCSContentModule")}},ShowAccordion:function(E,G,F){var D;var C;var A;try{D=document.getElementById(E);C=document.getElementById(G);if(D&&C){A=D.style.height.replace("px","")*1;A=A+10;if(A<F){D.style.height=A.toString()+"px";D.style.display="block";D.style.overflow="hidden"}else{D.style.height=F.toString()+"px";C.className="expanded";C.onclick=_slide[D.id];gObjShowHideAccordionInterval[D.id]=clearInterval(gObjShowHideAccordionInterval[D.id])}}}catch(B){gObjMLOSEJsLibrary.LogError(B,"ShowAccordion")}},HideAccordion:function(F,G,E){var D;var C;var A;try{D=document.getElementById(F);C=document.getElementById(G);if(D&&C){A=D.style.height.replace("px","")*1;A=A-10;if(A>E){D.style.height=A.toString()+"px";D.style.overflow="hidden"}else{D.style.height=E.toString()+"px";C.className="collapsed";C.onclick=_slide[D.id];gObjShowHideAccordionInterval[D.id]=clearInterval(gObjShowHideAccordionInterval[D.id])}}}catch(B){_slide=null;gObjMLOSEJsLibrary.LogError(B,"HideAccordion")}},getParentModalPopup:function(){try{if(window.self!=window.parent){Element.extend(window.parent.document.getElementById("mppbmpExt"));return window.parent.document.getElementById("mppbmpExt")}return null}catch(A){gObjMLOSEJsLibrary.LogError(A,"getParentModalPopup")}}};OnlineCommonJSFunctions=new MLOSEModalJs.Behavior();if(typeof (Sys)!="undefined"){Sys.Application.notifyScriptLoaded()}var globalMEProto={refreshHeight:function(D,B,H,I){var E;var C;var K;var J;var F;try{var A=OnlineCommonJSFunctions.getClientBounds();E=window.parent.document.getElementById(gStrModalPopupID);C=window.parent.document.getElementById(gStrModalPopupHeadID);K=window.parent.document.getElementById(gStrModalPopupBodyID);J=window.parent.document.getElementById(gStrModalPopupFrameID);F=C.offsetHeight;B=parseInt(B.toString().replace("px",""))-F;K.style.height=B+"px";J.style.height=B+"px";E.style.height=(F+K.offsetHeight)+"px";OnlineCommonJSFunctions.setCenterPosition(window.parent.document.getElementById(gStrModalPopupID));if(document.getElementById("pgms")){document.getElementById("pgms").style.height=A.height}}catch(G){gObjMLOSEJsLibrary.LogError(G,"refreshHeight")}},_getIframe:function(){return window.parent.document.getElementById(gStrModalPopupFrameID)},set_RepositionOnScroll:function(A){gBlnRepositionOnScroll=A}};try{Element.addMethods(globalMEProto)}catch(e){}var _pixy=new Object({ver:"1.2.7",imgLoc:"",pxsid:"",customPageName:"",doc:document,eType:"0",tags:"INPUT,OPTION,BUTTON,IMG,A,AREA",pxsName:"pxs",pxvDomain:".ml.com",pxSec:"",pxp:"",pxv:"",pxs:"",noblur:false,q:new Array(),nop:true,linker:false,sjs:"javascript:",Track:function(B,C,A){if(!this.IE(B)){this.pxsid=B}else{return }if(!this.IE(C)){this.customPageName=C}if(!this.IE(A)){this.pxSec=A}},Init:function(){if(this.IE(this.pxsid)||this.IE(this.imgLoc)||!this.CIds()){return }else{this.nop=false}this.Connect();_pixyUtil.pixySet=true},Pr:function(P,G,T,M,L){var H=new Array();H[H.length]="pxt="+this.eType;H[H.length]="&pxsid="+this.pxsid;H[H.length]=this.GetIds();switch(this.eType){case"0":var A=this.GetRef();if(A.length>0){H[H.length]="&pxr="+this.CE(A[0]);if(A.length>1){H[H.length]="&pxrqs="+this.CE(A[1])}}else{H[H.length]="&pxr=&pxrqs="}H[H.length]="&pxc="+self.screen.colorDepth+"&pxd="+self.screen.width+"x"+self.screen.height;if(window.navigator.cpuClass!=undefined){H[H.length]="&pxcc="+window.navigator.cpuClass}H[H.length]="&pxtit="+this.GetTitle();if(this.customPageName!=""){H[H.length]="&pxcn="+this.CE(this.customPageName)}if(this.pxSec!=""){H[H.length]="&pxsec="+this.CE(this.pxSec)}H[H.length]="&pxul="+this.GetUl();var S=this.GetUrl();H[H.length]="&pxurl="+S[0];H[H.length]="&pxqs="+S[1];break;case"1":case"2":var K=false;if(P==undefined&&window.event){P=window.event}var C=null;if(P.srcElement!=null){if(P.srcElement.tagName=="SELECT"){C=P.srcElement[P.srcElement.options.selectedIndex]}else{C=P.srcElement}}if(C==null){if(P.target!=null){if(P.target.tagName=="SELECT"){C=P.target[P.target.options.selectedIndex]}else{C=P.target}}}if(C==null){return }if(C.type=="password"||P.type=="blur"){return }if(this.linker){var Q=0;if(C.tagName=="A"){_pixy.Link(C.href,C);Q=1}if(Q==0){var I=C.parentNode;if(I!=null){if(I.tagName=="A"){_pixy.Link(I.href,I);Q=1}}}if(Q==0){var I=C.parentNode.parentNode;if(I!=null){if(I.tagName=="A"){_pixy.Link(I.href,I);Q=1}}}}if(G==undefined){if(this.tags.split(",").length>0){var D=this.tags.split(",");for(var N=0;N<D.length;N++){if(D[N].toLowerCase()==C.tagName.toLowerCase()){K=true;break}}}}else{if(G){K=true}}if(!K){var E=C.getAttribute("pxname");if(E!=null&&E!=undefined&&E!=""){K=true}else{return }}if(!K){return }var J=this.GCo(P);var R="";R=this.IE(C)?"":this.GetId(C);H[H.length]="&pxname="+R;H[H.length]="&pxo="+J[0]+"|"+J[1];R="";R=this.IE(C)?"":this.GetVal(C);H[H.length]="&pxval="+R;H[H.length]="&pxf="+this.GetForm(C);break;case"3":if(this.IE(M)!=undefined&&L!=undefined){H[H.length]="&"+M+"="+L}break;case"4":if(T==undefined){return }if(T.length>0){var B=T.split(";");if(B.length==0){return }for(var O=0;O<B.length;O++){var F=this.doc.getElementById(B[O]);if(F!=undefined||F!=null){F=this.GetId(F)}else{F=""}if(F!=""){H[H.length]="&"+F+"="+this.GetValue(B[O])}}}break;case"5":break}H[H.length]="&pxdt="+this.GetTime();_pixy.q=H;this.Req()},Pr1:function(D,B,E){var C=new Array();C[C.length]="pxt="+this.eType;C[C.length]="&pxsid="+this.pxsid;C[C.length]=this.GetIds();switch(this.eType){case"7":C[C.length]="&pxsec="+this.CE(D);break;case"8":C[C.length]="&pxname="+this.CE(D);break;case"9":C[C.length]="&pxname="+this.CE(B);C[C.length]="&pxval="+this.CE(E);break;case"11":if(D==undefined){return }for(var A in D){C[C.length]="&"+escape(A)+"="+escape(D[A])}break;default:break}C[C.length]="&pxdt="+this.GetTime();_pixy.q=C;this.Req()},Listen:function(A){try{_pixy.eType="1";_pixy.Pr(A)}catch(B){}},Connect:function(){this.eType="0";this.Pr();if(!_pixyUtil.pixySet){_pixyUtil.DOMLoad(function(){_pixyUtil.AddEvent(_pixy.doc,"click",_pixy.Listen);_pixyUtil.AddEvent(window,"unload",_pixyUtil.Unload);if(!this.noblur){var A=_pixy.doc.getElementsByTagName("INPUT");for(var C=0;C<A.length;C++){if(A[C].type=="text"){_pixyUtil.AddEvent(A[C],"blur",_pixy.Listen)}}A=_pixy.doc.getElementsByTagName("SELECT");for(var B=0;B<A.length;B++){_pixyUtil.AddEvent(A[B],"blur",_pixy.Listen)}}})}},TrackTag:function(B){if(this.nop){return }var A=(B)?B:window.event;this.eType="2";this.Pr(A,true)},TrackAny:function(A,B){if(this.nop){return }this.eType="3";this.Pr(null,null,null,A,B)},TrackMultiple:function(A){if(this.nop){return }this.eType="11";this.Pr1(A)},Submit:function(A){if(this.nop){return }this.eType="4";this.Pr(null,null,A)},TrackSecLoad:function(A){if(this.nop){return }if(this.IE(A)){return }this.pxSec=A;this.eType="7";this.Pr1(A)},TrackSecEvent:function(A){if(this.nop){return }if(this.IE(A)){return }this.pxSec=A;this.eType="8";this.Pr1(A)},TrackValError:function(B,A){if(this.nop){return }this.eType="9";if(this.IE(B)||this.IE(A)){return }this.Pr1(null,B,A)},Req:function(){try{this.q=this.q.join("");if(this.q.length>2083){this.q=this.q.substring(0,2082)}var A=new Image(1,1);A.onload=function(){this.style.display="none"};A.src=this.imgLoc+"?"+this.q}catch(B){}finally{this.q=new Array()}},IE:function(A){if(A==undefined||A==null||A===""){return true}else{return false}},CE:function(A){if(A!=undefined){return escape(A)}else{return""}},SetAlt:function(A){var B=new Date();switch(A){case"pxv":B.setTime(B.getTime()+(10*365*24*60*60*1000));var D=this.GetUuid();this.SC(A,D,B.toUTCString(),"/",this.pxvDomain,false);var E=this.GetCookie(A);if(this.IE(E)){return }this.pxv=D;break;case"pxp":this.pxp=this.GetUuid();break;case"pxs":var C=this.GetUuid();this.SC(A,C,false,"/",false,false);var E=this.GetCookie(A);if(this.IE(E)){return }this.pxs=C;break;default:return }},CIds:function(){var A=new Array();if(this.IE(this.pxs)){if(this.IE(this.pxs)){this.pxs=this.GetCookie("Bear")}if(this.IE(this.pxs)){this.pxs=this.GetCookie(this.pxsName,"val")}if(this.IE(this.pxs)){this.pxs=this.GetCookie(this.pxsName)}if(this.IE(this.pxs)){this.SetAlt("pxs")}}if(this.IE(this.pxs)){A[A.length]="no-pxs"}if(this.IE(this.pxv)){this.pxv=this.GetCookie("pxv");if(!this.IE(this.pxv)){this.UC("pxv",this.pxv,"/",this.pxvDomain,false)}else{this.SetAlt("pxv")}}if(this.IE(this.pxv)){A[A.length]=",no-pxv"}if(this.IE(this.pxp)){this.SetAlt("pxp")}if(this.IE(this.pxv)){A[A.length]=",no-pxv"}if(this.IE(this.pxv)||this.IE(this.pxs)||this.IE(this.pxp)){return false}return true},GetCookieVal:function(E,B){if(this.doc.cookie.length==0){return""}var D=this.doc.cookie.indexOf(";",E);if(D==-1){D=this.doc.cookie.length}if(B!=undefined){var A=this.doc.cookie.substring(E,D);var F=A.indexOf(B)+B.length+1;var C=A.indexOf("&",F);if(C==-1){return A.toString()}else{return A.substring(F,C)}}else{return this.doc.cookie.substring(E,D)}},GetCookie:function(H,F){var B=H+"=";var G=B.length;var A=this.doc.cookie.length;var E=0;var C=this.doc.cookie;while(E<A){var D=E+G;if(C.substring(E,D)==B){return this.GetCookieVal(D,F)}E=this.doc.cookie.indexOf(" ",E)+1;if(E==0){break}}return""},GCo:function(C){var B=new Array();var A=0;var D=0;if(!C){var C=window.event}try{if(C.pageX||C.pageY){A=C.pageX;D=C.pageY}else{if(C.clientX||C.clientY){A=C.clientX+this.doc.body.scrollLeft+this.doc.documentElement.scrollLeft;D=C.clientY+this.doc.body.scrollTop+this.doc.documentElement.scrollTop}}B[0]=A;B[1]=D}catch(C){}return B},GetForm:function(A){if(A.form!=null&&A.form!=undefined){return A.form.id}else{return""}},GetId:function(B){if(B.tagName=="OPTION"){B=B.parentNode}var C;try{C=B.getAttribute("pxname");if(C!=null&&C!=undefined&&C!=""){return this.CE(C)}else{C=B.getAttribute("id");if(C==null||C==undefined||C==""){C=B.getAttribute("name")}return this.CE(C)}}catch(A){}if(C==undefined){return""}},GetIds:function(){return"&pxp="+this.CE(this.pxp)+"&pxv="+this.CE(this.pxv)+"&pxs="+this.CE(this.pxs)},GetRef:function(){var B=this.doc.referrer;var A=new Array();if(B.length>0){if(B.indexOf("?")>0){A=B.split("?")}else{A[A.length]=B}}return A},GetTime:function(){return new Date().getTime()},GetTitle:function(){return(this.CE(this.doc.title)||"N/T")},GetVal:function(D,C){var E="";var G=false;var F=D;if(F.tagName=="OPTION"){F=D.parentNode}var B=F.getAttribute("pxval");if(B==null||B==undefined||B==""){G=false}else{if(B=="true"){G=true}else{G=false}}switch(D.tagName.toLowerCase()){case"input":switch(D.type){case"checkbox":if(!G){return E}E=D.checked?"1":"0";if(D.value!="on"){E+="-"+D.value}break;case"radio":if(!G){return E}E=D.value;break;case"button":case"password":break;case"text":if(C!=undefined){if(C==true){E=this.CE(D.value);break}}if(!G){return E}E=this.CE(D.value);break;default:if(!G){return E}E=this.CE(D.value);break}break;case"button":case"textarea":break;case"a":case"area":var A=D.href.toString();if(this.CE(A).length>0){if(A.indexOf(this.sjs)>-1){E=""}else{if(A.substr(0,1)=="#"){if(A.length>1){E=this.CE(D.href)}else{E=""}}else{E=this.CE(D.href)}}}else{E=""}break;case"div":case"span":break;case"option":if(!G){return E}E=this.CE(D.innerHTML);break;default:if(!G){return E}E=this.CE(D.value);break}return E},GetValue:function(A){if(this.doc.getElementById(A)!=undefined){return this.GetVal(this.doc.getElementById(A),true)}else{return""}},GetUl:function(){if(window.navigator.userLanguage!=undefined){return this.CE(window.navigator.userLanguage.toLowerCase())}else{if(window.navigator.language!=undefined){return this.CE(window.navigator.language)}else{return""}}},GetUrl:function(){var A=new Array();A[A.length]=this.CE(this.doc.location.protocol+"//"+this.doc.location.host+this.doc.location.pathname);var B="";if(this.doc.location.search.length>0){B=this.doc.location.search.substring(1,this.doc.location.search.length)}A[A.length]=this.CE(B);return A},Link:function(E,C){var A=this.doc.domain;var I="localhost";if(A!=I&&!this.IE(E)){var G=E;if(G=="#"||G.indexOf(this.sjs)>-1||this.PU(G)==I||G.indexOf("tel:")>-1){return }var H=G.split("//");if(H.length>0){H=H[1]}else{H=G}var F=H.split("/");if(F.length>0){F=F[0]}else{F=F}if(this.PU(F)==this.PU(A)){return }G=G.split("#");var B=G[0];if(B.indexOf("?")>-1){if(B.indexOf("_tps")>-1){try{B=B.substr(0,B.indexOf("_tps")-1)}catch(D){}}B=B+(B.indexOf("?")>-1?"&":"?")+"_tps="+this.pxs}else{B=B+"?_tps="+this.pxs}if(G.length>1){B=B+"#"+G[1]}E=B;if(C!=undefined&&C!=null){C.href=E}else{return E}}},GetUuid:(function(){var A="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return function(B,F){var H=A,E=[],D=Math.random;F=F||H.length;if(B){for(var C=0;C<B;C++){E[C]=H[0|D()*F]}}else{var G;E[8]=E[13]=E[18]=E[23]="-";E[14]="4";for(var C=0;C<36;C++){if(!E[C]){G=0|D()*16;E[C]=H[(C==19)?(G&3)|8:G&15]}}}return E.join("")}})(),SC:function(B,H,D,I,F,A){var G=true;try{F=this.doc.location.hostname.indexOf(F)==-1?false:F;this.doc.cookie=B+"="+H+((D)?"; expires="+D:"")+((I)?"; path="+I:"")+((F)?"; domain="+F:"")+((A)?";secure":"");var C=this.GetCookie(B);if(C===false){G=false}G=true}catch(E){G=false}finally{return G}},UC:function(B,E,D,G,C){var F="";if(B=="pxv"){var A=new Date();A.setTime(A.getTime()+(10*365*24*60*60*1000));F=A.toUTCString();this.SC(B,E,F,D,G,C)}},PU:function(A){if(this.IE(A)){return }try{return(A.match(/[^.]*\.com/)||A.match(/[^.]*\.net/)||A.match(/[^.]*\.org/))[0]}catch(B){return""}}});var _pixyUtil=new Object({pixySet:false,AddEvent:function(D,B,A){try{if(D.addEventListener){D.addEventListener(B,A,false)}else{if(D.attachEvent){D["e"+B+A]=A;D[B+A]=function(){D["e"+B+A](window.event)};D.attachEvent("on"+B,D[B+A])}}}catch(C){}},DOMLoad:(function(){var load_events=[],load_timer,script,done,exec,old_onload,init=function(){done=true;clearInterval(load_timer);while(exec=load_events.shift()){exec()}if(script){script.onreadystatechange=""}};return function(func){if(done){return func()}if(!load_events[0]){if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,false);/*@cc_on@*//*@if (@_win32) var proto = "src='" + _pixy.sjs + "void(0)'"; document.write("<script id=__pxie_onload defer " + proto + "><\/scr" + "ipt>");script.onreadystatechange = function() {if (this.readyState == "complete") {init(); }}; /*@end@*/}if(/WebKit/i.test(navigator.userAgent)){load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}old_onload=window.onload;window.onload=function(){init();if(old_onload){old_onload()}}}load_events.push(func)}})(),RemoveEvent:function(D,B,A){try{if(D.removeEventListener){D.removeEventListener(B,A,false)}else{if(D.detachEvent){D.detachEvent("on"+B,D[B+A]);D[B+A]=null;D["e"+B+A]=null}}}catch(C){}},Unload:function(){}})
