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(l,f){if(MDUtilityHelper.isNullOrUndefined(f)){return(false)}if(MDUtilityHelper.isNullOrUndefined(f.EquityResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(l)){return(false)}var n=f.EquityResponse;$addHandler($get(l+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var g="",d="";if(n.NumValueType!==0){g=(n.NumValueType===-1?this.priceDown:this.priceUp);d=(n.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var b=new Array();b.push(new MDUtilityHelper.quoteRecord("_DisplayName",f.Symbol));b.push(new MDUtilityHelper.quoteRecord("_Desc1",f.SymbolDescription));b.push(new MDUtilityHelper.quoteRecord("_Price",n.CurrentPrice));b.push(new MDUtilityHelper.quoteRecord("_PriceChange",n.NetChange,null,g));b.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",n.PercentChange,null,d));b.push(new MDUtilityHelper.quoteRecord("_DaysVolume",n.DaysVoulme));b.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(n.Low52Week)+" - "+MDUtilityHelper.getStringValue(n.High52Week)));b.push(new MDUtilityHelper.quoteRecord("_BidAndAsk",MDUtilityHelper.getStringValue(n.BidPrice)+" / "+MDUtilityHelper.getStringValue(n.AskPrice)));if(n.RatingRecords){if(n.RatingRecords[0]&&!MDUtilityHelper.isNullOrEmpty(n.RatingRecords[0].VendorName)){b.push(new MDUtilityHelper.quoteRecord("_MLRating",n.RatingRecords[0].VendorRating))}else{$get(l+"_MLRatingDiv").style.display="none"}if(n.RatingRecords[1]&&!MDUtilityHelper.isNullOrEmpty(n.RatingRecords[1].RatingDescription)){b.push(new MDUtilityHelper.quoteRecord("_Rating1Value",n.RatingRecords[1].RatingDescription));b.push(new MDUtilityHelper.quoteRecord("_Rating1ProviderName",n.RatingRecords[1].VendorName));b.push(new MDUtilityHelper.quoteRecord("_Rating1AsOfDate",n.RatingRecords[1].RatingChangeDate))}if(n.RatingRecords[2]&&!MDUtilityHelper.isNullOrEmpty(n.RatingRecords[2].RatingDescription)){b.push(new MDUtilityHelper.quoteRecord("_Rating2Value",n.RatingRecords[2].RatingDescription));b.push(new MDUtilityHelper.quoteRecord("_Rating2ProviderName",n.RatingRecords[2].VendorName));b.push(new MDUtilityHelper.quoteRecord("_Rating2AsOfDate",n.RatingRecords[2].RatingChangeDate))}if(n.RatingRecords[3]&&!MDUtilityHelper.isNullOrEmpty(n.RatingRecords[3].VendorRating)){b.push(new MDUtilityHelper.quoteRecord("_Rating3Value",n.RatingRecords[3].VendorRating));b.push(new MDUtilityHelper.quoteRecord("_Rating3ProviderName",n.RatingRecords[3].VendorName));b.push(new MDUtilityHelper.quoteRecord("_Rating3AsOfDate",n.RatingRecords[3].RatingChangeDate))}}b.push(new MDUtilityHelper.quoteRecord("_Asof",n.AsofDateTime));MDUtilityHelper.fillValues(l,b);var c=$get(l+"_Chart");if(c){c.style.visibility="";var m=Math.random()+"";m=m.replace(".","");var h=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+f.Symbol+"&x="+m;c.src=h}var a=$get(l+"_ProfileLink");if(a){$addHandler(a,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var k=$get(l+"_TradeLink");if(k){$addHandler(k,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(a,f.ProfileUrl);this._checkDadLink(k,f.TradeUrl)},_showETFQuoteData:function(l,f){if(MDUtilityHelper.isNullOrUndefined(f)){return(false)}if(MDUtilityHelper.isNullOrUndefined(f.EquityResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(l)){return(false)}var n=f.EquityResponse;$addHandler($get(l+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var g="",d="";if(n.NumValueType!==0){g=(n.NumValueType===-1?this.priceDown:this.priceUp);d=(n.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var b=new Array();b.push(new MDUtilityHelper.quoteRecord("_DisplayName",f.Symbol));b.push(new MDUtilityHelper.quoteRecord("_Desc1",f.SymbolDescription));b.push(new MDUtilityHelper.quoteRecord("_Price",n.CurrentPrice));b.push(new MDUtilityHelper.quoteRecord("_PriceChange",n.NetChange,null,g));b.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",n.PercentChange,null,d));b.push(new MDUtilityHelper.quoteRecord("_DaysVolume",n.DaysVoulme));b.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(n.Low52Week)+" - "+MDUtilityHelper.getStringValue(n.High52Week)));b.push(new MDUtilityHelper.quoteRecord("_BidAndAsk",MDUtilityHelper.getStringValue(n.BidPrice)+" / "+MDUtilityHelper.getStringValue(n.AskPrice)));if(n.RatingRecords){if(n.RatingRecords[0]&&!MDUtilityHelper.isNullOrEmpty(n.RatingRecords[0].VendorName)){b.push(new MDUtilityHelper.quoteRecord("_MLRating",n.RatingRecords[0].VendorRating))}else{$get(l+"_MLRatingDiv").style.display="none"}}b.push(new MDUtilityHelper.quoteRecord("_Asof",n.AsofDateTime));MDUtilityHelper.fillValues(l,b);var c=$get(l+"_Chart");if(c){c.style.visibility="";var m=Math.random()+"";m=m.replace(".","");var h=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+f.Symbol+"&x="+m;c.src=h}var a=$get(l+"_ProfileLink");if(a){$addHandler(a,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var k=$get(l+"_TradeLink");if(k){$addHandler(k,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(a,f.ProfileUrl);this._checkDadLink(k,f.TradeUrl)},_showMutualFundQuoteData:function(l,f){if(MDUtilityHelper.isNullOrUndefined(f)){return(false)}if(MDUtilityHelper.isNullOrUndefined(f.FundResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(l)){return(false)}var n=f.FundResponse;$addHandler($get(l+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var g="",d="";if(n.NumValueType!==0){g=(n.NumValueType===-1?this.priceDown:this.priceUp);d=(n.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var b=new Array();b.push(new MDUtilityHelper.quoteRecord("_DisplayName",f.Symbol));b.push(new MDUtilityHelper.quoteRecord("_Desc1",f.SymbolDescription));b.push(new MDUtilityHelper.quoteRecord("_Price",n.NavPrice));b.push(new MDUtilityHelper.quoteRecord("_PriceChange",n.NetChange,null,g));b.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",n.PercentChange,null,d));b.push(new MDUtilityHelper.quoteRecord("_Max_Offering_Price",n.MaxOfferingPrice));b.push(new MDUtilityHelper.quoteRecord("_WeekRange52",MDUtilityHelper.getStringValue(n.Low52Week)+" - "+MDUtilityHelper.getStringValue(n.High52Week)));b.push(new MDUtilityHelper.quoteRecord("_Prev_NAV",n.PreviousNAV));b.push(new MDUtilityHelper.quoteRecord("_Recent_Cap_Gain",n.RecentCapitalGain));b.push(new MDUtilityHelper.quoteRecord("_Recent_Dividend",n.RecentDividend));b.push(new MDUtilityHelper.quoteRecord("_Total_Net_Asset_AsOf",n.TotalNetAssetDate));b.push(new MDUtilityHelper.quoteRecord("_Asof",n.AsOfDate));MDUtilityHelper.fillValues(l,b);var c=$get(l+"_Chart");if(c){c.style.visibility="";var m=Math.random()+"";m=m.replace(".","");var h=this.get_chartURL()+"?Id=TOTALMERRILL2&s="+f.Symbol+"&x="+m;c.src=h}var a=$get(l+"_ProfileLink");if(a){$addHandler(a,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var k=$get(l+"_TradeLink");if(k){$addHandler(k,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(a,f.ProfileUrl);this._checkDadLink(k,f.TradeUrl)},_showCloseEndedFundQuoteData:function(m,g){if(MDUtilityHelper.isNullOrUndefined(g)){return(false)}if(MDUtilityHelper.isNullOrUndefined(g.CloseEndedResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(m)){return(false)}var a=g.CloseEndedResponse;$addHandler($get(m+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var h="",f="";if(a.NumValueType!==0){h=(a.NumValueType===-1?this.priceDown:this.priceUp);f=(a.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var c=new Array();c.push(new MDUtilityHelper.quoteRecord("_DisplayName",g.Symbol));c.push(new MDUtilityHelper.quoteRecord("_Desc1",g.SymbolDescription));c.push(new MDUtilityHelper.quoteRecord("_Price",a.NavPrice));c.push(new MDUtilityHelper.quoteRecord("_PriceChange",a.NetChange,null,h));c.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",a.PercentChange,null,f));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 o;if(a.DividendShare){o=a.DividendShare}if(a.ExDividendDate){o+=" ("+a.ExDividendDate+")"}c.push(new MDUtilityHelper.quoteRecord("_Dividend_Share",o));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(m,c);var d=$get(m+"_Chart");if(d){d.style.visibility="";var n=Math.random()+"";n=n.replace(".","");var k=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+g.Symbol+"&x="+n;d.src=k}var b=$get(m+"_ProfileLink");if(b){$addHandler(b,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var l=$get(m+"_TradeLink");if(l){$addHandler(l,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(b,g.ProfileUrl);this._checkDadLink(l,g.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 f=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",f.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(m,f){if(MDUtilityHelper.isNullOrUndefined(f)){return(false)}if(MDUtilityHelper.isNullOrUndefined(f.OptionResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(m)){return(false)}var g=f.OptionResponse;$addHandler($get(m+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var h="",d="";if(g.NumValueType!==0){h=(g.NumValueType===-1?this.priceDown:this.priceUp);d=(g.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",g.FullOptionSymbol));b.push(new MDUtilityHelper.quoteRecord("_Price",g.CurrentPrice));b.push(new MDUtilityHelper.quoteRecord("_PriceChange",g.NetChange,null,h));b.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",g.PercentChange,null,d));b.push(new MDUtilityHelper.quoteRecord("_DaysVolume",g.DaysVoulme));b.push(new MDUtilityHelper.quoteRecord("_BidAsk",MDUtilityHelper.getStringValue(g.BidPrice)+" / "+MDUtilityHelper.getStringValue(g.AskPrice)));b.push(new MDUtilityHelper.quoteRecord("_OptionType",g.PutCall));b.push(new MDUtilityHelper.quoteRecord("_ExercisePrice",g.StrikePrice));b.push(new MDUtilityHelper.quoteRecord("_ExpirationDate",g.ExpirationDate));b.push(new MDUtilityHelper.quoteRecord("_Asof",g.AsofDateTime));MDUtilityHelper.fillValues(m,b);var c=$get(m+"_Chart");if(c){c.style.visibility="";var n=Math.random()+"";n=n.replace(".","");var k=this.get_chartURL()+"?Id=TOTALMERRILL2&s="+f.Symbol+"&x="+n;c.src=k}var a=$get(m+"_ProfileLink");if(a){$addHandler(a,"click",Function.createDelegate(this,this._viewProfileLink_Click))}var l=$get(m+"_TradeLink");if(l){$addHandler(l,"click",Function.createDelegate(this,this._tradeLink_Click))}this._checkDadLink(a,f.ProfileUrl);this._checkDadLink(l,f.TradeUrl)},_showIndexQuoteData:function(l,f){if(MDUtilityHelper.isNullOrUndefined(f)){return(false)}if(MDUtilityHelper.isNullOrUndefined(f.IndexResponse)){return(false)}if(MDUtilityHelper.isNullOrUndefined(l)){return(false)}var g=f.IndexResponse;$addHandler($get(l+"_Close"),"click",Function.createDelegate(this,this._hideQuoteHover));var h="",d="";if(g.NumValueType!==0){h=(g.NumValueType===-1?this.priceDown:this.priceUp);d=(g.NumValueType===-1?this.priceDown+" "+this.priceDownArrow:this.priceUp+" "+this.priceUpArrow)}var b=new Array();b.push(new MDUtilityHelper.quoteRecord("_DisplayName",f.Symbol));b.push(new MDUtilityHelper.quoteRecord("_Desc1",f.SymbolDescription));b.push(new MDUtilityHelper.quoteRecord("_Price",g.CurrentPrice));b.push(new MDUtilityHelper.quoteRecord("_PriceChange",g.NetChange,null,h));b.push(new MDUtilityHelper.quoteRecord("_PriceChangePct",g.PercentChange,null,d));b.push(new MDUtilityHelper.quoteRecord("_PrevClose",g.PreviousClose));b.push(new MDUtilityHelper.quoteRecord("_Week52Low",g.Low52Week));b.push(new MDUtilityHelper.quoteRecord("_Week52High",g.High52Week));b.push(new MDUtilityHelper.quoteRecord("_DaysLow",g.DaysLow));b.push(new MDUtilityHelper.quoteRecord("_DaysHigh",g.DaysHigh));b.push(new MDUtilityHelper.quoteRecord("_Asof",g.AsofDateTime));MDUtilityHelper.fillValues(l,b);var c=$get(l+"_Chart");if(c){c.style.visibility="";var m=Math.random()+"";m=m.replace(".","");var k=this.get_chartURL()+"?Id=TOTALMERRILL1&s="+f.Symbol+"&x="+m;c.src=k}var a=$get(l+"_ProfileLink");if(a){$addHandler(a,"click",Function.createDelegate(this,this._viewProfileLink_Click))}this._checkDadLink(a,f.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,f){if(!this.isNullOrUndefined(f)){for(var d=0,a=f.length;d<a;d++){var g=f[d];var c=$get(b+g.id);if(!this.isNullOrUndefined(c)){c.innerHTML=this.getStringValue(g.data,g.defaultValue);if(!this.isNullOrEmpty(g.cssClass)){Sys.UI.DomElement.addCssClass(c,g.cssClass)}}}}},getStringValue:function(b,a){if(this.isNullOrEmpty(a)){a="--"}if(this.isNullOrEmpty(b)){return a}return b},onQuoteItemSelected:function(d,f){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,f,a){var d=null;if(b){if(b.currentStyle){d=b.currentStyle[f]}else{if(document.defaultView&&document.defaultView.getComputedStyle){var c=document.defaultView.getComputedStyle(b,null);if(c){d=c[f]}}}if(!d&&b.style.getPropertyValue){d=b.style.getPropertyValue(f)}else{if(!d&&b.style.getAttribute){d=b.style.getAttribute(f)}}}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(g){if(g===document.documentElement){return new Sys.UI.Point(0,0)}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){if(g.window===g||g.nodeType===9||!g.getClientRects||!g.getBoundingClientRect){return new Sys.UI.Point(0,0)}var n=g.getClientRects();if(!n||!n.length){return new Sys.UI.Point(0,0)}var h=n[0];var o=0;var m=0;var k=false;try{k=g.ownerDocument.parentWindow.frameElement}catch(l){k=true}if(k){var b=g.getBoundingClientRect();if(!b){return new Sys.UI.Point(0,0)}var d=h.left;var c=h.top;for(var f=1;f<n.length;f++){var a=n[f];if(a.left<d){d=a.left}if(a.top<c){c=a.top}}o=d-b.left;m=c-b.top}var p=g.document.documentElement;return new Sys.UI.Point(h.left-2-o+p.scrollLeft,h.top-2-m+p.scrollTop)}return Sys.UI.DomElement.getLocation(g)},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 f={width:b.width-d.horizontal-a.horizontal,height:b.height-d.vertical-a.vertical};this.setContentSize(c,f)},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,f){if(!d){throw Error.argumentNull("element")}if(f<AjaxControlToolkit.BoxSide.Top||f>AjaxControlToolkit.BoxSide.Left){throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,f,"AjaxControlToolkit.BoxSide"))}var c=this._marginWidthNames[f];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 f=document.createElement("div");f.style.visibility="hidden";f.style.position="absolute";f.style.fontSize="1px";document.body.appendChild(f);var c=document.createElement("div");c.style.height="0px";c.style.overflow="hidden";f.appendChild(c);var g=f.offsetHeight;c.style.borderTop="solid black";c.style.borderTopWidth="thin";a.thin=f.offsetHeight-g;c.style.borderTopWidth="medium";a.medium=f.offsetHeight-g;c.style.borderTopWidth="thick";a.thick=f.offsetHeight-g;f.removeChild(c);document.body.removeChild(f);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(h){if(!h){throw Error.argumentNull("value")}h=h.trim().toLowerCase();var a=h.length;var g=-1;for(var c=0;c<a;c++){var f=h.substr(c,1);if((f<"0"||f>"9")&&f!="-"&&f!="."&&f!=","){break}g=c}if(g==-1){throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits)}var d;var b;if(g<(a-1)){d=h.substring(g+1).trim()}else{d="px"}b=parseFloat(h.substr(0,g+1));if(d=="px"){b=Math.floor(b)}return{size:b,type:d}},getElementOpacity:function(c){if(!c){throw Error.argumentNull("element")}var f=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;f=true}}}else{b=this.getCurrentStyle(c,"opacity",1);f=true}if(f===false){return 1}return parseFloat(b)},setElementOpacity:function(c,f){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=f*100}}if(b){c.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(f*100)+")"}}else{c.style.opacity=f}},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(k,f,g,d,c){k=k.toString();var h=k.length;var b=new Sys.StringBuilder();if(d=="r"){b.append(k)}while(h<f){b.append(g);h++}if(d=="l"){b.append(k)}var a=b.toString();if(c&&a.length>f){if(d=="l"){a=a.substr(a.length-f,f)}else{a=a.substr(0,f)}}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 f=document.createEventObject();$common.applyProperties(f,b||{});c.fireEvent("on"+a,f);return true}else{if(document.createEvent){var d=$common.__DOMEvents[a];if(d){var f=document.createEvent(d.eventGroup);d.init(f,b||{});c.dispatchEvent(f);return true}}}}catch(f){}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(f,b){for(var d in b){var c=b[d];if(c!=null&&Object.getType(c)===Object){var a=f[d];$common.applyProperties(a,c)}else{f[d]=c}}},createElementFromTemplate:function(g,h,m){if(typeof(g.nameTable)!="undefined"){var l=g.nameTable;if(String.isInstanceOfType(l)){l=m[l]}if(l!=null){m=l}}var n=null;if(typeof(g.name)!=="undefined"){n=g.name}var c=document.createElement(g.nodeName);if(typeof(g.name)!=="undefined"&&m){m[g.name]=c}if(typeof(g.parent)!=="undefined"&&h==null){var k=g.parent;if(String.isInstanceOfType(k)){k=m[k]}if(k!=null){h=k}}if(typeof(g.properties)!=="undefined"&&g.properties!=null){$common.applyProperties(c,g.properties)}if(typeof(g.cssClasses)!=="undefined"&&g.cssClasses!=null){$common.addCssClasses(c,g.cssClasses)}if(typeof(g.events)!=="undefined"&&g.events!=null){$addHandlers(c,g.events)}if(typeof(g.visible)!=="undefined"&&g.visible!=null){this.setVisible(c,g.visible)}if(h){h.appendChild(c)}if(typeof(g.opacity)!=="undefined"&&g.opacity!=null){$common.setElementOpacity(c,g.opacity)}if(typeof(g.children)!=="undefined"&&g.children!=null){for(var d=0;d<g.children.length;d++){var a=g.children[d];$common.createElementFromTemplate(a,c,m)}}var b=c;if(typeof(g.contentPresenter)!=="undefined"&&g.contentPresenter!=null){b=m[b]}if(typeof(g.content)!=="undefined"&&g.content!=null){var f=g.content;if(String.isInstanceOfType(f)){f=m[f]}if(f.parentNode){$common.wrapElement(f,c,b)}else{b.appendChild(f)}}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(g,n){if(!g||!g.AnimationName){throw Error.argument("obj",AjaxControlToolkit.Resources.Animation_MissingAnimationName)}var m=$AA.__animations[g.AnimationName.toLowerCase()];if(!m){throw Error.argument("type",String.format(AjaxControlToolkit.Resources.Animation_UknownAnimationName,g.AnimationName))}var f=new m();if(n){f.set_target(n)}if(g.AnimationChildren&&g.AnimationChildren.length){if($AA.ParentAnimation.isInstanceOfType(f)){for(var h=0;h<g.AnimationChildren.length;h++){var c=$AA.createAnimation(g.AnimationChildren[h]);if(c){f.add(c)}}}else{throw Error.argument("obj",String.format(AjaxControlToolkit.Resources.Animation_ChildrenNotAllowed,m.getName()))}}var l=m.__animationProperties;if(!l){m.__animationProperties={};m.resolveInheritance();for(var b in m.prototype){if(b.startsWith("set_")){m.__animationProperties[b.substr(4).toLowerCase()]=b}}delete m.__animationProperties.id;l=m.__animationProperties}for(var p in g){var a=p.toLowerCase();if(a=="animationname"||a=="animationchildren"){continue}var o=g[p];var d=l[a];if(d&&String.isInstanceOfType(d)&&f[d]){if(!Sys.Debug.isDebug){try{f[d](o)}catch(k){}}else{f[d](o)}}else{if(a.endsWith("script")){d=l[a.substr(0,p.length-6)];if(d&&String.isInstanceOfType(d)&&f[d]){f.DynamicProperties[d]=o}else{if(Sys.Debug.isDebug){throw Error.argument("obj",String.format(AjaxControlToolkit.Resources.Animation_NoDynamicPropertyFound,p,p.substr(0,p.length-5)))}}}else{if(Sys.Debug.isDebug){throw Error.argument("obj",String.format(AjaxControlToolkit.Resources.Animation_NoPropertyFound,p))}}}}return f};$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,f){$AA.ParentAnimation.initializeBase(this,[d,c,b]);this._animations=[];if(f&&f.length){for(var a=0;a<f.length;a++){this.add(f[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,f,a){$AA.SequenceAnimation.initializeBase(this,[d,c,b,f]);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,f,a){$AA.ConditionAnimation.initializeBase(this,[d,c,b,f]);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,f,a){$AA.CaseAnimation.initializeBase(this,[d,c,b,f]);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(h,g,f,c,d,b,a){$AA.FadeAnimation.initializeBase(this,[h,g,f]);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(g,f,d,c,b,a){$AA.FadeInAnimation.initializeBase(this,[g,f,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(g,f,d,c,b,a){$AA.FadeOutAnimation.initializeBase(this,[g,f,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(h,g,f,d,c,b,a){$AA.PulseAnimation.initializeBase(this,[h,g,f,null,((d!==undefined)?d:3)]);this._out=new $AA.FadeOutAnimation(h,g,f,c,b,a);this.add(this._out);this._in=new $AA.FadeInAnimation(h,g,f,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(f,d,c,b,a){$AA.PropertyAnimation.initializeBase(this,[f,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(g,f,d,c,b,a){$AA.DiscreteAnimation.initializeBase(this,[g,f,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(h,g,f,d,c,b,a){$AA.InterpolatedAnimation.initializeBase(this,[h,g,f,((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(h,g,f,d,c,b,a){$AA.ColorAnimation.initializeBase(this,[h,g,f,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(c){var f=this._start.Red;var d=this._start.Green;var a=this._start.Blue;if(this._interpolateRed){f=Math.round(this.interpolate(f,this._end.Red,c))}if(this._interpolateGreen){d=Math.round(this.interpolate(d,this._end.Green,c))}if(this._interpolateBlue){a=Math.round(this.interpolate(a,this._end.Blue,c))}return $AA.ColorAnimation.toColor(f,d,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(k,h,c){var f=k.toString(16);var d=h.toString(16);var a=c.toString(16);if(f.length==1){f="0"+f}if(d.length==1){d="0"+d}if(a.length==1){a="0"+a}return"#"+f+d+a};$AA.ColorAnimation.registerClass("AjaxControlToolkit.Animation.ColorAnimation",$AA.InterpolatedAnimation);$AA.registerAnimation("color",$AA.ColorAnimation);$AA.LengthAnimation=function(k,h,g,f,d,b,a,c){$AA.LengthAnimation.initializeBase(this,[k,h,g,f,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(h,g,f,a,b,d,c){$AA.MoveAnimation.initializeBase(this,[h,g,f,null]);this._horizontal=a?a:0;this._vertical=b?b:0;this._relative=(d===undefined)?true:d;this._horizontalAnimation=new $AA.LengthAnimation(h,g,f,"style","left",null,null,c);this._verticalAnimation=new $AA.LengthAnimation(h,g,f,"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(g,f,d,b,a,c){$AA.ResizeAnimation.initializeBase(this,[g,f,d,null]);this._width=b;this._height=a;this._horizontalAnimation=new $AA.LengthAnimation(g,f,d,"style","width",null,null,c);this._verticalAnimation=new $AA.LengthAnimation(g,f,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(g,f,d,c,b,a,k,h){$AA.ScaleAnimation.initializeBase(this,[g,f,d]);this._scaleFactor=(c!==undefined)?c:1;this._unit=(b!==undefined)?b:"px";this._center=a;this._scaleFont=k;this._fontUnit=(h!==undefined)?h:"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(f,d,c,a,b){$AA.StyleAction.initializeBase(this,[f,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(f,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 g=0;g<d.length;g++){c[g]=d[g]}var a=this.saveClientState();if(a!=null&&!String.isInstanceOfType(a)){throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_InvalidClientStateType)}var h=Sys.Serialization.JavaScriptSerializer.serialize({name:f,args:c,state:this.saveClientState()});WebForm_DoCallback(this._callbackTarget,h,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 g=d.offsetParent||document.documentElement;var h;var k;if(this._parentElement){k=$common.getBounds(this._parentElement);var c=$common.getLocation(g);h={x:k.x-c.x,y:k.y-c.y}}else{k=$common.getBounds(g);h={x:0,y:0}}var f=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(k.width/2-f/2),y:Math.round(k.height/2-b/2)};break;case AjaxControlToolkit.PositioningMode.BottomLeft:a={x:0,y:k.height};break;case AjaxControlToolkit.PositioningMode.BottomRight:a={x:k.width-f,y:k.height};break;case AjaxControlToolkit.PositioningMode.TopLeft:a={x:0,y:-d.offsetHeight};break;case AjaxControlToolkit.PositioningMode.TopRight:a={x:k.width-f,y:-d.offsetHeight};break;default:a={x:0,y:0}}a.x+=this._x+h.x;a.y+=this._y+h.y;return new Sys.UI.Bounds(a.x,a.y,f,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 f=a.value;var c=f;if(this.get_isMultiWord()){var d=this._getCurrentWordStartIndex();var b=this._getCurrentWordEndIndex(d);if(b<=d){c=f.substring(d)}else{c=f.substring(d,b)}}return c},_getCursorIndex:function(){return this.get_element().selectionStart},_getCurrentWordStartIndex:function(){var d=this.get_element();var f=d.value.substring(0,this._getCursorIndex());var a=0;var g=-1;for(var c=0;c<this._delimiterCharacters.length;++c){var b=f.lastIndexOf(this._delimiterCharacters.charAt(c));if(b>g){g=b}}a=g;if(a>=this._getCursorIndex()){a=0}return a<0?0:a+1},_getCurrentWordEndIndex:function(a){var f=this.get_element();var g=f.value.substring(a);var b=0;for(var d=0;d<this._delimiterCharacters.length;++d){var c=g.indexOf(this._delimiterCharacters.charAt(d));if(c>0&&(c<b||b==0)){b=c}}return b<=0?f.value.length:b+a},get_isMultiWord:function(){return(this._delimiterCharacters!=null)&&(this._delimiterCharacters!="")},_getTextWithInsertedWord:function(f){var k=f;var l=0;var b=this.get_element();var a=b.value;if(this.get_isMultiWord()){var g=this._getCurrentWordStartIndex();var c=this._getCurrentWordEndIndex(g);var d="";var h="";if(g>0){d=a.substring(0,g)}if(c>g){h=a.substring(c)}k=d+f+h}return k},_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 f=$common.getBounds(d);var c=this._completionListElement.childNodes.length;if(((f.height*b)-(a.clientHeight+a.scrollTop))>=0){a.scrollTop+=(((f.height*b)-(a.clientHeight+a.scrollTop))+f.height)}if(((f.height*(c-(b+1)))-(a.scrollHeight-a.scrollTop))>=0){a.scrollTop-=(((f.height*(c-(b+1)))-(a.scrollHeight-a.scrollTop))+f.height)}if(a.scrollTop%f.height!==0){if(((f.height*(b+1))-(a.clientHeight+a.scrollTop))>=0){a.scrollTop-=(a.scrollTop%f.height)}else{a.scrollTop+=(f.height-(a.scrollTop%f.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(g,k,m){if(m&&this.get_enableCaching()){if(!this._cache){this._cache={}}this._cache[g]=k}if((!this._textBoxHasFocus)||(g!=this._currentCompletionWord())){this._hideCompletionList();return}if(k&&k.length){this._completionListElement.innerHTML="";this._selectIndex=-1;var o=null;var n=null;var l=null;for(var f=0;f<k.length;f++){var c=null;if(this._completionListElementID){c=document.createElement("div")}else{c=document.createElement("li")}if(o==null){o=c}try{var d=Sys.Serialization.JavaScriptSerializer.deserialize("("+k[f]+")");if(String.isInstanceOfType(d)){n=d;l=d}else{n=d?d.First:null;l=d?d.Second:null}}catch(h){n=k[f];l=k[f]}c.appendChild(document.createTextNode(this._getTextWithInsertedWord(n)));c._value=l;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)}this.raisePopulated(Sys.EventArgs.Empty);var a=new Sys.CancelEventArgs();this.raiseShowing(a);if(!a.get_cancel()){this.showPopup();if(this._firstRowSelected&&(o!=null)){this._highlightItem(o);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 f=a.value;var c=f;if(this.get_isMultiWord()){var d=this._getCurrentWordStartIndex();var b=this._getCurrentWordEndIndex(d);if(b<=d){c=f.substring(d)}else{c=f.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(g,l,n){if(n&&this.get_enableCaching()){if(!this._cache){this._cache={}}this._cache[g]=l}if((!this._textBoxHasFocus)||(g!=this._currentCompletionWord())){this._hideCompletionList();return}if(l&&l.length){this._completionListElement.innerHTML="";this._selectIndex=-1;var q=null;var p=null;var m=null;for(var f=0;f<l.length;f++){var c=null;if(this._completionListElementID){c=document.createElement("div")}else{c=document.createElement("li")}if(q==null){q=c}try{var d=Sys.Serialization.JavaScriptSerializer.deserialize("("+l[f]+")");if(d&&d.First){p=d.First;m=d.Second}else{p=d;m=d}}catch(h){p=l[f];m=l[f]}var o=this._showOnlyCurrentWordInCompletionListItem?p:this._getTextWithInsertedWord(p);c.appendChild(document.createTextNode(o));c._value=m;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 k=$common.getBounds(this.get_element());this._completionListElement.style.width=Math.max(1,k.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&&(q!=null)){this._highlightItem(q);this._selectIndex=0}}}else{this._hideCompletionList()}this._popupBehavior.get_element().className="quote_completionListElement"},_hideCompletionList:function(){this.hidePopup()},_getTextWithInsertedWord:function(f){var k=f;var l=0;var b=this.get_element();var a=b.value;if(this.get_isMultiWord()){var g=this._getCurrentWordStartIndex();var c=this._getCurrentWordEndIndex(g);var d="";var h="";if(g>0){d=a.substring(0,g)}if(c>g){h=a.substring(c)}k=d+f+h}return k},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 f=$common.getBounds(d);var c=this._completionListElement.childNodes.length;if(((f.height*b)-(a.clientHeight+a.scrollTop))>=0){a.scrollTop+=(((f.height*b)-(a.clientHeight+a.scrollTop))+f.height)}if(((f.height*(c-(b+1)))-(a.scrollHeight-a.scrollTop))>=0){a.scrollTop-=(((f.height*(c-(b+1)))-(a.scrollHeight-a.scrollTop))+f.height)}if(a.scrollTop%f.height!==0){if(((f.height*(b+1))-(a.clientHeight+a.scrollTop))>=0){a.scrollTop-=(a.scrollTop%f.height)}else{a.scrollTop+=(f.height-(a.scrollTop%f.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 g=c?c._text:null;this._timer.set_enabled(false);var a=this.get_element();var f=a.control;var d=c?c._value:null;if(d==null){d=b[this._selectIndex]._value}if(f&&f.set_text){f.set_text(d)}else{a.value=d}$common.tryFireEvent(a,"change");this.raiseItemSelected(new AjaxControlToolkit.AutoCompleteItemEventArgs(c,g,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 g,l=true;if(d.childNodes&&d.childNodes.length>0){l=false;g=this._createSubItemHeader(d.childNodes[0]._value,this._headerRowCssClass)}else{g=this._createSubItemHeader("",this._headerRowCssClass)}d.insertBefore(g,d.firstChild);if(l==false){d.removeChild(d.childNodes[1])}var c=d.childNodes.length;if(d.childNodes.length===1){this._hasSearchResult=false;var h=this._createSubItemMessage(this._noMatchFoundDtl,this._completionListItemCssClass);d.appendChild(h)}else{this._hasSearchResult=true;for(var f=1;f<c;f++){var m=d.childNodes[f];if(m&&m._value){var b=m._value.split("|");m._value=b[0];m._text=b[1];m.innerHTML="";this._createSubItem(m,b[0],b[1])}}if(this._showAllMatchesFoundLink===true){var k=this._createShowAllMatchesFoundLink();d.appendChild(k,d.lastChild)}}},_createSubItemMessage:function(c,a){var g=document.createElement("li"),b=document.createElement("ul"),d=document.createElement("li"),f=this._currentCompletionWord().toUpperCase();g._value="";d.className="floatLeft";d.innerHTML=c;b.appendChild(d);g.appendChild(b);if(a){g.className=a}return g},_getCurrentWordStartIndex:function(){var d=this.get_element();var f=d.value.substring(0,this._getCursorIndex());var a=0;var g=-1;for(var c=0;c<this._delimiterCharacters.length;++c){var b=f.lastIndexOf(this._delimiterCharacters.charAt(c));if(b>g){g=b}}a=g;if(a>=this._getCursorIndex()){a=0}return a<0?0:a+1},_getCurrentWordEndIndex:function(a){var f=this.get_element();var g=f.value.substring(a);var b=0;for(var d=0;d<this._delimiterCharacters.length;++d){var c=g.indexOf(this._delimiterCharacters.charAt(d));if(c>0&&(c<b||b==0)){b=c}}return b<=0?f.value.length:b+a},_createSubItemHeader:function(h,c){var f=document.createElement("li");f._value="";var g=document.createElement("ul");var b=document.createElement("li");b.className="floatLeft";b.innerHTML=h;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);g.appendChild(b);g.appendChild(a);f.appendChild(g);if(c){f.className=c}return f},_createSubItem:function(h,b,a){var d=document.createElement("ul"),f=document.createElement("li"),c=document.createElement("li"),g=this._currentCompletionWord().toUpperCase();if(b.indexOf(g)>-1){b=b.replace(g,"<strong>"+g+"</strong>")}else{a=a.replace(g,"<strong>"+g+"</strong>")}f.className=this._completionListItemFirstColumnCssClass;f.innerHTML=b;c.className=this._completionListItemSecondColumnCssClass;c.innerHTML=a;d.appendChild(f);d.appendChild(c);h.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 f=AjaxControlToolkit.TextBoxWrapper.get_Wrapper(this.get_element());if((""==b)||(this._watermarkText==b)){f.set_Watermark(this._watermarkText);f.set_IsWatermarked(true)}if(c){this._onFocus()}else{d.blur();this._onBlur()}this._clearedForSubmit=false;this.registerPartialUpdateEvents();this._watermarkChangedHandler=Function.createDelegate(this,this._onWatermarkChanged);f.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(f,c,b,d,a,g){return this._invoke(MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService.get_path(),"GetACSymbolLookUp",false,{prefixText:f,count:c,contextKey:b},d,a,g)},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,f,a,g){MD.TotalMerrill.MarketDataWidgetsPage.AutoCompleteSymbolUIService._staticInstance.GetACSymbolLookUp(d,c,b,f,a,g)};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"}}var SearchWidgetLibrary=new Object();var objSearchWidgetLibrary=null;SearchWidgetLibrary.Framework=function(){this.type="General"};SearchWidgetLibrary.Framework.prototype={onsearchclick1:function(b,a){var c;var k=document.getElementById(b);var g=k.value;var h=document.getElementById(a);if(g==null||g==""||g=="Search"){alert("Please enter a search term");return false}else{if(objSearchWidgetLibrary.checkSpecialCharacters2(g,"search")){var f=new RegExp("[&]","g");g=g.replace(f,"||");var d=new RegExp("[']","g");g=g.replace(d,"~~");c=g+"&filter=all";h=h+encodeURI(c);if(document.getElementById(a)!=null){window.location.href=h}}return false}},onsearchclick2:function(d,g,k){var m;var n=document.getElementById(d);var h=n.value;var f=document.getElementById(k).selectedIndex;var a=document.getElementById(k).options[f].value;var l=document.getElementById(g);if(h==null||h==""||h=="Search"){alert("Please enter a search term");return false}else{if(objSearchWidgetLibrary.checkSpecialCharacters2(h,"search")){var b=new RegExp("[&]","g");h=h.replace(b,"||");var c=new RegExp("[']","g");h=h.replace(c,"~~");m=h+"&filter="+a;l=l+encodeURI(m);if(document.getElementById(g)!=null){window.location.href=l}}return false}},checkSpecialCharacters2:function(a,l){var h;h="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var g=" $*&?%\"().,-~'";var f="`!@^_{[}]/:;+=<>#|";var b=false;var d=false;var k=false;for(var c=0;c<a.length;c++){if(h.indexOf(a.substring(c,c+1))!=-1){b=true}else{if(g.indexOf(a.substring(c,c+1))!=-1){d=true}else{if(f.indexOf(a.substring(c,c+1))!=-1){k=true}}}}if(k==true||(a.length==1&&d==true)||b==false){alert(l+" contains invalid characters. Please re-enter the "+l+".");return false}return true},fnTrapKD2:function(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()}}}}},clearText2:function(a){if(a.value=="Search"){a.value=""}},highlightNav:function(){return}};objSearchWidgetLibrary=new SearchWidgetLibrary.Framework();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,d,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,d,gFastSearchLibrary.OnAutoCompleteServiceSuccess,gFastSearchLibrary.OnError,gFastSearchLibrary.OnTimeOut)}}},OnAutoCompleteServiceSuccess:function(c){var g;var f;var b=true;var d;var a;if(!c){return false}if(c.length<1){return false}g=gstrAutoCompleteUIStart;for(f=0;f<c.length;f++){g=g+gStrAutoCompleteRowStart.replace(gFastobjIDs.GetAutocompletelistID,gFastobjIDs.GetAutocompletelistID+f);g=g+c[f]+gstrSpanEnd+gStrAutoCompleteRowEnd}gIntAutoCompleteLastRow=f;gIntAutocompleteSelectedRow=-1;g=g+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=g;document.getElementsByTagName("BODY")[0].appendChild(d)},OnTimeOut:function(a){alert("TimeOut encountered when callin fast web service.")},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){}},OnAutoCompleteServiceSuccess:function(c){var g;var f;var b=true;var d;var a;if(!c){return false}if(c.length<1){return false}g=gstrAutoCompleteUIStart;for(f=0;f<c.length;f++){g=g+gStrAutoCompleteRowStart.replace(gFastobjIDs.GetAutocompletelistID,gFastobjIDs.GetAutocompletelistID+f);g=g+c[f]+gstrSpanEnd+gStrAutoCompleteRowEnd}gIntAutoCompleteLastRow=f;gIntAutocompleteSelectedRow=-1;g=g+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=g;document.getElementsByTagName("BODY")[0].appendChild(d)},OnTimeOut:function(a){alert("TimeOut encountered when callin fast web service.")},OnError:function(a){}};gFastSearchLibrary=new FastSearchLibrary.Framework();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(f,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={_get_path:function(){var a=this.get_path();if(a){return a}else{return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.get_path()}},RetrieveContactUsControlData:function(a,c,b,d){return this._invoke(this._get_path(),"RetrieveContactUsControlData",false,{strControlID:a},c,b,d)},RetrieveUnsupportedBrowserControlContent:function(b,a,c){return this._invoke(this._get_path(),"RetrieveUnsupportedBrowserControlContent",false,{},b,a,c)},RetrieveDecryptedServerName:function(a,c,b,d){return this._invoke(this._get_path(),"RetrieveDecryptedServerName",false,{cryptedServerName:a},c,b,d)},GetPageHistoryFromStack:function(b,a,c){return this._invoke(this._get_path(),"GetPageHistoryFromStack",false,{},b,a,c)}};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){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.set_path(a)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_path=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.get_path()};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_timeout=function(a){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.set_timeout(a)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_timeout=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.get_timeout()};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_defaultUserContext=function(a){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.set_defaultUserContext(a)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_defaultUserContext=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.get_defaultUserContext()};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_defaultSucceededCallback=function(a){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.set_defaultSucceededCallback(a)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_defaultSucceededCallback=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.get_defaultSucceededCallback()};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.set_defaultFailedCallback=function(a){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.set_defaultFailedCallback(a)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.get_defaultFailedCallback=function(){return MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.get_defaultFailedCallback()};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.RetrieveUnsupportedBrowserControlContent=function(b,a,c){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.RetrieveUnsupportedBrowserControlContent(b,a,c)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.RetrieveDecryptedServerName=function(a,c,b,d){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.RetrieveDecryptedServerName(a,c,b,d)};MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.GetPageHistoryFromStack=function(b,a,c){MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService._staticInstance.GetPageHistoryFromStack(b,a,c)};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,f,b,a,d){return this._invoke(MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper.get_path(),"FaportalGetFASTCompletionList",false,{prefixText:c,QCServerPort:f},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,f,c,a,d){MerrillLynch.Application.Online.OSE.UI.UIServices.AutoCompleteWebServiceWrapper._staticInstance.FaportalGetFASTCompletionList(b,f,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 f in a){var d=Object.toJSON(a[f]);if(d!==undefined){b.push(f.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(f){}}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(f,c){var a="",d=this,b;c=arguments.callee.prepareReplacement(c);while(d.length>0){if(b=d.match(f)){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(f,g){if((g=g.split("="))[0]){var c=decodeURIComponent(g.shift());var d=g.length>1?g.join("="):g[0];if(d!=undefined){d=decodeURIComponent(d)}if(c in f){if(f[c].constructor!=Array){f[c]=[f[c]]}f[c].push(d)}else{f[c]=d}}return f})},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=[],f=this.toArray();while((a+=c)<f.length){d.push(f.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(g,f){var d=g.toString();if(d.match(c)){a.push((b||Prototype.K)(g,f))}});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(f,d){((c||Prototype.K)(f,d)?b:a).push(f)});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(g,f){var d=g.criteria,c=f.criteria;return d<c?-1:d>c?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(f,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 f=[];for(var b=0,c=this.length;b<c;b++){f.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++){f.push(arguments[b][a])}}else{f.push(arguments[b])}}return f}}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(f){a.add(d.key,f)})}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 f=[b,d];f.key=b;f.value=d;c(f)}}}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(f){if(typeof f[d]=="function"){try{f[d].apply(f,[b,c,a])}catch(g){}}})}};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 f={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){f["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){f.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){f[c[b]]=c[b+1]}}else{$H(c).each(function(g){f[g.key]=g.value})}}for(var a in f){this.transport.setRequestHeader(a,f[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 g=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)(g,b)}catch(d){this.dispatchException(d)}var f=this.getHeader("Content-type");if(f&&f.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){this.evalResponse()}}try{(this.options["on"+c]||Prototype.emptyFunction)(g,b);Ajax.Responders.dispatch("on"+c,this,g,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(g,f){this.updateContent();d(g,f)}).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(g,a){var c=[];var f=document.evaluate(g,$(a)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,d=f.snapshotLength;b<d;b++){c.push(f.snapshotItem(b))}return c};document.getElementsByClassName=function(b,a){var c=".//*[contains(concat(' ', @class, ' '), ' "+b+" ')]";return document._getElementsByXPath(c,a)}}else{document.getElementsByClassName=function(h,l){var d=($(l)||document.body).getElementsByTagName("*");var a=[],b,g=new RegExp("(^|\\s)"+h+"(\\s|$)");for(var f=0,c=d.length;f<c;f++){b=d[f];var k=b.className;if(k.length==0){continue}if(k==h||k.match(g)){a.push(Element.extend(b))}}return a}}if(!window.Element){var Element={}}Element.extend=function(f){var g=Prototype.BrowserFeatures;if(!f||!f.tagName||f.nodeType==3||f._extended||g.SpecificElementExtensions||f==window){return f}var b={},d=f.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 k in b){var h=b[k];if(typeof h=="function"&&!(k in f)){f[k]=a.findOrStore(h)}}f._extended=Prototype.emptyFunction;return f};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(g){var f=g.first(),c=g.last();var d=(b[f]||"").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 f=a.style;for(var d in c){if(d=="opacity"){a.setOpacity(c[d])}else{f[(d=="float"||d=="cssFloat")?(f.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 h=$(c).getStyle("display");if(h!="none"&&h!=null){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var g=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var k=c.clientWidth;var f=c.clientHeight;b.display=a;b.position=d;b.visibility=g;return{width:k,height:f}},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(f){c.removeChild(f)});depth.times(function(){d=d.firstChild});$A(d.childNodes).each(function(f){c.appendChild(f)})}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 k=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(m){m=m.toUpperCase();if(!Element.Methods.ByTag[m]){Element.Methods.ByTag[m]={}}Object.extend(Element.Methods.ByTag[m],c)}function a(p,n,m){m=m||false;var o=Element.extend.cache;for(var r in p){var q=p[r];if(!m||!(r in n)){n[r]=o.findOrStore(q)}}}function f(o){var m;var n={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(n[o]){m="HTML"+n[o]+"Element"}if(window[m]){return window[m]}m="HTML"+o+"Element";if(window[m]){return window[m]}m="HTML"+o.capitalize()+"Element";if(window[m]){return window[m]}window[m]={};window[m].prototype=document.createElement(o).__proto__;return window[m]}if(k.ElementExtensions){a(Element.Methods,HTMLElement.prototype);a(Element.Methods.Simulated,HTMLElement.prototype,true)}if(k.SpecificElementExtensions){for(var l in Element.Methods.ByTag){var g=f(l);if(typeof g=="undefined"){continue}a(d[l],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 f=this.expression,g=Selector.patterns,b=Selector.xpath,d,a;if(Selector._cache[f]){this.xpath=Selector._cache[f];return}this.matcher=[".//*"];while(f&&d!=f&&(/\S/).test(f)){d=f;for(var c in g){if(a=f.match(g[c])){this.matcher.push(typeof b[c]=="function"?b[c](a):new Template(b[c]).evaluate(a));f=f.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 k=b[6],h=Selector.patterns,a=Selector.xpath,f,b,c;var g=[];while(k&&f!=k&&(/\S/).test(k)){f=k;for(var d in h){if(b=k.match(h[d])){c=typeof a[d]=="function"?a[d](b):new Template(a[d]).evaluate(b);g.push("("+c.substring(1,c.length-1)+")");k=k.replace(b[0],"");break}}}return"[not("+g.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(h,f){var k,l=f[6],d;if(l=="even"){l="2n+0"}if(l=="odd"){l="2n+1"}if(k=l.match(/^(\d+)$/)){return"["+h+"= "+k[1]+"]"}if(k=l.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(k[1]=="-"){k[1]=-1}var g=k[1]?Number(k[1]):1;var c=k[2]?Number(k[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:h,a:g,b:c})}}}},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(d,c){for(var f=0,g;g=c[f];f++){d.push(g)}return d},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,g){a._counted=true;if(d){for(var b=a.childNodes,f=b.length-1,c=1;f>=0;f--){node=b[f];if(node.nodeType==1&&(!g||node._counted)){node.nodeIndex=c++}}}else{for(var f=0,c=1,b=a.childNodes;node=b[f];f++){if(node.nodeType==1&&(!g||node._counted)){node.nodeIndex=c++}}}},unique:function(b){if(b.length==0){return b}var d=[],f;for(var c=0,a=b.length;c<a;c++){if(!(f=b[c])._counted){f._counted=true;d.push(Element.extend(f))}}return Selector.handlers.unmark(d)},descendant:function(a){var d=Selector.handlers;for(var c=0,b=[],f;f=a[c];c++){d.concat(b,f.getElementsByTagName("*"))}return b},child:function(a){var g=Selector.handlers;for(var f=0,d=[],k;k=a[f];f++){for(var b=0,c=[],l;l=k.childNodes[b];b++){if(l.nodeType==1&&l.tagName!="!"){d.push(l)}}}return d},adjacent:function(a){for(var c=0,b=[],f;f=a[c];c++){var d=this.nextElementSibling(f);if(d){b.push(d)}}return b},laterSibling:function(a){var d=Selector.handlers;for(var c=0,b=[],f;f=a[c];c++){d.concat(b,Element.nextSiblings(f))}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,f,l){f=f.toUpperCase();var d=[],g=Selector.handlers;if(b){if(l){if(l=="descendant"){for(var c=0,k;k=b[c];c++){g.concat(d,k.getElementsByTagName(f))}return d}else{b=this[l](b)}if(f=="*"){return b}}for(var c=0,k;k=b[c];c++){if(k.tagName.toUpperCase()==f){d.push(k)}}return d}else{return a.getElementsByTagName(f)}},id:function(b,a,l,g){var k=$(l),d=Selector.handlers;if(!b&&a==document){return k?[k]:[]}if(b){if(g){if(g=="child"){for(var c=0,f;f=b[c];c++){if(k.parentNode==f){return[k]}}}else{if(g=="descendant"){for(var c=0,f;f=b[c];c++){if(Element.descendantOf(k,f)){return[k]}}}else{if(g=="adjacent"){for(var c=0,f;f=b[c];c++){if(Selector.handlers.previousElementSibling(k)==f){return[k]}}}else{b=d[g](b)}}}}for(var c=0,f;f=b[c];c++){if(f==k){return[k]}}return[]}return(k&&Element.descendantOf(k,a))?[k]:[]},className:function(b,a,c,d){if(b&&d){b=this[d](b)}return Selector.handlers.byClassName(b,a,c)},byClassName:function(c,b,g){if(!c){c=Selector.handlers.descendant([b])}var k=" "+g+" ";for(var f=0,d=[],h,a;h=c[f];f++){a=h.className;if(a.length==0){continue}if(a==g||(" "+a+" ").include(k)){d.push(h)}}return d},attrPresence:function(c,b,a){var f=[];for(var d=0,g;g=c[d];d++){if(Element.hasAttribute(g,a)){f.push(g)}}return f},attr:function(a,k,h,l,b){if(!a){a=k.getElementsByTagName("*")}var m=Selector.operators[b],d=[];for(var f=0,c;c=a[f];f++){var g=Element.readAttribute(c,h);if(g===null){continue}if(m(g,l)){d.push(c)}}return d},pseudo:function(b,c,f,a,d){if(b&&d){b=this[d](b)}if(!b){b=a.getElementsByTagName("*")}return Selector.pseudos[c](b,f,a)}},pseudos:{"first-child":function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(Selector.handlers.previousElementSibling(f)){continue}c.push(f)}return c},"last-child":function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(Selector.handlers.nextElementSibling(f)){continue}c.push(f)}return c},"only-child":function(b,k,a){var f=Selector.handlers;for(var d=0,c=[],g;g=b[d];d++){if(!f.previousElementSibling(g)&&!f.nextElementSibling(g)){c.push(g)}}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(d,c,f){if(d==0){return c>0?[c]:[]}return $R(1,f).inject([],function(a,b){if(0==(b-c)%d&&(b-c)/d>=0){a.push(b)}return a})},nth:function(c,t,v,s,f){if(c.length==0){return[]}if(t=="even"){t="2n+0"}if(t=="odd"){t="2n+1"}var r=Selector.handlers,q=[],d=[],k;r.mark(c);for(var p=0,g;g=c[p];p++){if(!g.parentNode._counted){r.index(g.parentNode,s,f);d.push(g.parentNode)}}if(t.match(/^\d+$/)){t=Number(t);for(var p=0,g;g=c[p];p++){if(g.nodeIndex==t){q.push(g)}}}else{if(k=t.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(k[1]=="-"){k[1]=-1}var w=k[1]?Number(k[1]):1;var u=k[2]?Number(k[2]):0;var x=Selector.pseudos.getIndices(w,u,c.length);for(var p=0,g,n=x.length;g=c[p];p++){for(var o=0;o<n;o++){if(g.nodeIndex==x[o]){q.push(g)}}}}}r.unmark(c);r.unmark(d);return q},empty:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.tagName=="!"||(f.firstChild&&!f.innerHTML.match(/^\s*$/))){continue}c.push(f)}return c},not:function(a,d,n){var k=Selector.handlers,o,c;var l=new Selector(d).findElements(n);k.mark(l);for(var g=0,f=[],b;b=a[g];g++){if(!b._counted){f.push(b)}}k.unmark(l);return f},enabled:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(!f.disabled){c.push(f)}}return c},disabled:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.disabled){c.push(f)}}return c},checked:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.checked){c.push(f)}}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(g,k){var f=new Selector(k).findElements(),d=Selector.handlers;d.mark(f);for(var c=0,b=[],a;a=g[c];c++){if(a._counted){b.push(a)}}d.unmark(f);return b},findElement:function(b,c,a){if(typeof c=="number"){a=c;c=false}return Selector.matchElements(b,c||"*")[a||0]},findChildElements:function(f,k){var m=k.join(","),k=[];m.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(h){k.push(h[1].strip())});var d=[],g=Selector.handlers;for(var c=0,b=k.length,a;c<b;c++){a=new Selector(k[c].strip());g.concat(d,a.findElements(f))}return(b>1)?g.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,g){if(!g.disabled&&g.name){var f=g.name,h=$(g).getValue();if(h!=null){if(f in d){if(d[f].constructor!=Array){d[f]=[d[f]]}d[f].push(h)}else{d[f]=h}}}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(h,c,d){h=$(h);var a=h.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var f=0,k=[],g=a.length;f<g;f++){var b=a[f];if((c&&b.type!=c)||(d&&b.name!=d)){continue}k.push(Element.extend(b))}return k},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,f=d.length;if(!f){return null}for(var c=0,a=[];c<f;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(f){}}}}});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,f){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);f=$(f);var g=[0,0];var b=null;if(Element.getStyle(f,"position")=="absolute"){b=Position.offsetParent(f);g=Position.page(b)}if(b==document.body){g[0]-=document.body.offsetLeft;g[1]-=document.body.offsetTop}if(a.setLeft){f.style.left=(d[0]-g[0]+a.offsetLeft)+"px"}if(a.setTop){f.style.top=(d[1]-g[1]+a.offsetTop)+"px"}if(a.setWidth){f.style.width=c.offsetWidth+"px"}if(a.setHeight){f.style.height=c.offsetHeight+"px"}},absolutize:function(b){b=$(b);if(b.style.position=="absolute"){return}Position.prepare();var d=Position.positionedOffset(b);var g=d[1];var f=d[0];var c=b.clientWidth;var a=b.clientHeight;b._originalLeft=f-parseFloat(b.style.left||0);b._originalTop=g-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position="absolute";b.style.top=g+"px";b.style.left=f+"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 gStateSelectorPageList=["SMOKETEST","JUSTSTARTINGOUT","INVEST","CDS","MONEY-MARKETS"];var _eventList=["gObjMLOSEJsLibrary.RedirectOnCloseModal"];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;var hlBackToClientId="";MLOSEJsLibrary.Framework.prototype={LogError:function(b,a){var f=0;var c="";try{f=b.get_statusCode();c=b.get_message()}catch(d){f=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 g;var c;var f;var d;try{a=a.toUpperCase();if(window.location.search&&window.location.search.length>0&&window.location.search.toUpperCase().indexOf(a,0)>-1){f=window.location.search.toUpperCase();g=f.indexOf(a,0)+a.length+1;if(f.indexOf("&",0)>-1){c=f.indexOf("&",0)}else{c=f.length}d=f.substring(g,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(f,b,a){var d="";try{d=b;if(f=="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 h=document.getElementsByTagName("A");if(h.length>0){for(var g=0;g<h.length;g++){var f=h[g].href.toUpperCase().indexOf("/OR/");var c=h[g].href.toUpperCase().indexOf("VOID(0)");var b=h[g].href.toUpperCase().indexOf("SEARCHRESULTS.ASPX");var a=h[g].href.toUpperCase().indexOf("?SRC_CD");if(f>-1){if(b>-1){if(a==-1){h[g].href=h[g].href.replace("?k=",gObjMLOSEJsLibrary.addTacticFromSPC())+"&k="}}else{if(f>-1&&a==-1&&c==-1){h[g].href=h[g].href+gObjMLOSEJsLibrary.addTacticFromSPC()}}}}}}catch(d){}},RedirectOnCloseModal:function(b){var a="/m/pages/home.aspx";var c=null;if(b){c=b.target||b.srcElement;if(c!=null){c.href=unescape(a)}}},Initialize:function(){try{var a;a=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1).split(".")[0];for(var c=0;c<gStateSelectorPageList.length;c++){if(a.toUpperCase()==gStateSelectorPageList[c]){gObjMLOSEJsLibrary.CheckCookieForRegionSelector("/m/system/RegionSelection.aspx?redirectTo="+window.location.pathname.toLowerCase(),"Where do you bank?",140,320,true,this,_eventList)}}gObjMLOSEJsLibrary.NormalizeLinksToTriage();gObjMLOSEJsLibrary.SetPxName();gObjMLOSEJsLibrary.SuppressTextChatLink()}catch(b){}},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 m=null;var k=null;var c=null;var f=new Array();var a=new Array();var d=null;var l=null;m=gObjMLOSEJsLibrary.loadXMLDoc(gObjMLOSEJsNavigationMenu.MnuNavigationXmlPath);try{if(m){if(m.evaluate!="undefined"&&m.evaluate!=null){l=m.evaluate("//MenuItems/MenuItem/MenuItem/MenuItem",m,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0;b<l.snapshotLength;b++){k=l.snapshotItem(b).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(l.snapshotItem(b).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];c=l.snapshotItem(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);gObjMLOSEJsLibrary.mnuLevel3[k]=c}d=m.evaluate("//*[@isJsHeader='true']",m,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var h=0;h<d.snapshotLength;h++){k=d.snapshotItem(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(d.snapshotItem(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];c=d.snapshotItem(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);f[k]=c}}else{l=m.selectNodes("//MenuItems/MenuItem/MenuItem/MenuItem");for(var b=0;b<l.length;b++){k=l.item(b).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(l.item(b).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];c=l.item(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);gObjMLOSEJsLibrary.mnuLevel3[k]=c}d=m.selectNodes("//*[@isJsHeader='true']");for(var h=0;h<d.length;h++){k=d.item(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).substring(d.item(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuPageHref).lastIndexOf("/")+1).split(".")[0];c=d.item(h).getAttribute(gObjMLOSEJsNavigationMenu.MnuHeaderText);f[k]=c}}}}catch(g){gObjMLOSEJsLibrary.LogError(g,"CreateMnuTitleArray")}return f},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 f=new Date(2010,6,19);var b=new Date();try{if(b>=a&&b<=f){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 f=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++){f=document.getElementById(objAnchr[d].id).getAttribute("pxname");gObjMLOSEJsLibrary.setPxName_Rec(document.getElementById(objAnchr[d].id),f)}}}}catch(c){gObjMLOSEJsLibrary.LogError(c,"SetPxName")}},setPxName_Rec:function(d,f){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",f);if(document.getElementById(c[a].id).childNodes.length>0){gObjMLOSEJsLibrary.setPxName_Rec(document.getElementById(c[a].id),f)}}else{break}}}catch(b){gObjMLOSEJsLibrary.LogError(b,"SetPxName")}return false},CreateTextChatSuppressLnkLst:function(){var f=null;var b=null;var g=new Array();var d=new Array();f=gObjMLOSEJsLibrary.loadXMLDoc("/publish/OSE/XML/MLTextChat.xml");try{if(f){if(f.evaluate!="undefined"&&f.evaluate!=null){g=f.evaluate("//*[@suppressTextChatLink='true']",f,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var a=0;a<g.snapshotLength;a++){b=g.snapshotItem(a).getAttribute("id");d[b]=b}}else{g=f.selectNodes("//*[@suppressTextChatLink='true']");for(var a=0;a<g.length;a++){b=g.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+"&sgt=6"}},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")}},SetDisc:function(b){try{gObjMLOSEJsLibrary.GetDisclaimerContent(b)}catch(a){gObjMLOSEJsLibrary.LogError(a,"SetDisc")}},GetDisclaimerContent:function(c){var a=$find("ctl00_cctlDisclosures");try{if(null!=a){a.setRuntimeXMLParameters(gObjMLOSEJsLibrary.GetRuntimeDisclaimerSpecz(c));a.GetContent(gObjMLOSEJsLibrary.ShowContent);a.LoadContent()}}catch(b){gObjMLOSEJsLibrary.LogError(b,"GetDisclaimerContent")}},ShowContent:function(a){},GetRuntimeDisclaimerSpecz:function(c){var b="";try{b+="<specializations>";b+='<specialization name="DISC_ID" type="passed_in">';b+='<spec_param name="DISC_ID">';b+='<spec_value name="DISC_ID">';b+=c;b+="</spec_value>";b+="</spec_param>";b+="</specialization>";b+="</specializations>";return b}catch(a){gObjMLOSEJsLibrary.LogError(a,"GetRuntimeDisclaimerSpecz")}},SendCryptedKey:function(a){var b;try{b=document.getElementById(a).value;MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.RetrieveDecryptedServerName(b,gObjMLOSEJsLibrary.SuccessfulRetrieval,gObjMLOSEJsLibrary.OnFailWebService)}catch(c){gObjMLOSEJsLibrary.LogError(c,"SendCryptedKey")}},CheckSelectedRegion:function(){try{var a=document.getElementsByTagName("select");if(a.length>0){if(a[0].selectedIndex==0){alert("Please select your state");return false}}}catch(b){gObjMLOSEJsLibrary.LogError(b,"CheckSelectedRegion")}},NavigatePostRegionSelection:function(){try{parent.document.getElementById("pgms").style.display="none";parent.document.getElementById("mppbmpExt").style.display="none";parent.window.location.href=unescape(window.location.href.substring(window.location.href.indexOf("redirectTo=")+11))}catch(a){gObjMLOSEJsLibrary.LogError(a,"NavigatePostRegionSelection")}},CheckCookieForRegionSelector:function(g,f,d,a,k,c,h){try{c.href="#";if(gObjMLOSEJsLibrary.readCookie(STATE_DESC_COOKIE)==null||gObjMLOSEJsLibrary.readCookie(STATE_REGION_COOKIE)==null||gObjMLOSEJsLibrary.readCookie(STATE_REGION_CODE_COOKIE)==null||gObjMLOSEJsLibrary.readCookie(STATE_ABBREVIATION_COOKIE)==null){OnlineCommonJSFunctions.LoadModalPopupByUrl(g,f,d,a,k,h)}else{if(c){c.href=unescape(g.substring(g.indexOf("redirectTo=")+11))}}}catch(b){}},readCookie:function(b){var f=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var g=a[d];while(g.charAt(0)==" "){g=g.substring(1,g.length)}if(g.indexOf(f)==0){return g.substring(f.length,g.length)}}return null},SuccessfulRetrieval:function(a){if(a||a!=""){alert("Current Server requested: "+a)}},GetPageHistoryFromStack:function(b){try{if(!b){var b=window.event}if(b.target){targ=b.target}else{if(b.srcElement){targ=b.srcElement}}if(targ.nodeType==3){targ=targ.parentNode}hlBackToClientId=targ.parentNode;MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.GetPageHistoryFromStack(gObjMLOSEJsLibrary.OnSuccessGetPageHistoryFromStack,gObjMLOSEJsLibrary.OnFailedGetPageHistoryFromStack);return false}catch(a){gObjMLOSEJsLibrary.LogError(a,"GetPageHistoryFromStack")}},GetPageHistoryFireFox:function(b){try{if(!b){var b=window.event}if(b.target){targ=b.target}else{if(b.srcElement){targ=b.srcElement}}if(targ.nodeType==3){targ=targ.parentNode}hlBackToClientId=targ;MerrillLynch.Application.Online.OSE.UI.UIServices.OnlineSalesUIService.GetPageHistoryFromStack(gObjMLOSEJsLibrary.OnSuccessGetPageHistoryFromStack,gObjMLOSEJsLibrary.OnFailedGetPageHistoryFromStack);return false}catch(a){gObjMLOSEJsLibrary.LogError(a,"GetPageHistoryFireFox")}},OnSuccessGetPageHistoryFromStack:function(a){window.location.href=hlBackToClientId.href},OnFailedGetPageHistoryFromStack:function(a){gObjMLOSEJsLibrary.LogError(a,"OnFailedGetPageHistoryFromStack");var b=hlBackToClientId;b.disabled=true},SetMobileCookie:function(){var f="";var a="MobileCookie";var d=true;var g=30;var c=null;try{f=a+"="+escape(d);c=new Date();if(g&&typeof g!="undefined"){c.setDate(c.getDate()+g)}f+="; expires="+c.toGMTString();f+="; path=/";document.cookie=f}catch(b){}}};var STATE_DESC_COOKIE="StateName";var STATE_REGION_COOKIE="RegionName";var STATE_REGION_CODE_COOKIE="RegionCode";var STATE_ABBREVIATION_COOKIE="StateAbbreviation";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 f=0;try{if(c){var d=OnlineCommonJSFunctions.getClientBounds();var a=(d.width-c.offsetWidth)/2;var f=(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){f=(scrollTop+f)}if(scrollLeft){a=(scrollLeft+a)}if(f+c.offsetHeight>=document.body.offsetHeight){f=f-c.offsetHeight}f=f>0?f:0;a=a>0?a:0}}catch(b){gObjMLOSEJsLibrary.LogError(b,"setCenterPosition")}return{top:f,left:a}},GetModalPopup:function(){return OnlineCommonJSFunctions.createModalPopup("mppbmpExt","modal",document.getElementsByTagName("BODY")[0])},Normalize:function(a){return(parseInt(a.toString().replace("px",""))+"px")},AddEventListener:function(element,event_name,observer,capturing){if(element.addEventListener){element.addEventListener(event_name,eval(observer),capturing)}else{if(element.attachEvent){element.attachEvent("on"+event_name,eval(observer))}}},AttachEventOnCloseModal:function(a){var c=document.getElementById("ancrClose");for(var b=0;b<a.length;b++){OnlineCommonJSFunctions.AddEventListener(c,"click",a[b],false)}},LoadModalPopupByUrl:function(h,g,f,a,k,d){var b=null;try{b=OnlineCommonJSFunctions.GetModalPopup();if(b){if(f){OnlineCommonJSFunctions.set_Height(b,OnlineCommonJSFunctions.Normalize(f))}if(a){OnlineCommonJSFunctions.set_Width(b,OnlineCommonJSFunctions.Normalize(a))}if(g){OnlineCommonJSFunctions.set_Title(g)}if(k==false){OnlineCommonJSFunctions.set_ShowHeader(k)}if(typeof(d)!="undefined"){OnlineCommonJSFunctions.AttachEventOnCloseModal(d)}OnlineCommonJSFunctions.set_URL(h);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,k,c,f,d){var l;var g;try{l=document.getElementById(b);g=document.getElementById(a);if(l&&g){f=parseInt(f.toString().replace("px",""));d=parseInt(d.toString().replace("px",""));if(g.className=="collapsed"){l.style.visibility="hidden";l.style.display="block";if(endHeight[l.id]==null){endHeight[l.id]=l.offsetHeight-d}if(startHeight[l.id]==null){startHeight[l.id]=l.offsetHeight-f}l.style.visibility="visible";l.style.display="none"}else{if(endHeight[l.id]==null){endHeight[l.id]=l.offsetHeight-d}if(startHeight[l.id]==null){startHeight[l.id]=l.offsetHeight-f}}if(g.className=="collapsed"){_slide[l.id]=g.onclick;g.onclick=null;l.style.height=d+"px";gObjShowHideAccordionInterval[l.id]=setInterval("OnlineCommonJSFunctions.ShowAccordion('"+b+"','"+a+"',"+endHeight[l.id]+");",2)}else{_slide[l.id]=g.onclick;g.onclick=null;f=0;l.style.height=l.offsetHeight+"px";gObjShowHideAccordionInterval[l.id]=setInterval("OnlineCommonJSFunctions.HideAccordion('"+b+"','"+a+"',"+f+");",2)}}}catch(h){gObjMLOSEJsLibrary.LogError(h,"ShowHideCSContentModule")}},ShowAccordion:function(f,h,g){var d;var c;var a;try{d=document.getElementById(f);c=document.getElementById(h);if(d&&c){a=d.style.height.replace("px","")*1;a=a+10;if(a<g){d.style.height=a.toString()+"px";d.style.display="block";d.style.overflow="hidden"}else{d.style.height=g.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(g,h,f){var d;var c;var a;try{d=document.getElementById(g);c=document.getElementById(h);if(d&&c){a=d.style.height.replace("px","")*1;a=a-10;if(a>f){d.style.height=a.toString()+"px";d.style.overflow="hidden"}else{d.style.height=f.toString()+"px";d.style.display="none";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,k,l){var f;var c;var n;var m;var g;try{var a=OnlineCommonJSFunctions.getClientBounds();f=window.parent.document.getElementById(gStrModalPopupID);c=window.parent.document.getElementById(gStrModalPopupHeadID);n=window.parent.document.getElementById(gStrModalPopupBodyID);m=window.parent.document.getElementById(gStrModalPopupFrameID);g=c.offsetHeight;b=parseInt(b.toString().replace("px",""))-g;n.style.height=b+"px";m.style.height=b+"px";f.style.height=(g+n.offsetHeight)+"px";OnlineCommonJSFunctions.setCenterPosition(window.parent.document.getElementById(gStrModalPopupID));if(document.getElementById("pgms")){document.getElementById("pgms").style.height=a.height}}catch(h){gObjMLOSEJsLibrary.LogError(h,"refreshHeight")}},_getIframe:function(){return window.parent.document.getElementById(gStrModalPopupFrameID)},set_RepositionOnScroll:function(a){gBlnRepositionOnScroll=a}};try{Element.addMethods(globalMEProto)}catch(e){}var PRNHelper=PRNHelper?PRNHelper:{tempResult:"",tempDebugRes:"",tempDebugReq:"",initialize:function(){try{var d="NoParam";PRNHelper.tempResult=PRNHelper.getWSResult("Initialize",d);PRNHelper.tempDebugRes=PRNHelper.tempResult;PRNHelper.openDebugWin("initialize")}catch(c){}return PRNHelper.tempResult},openDebugWin:function(l){var n=window.location.search.substring(1);var m=n.split("&");for(var g=0;g<m.length;g++){var k=m[g].split("=");if(k[0]=="debug"){var h=window.open("","VisualCalc","width=600,height=600,scrollbars=yes,resizable=yes,toolbar=no,menubar=no");h.document.write("<Title>Visual Calc Debugging</Title>");h.document.write("</br><b>"+l+" Request: </b></br>");PRNHelper.tempDebugReq=PRNHelper.tempDebugReq.replace(/</g,"&lt;").replace(/>/g,"&gt;");h.document.write(PRNHelper.tempDebugReq);h.document.write("</br></br>");h.document.write("<b>"+l+" Response: </b></br>");PRNHelper.tempDebugRes=PRNHelper.tempDebugRes.replace(/</g,"&lt;").replace(/>/g,"&gt;");h.document.write(PRNHelper.tempDebugRes)}}},logErrorInfo:function(d){try{PRNHelper.tempResult=PRNHelper.getWSResult("logErrorInfo",d)}catch(c){}},escaped_one_to_xml_special_map:{"&amp;":"&","&quot;":'"',"&lt;":"<","&gt;":">"},decodeXml:function(b){return b.replace(/(&quot;|&lt;|&gt;|&amp;)/g,function(d,a){return PRNHelper.escaped_one_to_xml_special_map[a]})},getConfigurationPathXML:function(){try{var d="NoParam";if(typeof(SPC.Tactic)!="undefined"||SPC.Tactic!=null){d=SPC.Tactic}PRNHelper.tempResult=PRNHelper.getWSResult("GetConfigurationPathXML",d)}catch(c){}return PRNHelper.tempResult},getDefault:function(){try{var d="NoParam";PRNHelper.tempResult=PRNHelper.getWSResult("GetDefault",d)}catch(c){}return PRNHelper.tempResult},getLifeStyleRIN:function(d){try{PRNHelper.tempDebugReq=d;PRNHelper.tempResult=PRNHelper.getWSResult("GetLifeStyleRIN",d);PRNHelper.tempDebugRes=PRNHelper.tempResult;PRNHelper.openDebugWin("getLifeStyleRIN")}catch(c){}return PRNHelper.tempResult},getAccumulationResult:function(d){try{PRNHelper.tempDebugReq=d;PRNHelper.tempResult=PRNHelper.getWSResult("GetAccumulationResult",d);PRNHelper.tempDebugRes=PRNHelper.tempResult;PRNHelper.openDebugWin("getAccumulationResult")}catch(c){}return PRNHelper.tempResult},getTransitionResult:function(d){try{PRNHelper.tempDebugReq=d;PRNHelper.tempResult=PRNHelper.getWSResult("GetTransitionResult",d);PRNHelper.tempDebugRes=PRNHelper.tempResult;PRNHelper.openDebugWin("getTransitionResult")}catch(c){}return PRNHelper.tempResult},getWSResult:function(k,g){if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}var h="/M/PRNUI/UIService/PRNService.asmx/"+k;xmlhttp.open("POST",h,false);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");if(g=="NoParam"&&k!="GetConfigurationPathXML"){xmlhttp.send()}else{xmlhttp.send("requestXml="+g)}if(xmlhttp.readyState==4){PRNHelper.Results=xmlhttp.responseText;var l='<?xml version="1.0" encoding="utf-8"?>\r\n<string xmlns="http://tempuri.org/">';PRNHelper.Results=PRNHelper.Results.replace(l,"");PRNHelper.Results=PRNHelper.decodeXml(PRNHelper.Results);var f=PRNHelper.Results;l="</string>";PRNHelper.Results=f.replace(l,"")}return PRNHelper.Results},scrollToTop:function(){window.scrollTo(0,0)},change:function(b){document.getElementById("PRNSwf").style.height=b+"px";document.getElementById("flashContent").style.height=b+"px"},RecordCoreMetricsData:function(c,d){cmCreatePageviewTag(d,null,null,c,false,false,null,false,false,null,null,null,null,null,null,null,null);return},pixyInvPQ:function(b){b=b.replace(/PRN1/,SPC.Tactic);_pixy.TrackAny("TranInvProfQue","1");window.open(b)},pixyExternalURL:function(c,d){d=d.replace(/PRN1/,SPC.Tactic);_pixy.TrackAny(c,"1");window.open(_pixy.Link(d))}};var ML=new Object();ML.Online=new Object();ML.Online.IRA=new Object();ML.Online.IRA.Framework=new Object();ML.Online.IRA.Framework=function(){this.version="1.0";this.type="IRA";this.BrowserMsgDiv="divBrowserMsg";this.BrowserCheckTimer=null};var g_ml_ira_jsLib_1_0;ML.Online.IRA.Framework.prototype={SetDisc:function(b){try{g_ml_ira_jsLib_1_0.GetDisclaimerContent(b)}catch(a){}},GetDisclaimerContent:function(c){var a=$find("ctl00_cctlDisclosures");try{if(null!=a){a.setRuntimeXMLParameters(g_ml_ira_jsLib_1_0.GetRuntimeDisclaimerSpecz(c));a.GetContent(g_ml_ira_jsLib_1_0.ShowContent);a.LoadContent()}}catch(b){}},ShowContent:function(a){},GetRuntimeDisclaimerSpecz:function(c){var b="";try{b+="<specializations>";b+='<specialization name="DISC_ID" type="passed_in">';b+='<spec_param name="DISC_ID">';b+='<spec_value name="DISC_ID">';b+=c;b+="</spec_value>";b+="</spec_param>";b+="</specialization>";b+="</specializations>";return b}catch(a){}}};g_ml_ira_jsLib_1_0=new ML.Online.IRA.Framework();var OOo={Browser:(function(){var h=navigator.userAgent,g=Object.prototype.toString.call(window.opera)=="[object Opera]",n={IE:!!window.attachEvent&&!g,Opera:g,WebKit:h.indexOf("AppleWebKit/")>-1,Chrome:h.indexOf("Chrome")>-1,Gecko:h.indexOf("Gecko")>-1&&h.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(h),PalmPre:h.indexOf("Pre/")>-1,BlackBerry:h.indexOf("BlackBerry")>-1,Fennec:h.indexOf("Fennec")>-1,IEMobile:h.indexOf("IEMobile")>-1,OperaMobile:h.search(/Opera (?:Mobi|Mini)/)>-1},l=0,m,k=false;if(n.IE){m=/msie.(\d\.\d+)/i;l=h.match(m)[1]}else{if(n.Gecko){m=/gecko.(\d+)/i;l=h.match(m)[1]}else{if(n.WebKit){m=/applewebkit\/(\d+)/i;l=h.match(m)[1]}else{if(n.Opera){m=/opera.(\d\.\d+)/i;l=h.match(m)[1]}else{k=true}}}}n.isMobile=(n.MobileSafari||n.PalmPre||n.BlackBerry||n.Fennec||n.IEMobile||n.OperaMobile);n.Version=parseFloat(l);n.isModern=(!(k||(n.IE&&n.Version<6)||(n.Opera&&n.Version<8)||(n.Gecko=="gecko"&&n.Version<20041107)));return n})()};OOo.Cache={};OOo.instanceCount=0;if(!OnlineOpinion){var OnlineOpinion=OOo}(function(){function m(f){return document.getElementById(f)}function l(g,f){for(var h in f){g[h]=f[h]}return g}function b(g,f,k,h){if(g.addEventListener){g.addEventListener(f,k,h)}else{if(g.attachEvent){g.attachEvent("on"+f,k)}}}function q(g,f,k,h){if(g.removeEventListener){g.removeEventListener(f,k,h)}else{if(g.detachEvent){g.detachEvent("on"+f,k)}}}function d(g){var f=[];for(prop in g){f.push(prop+"="+(encodeURIComponent(g[prop])||""))}return f.join("&")}function c(g){var f=d(g.metrics);f+="&custom_var="+g.tealeafId+"|"+g.clickTalePID+"/"+g.clickTaleUID+"/"+g.clickTaleSID;f+="&_rev=2";if(g.customVariables){f+="&customVars="+encodeURIComponent(OOo.serialize(g.customVariables))}return f}function a(g,f){var n=document,h=n.createElement("form"),k=n.createElement("input");h.style.display="none";h.method="post";h.target=f||"OnlineOpinion";h.action=g.onPageCard?"https://secure.opinionlab.com/ccc01/comment_card_json_4_0_b.asp?r="+location.href:"https://secure.opinionlab.com/ccc01/comment_card_d.asp";k.name="params";k.value=c(g);h.appendChild(k);n.body.appendChild(h);return h}function p(){return{width:screen.width,height:screen.height,referer:location.href,prev:document.referrer,time1:(new Date()).getTime(),time2:null,currentURL:location.href,ocodeVersion:"5.1.5"}}l(OOo,{extend:l,toQueryString:d,addEventListener:b,$:m,appendOOForm:a,removeEventListener:q,createMetrics:p})})();OOo.extend(Function.prototype,(function(){if(typeof(Prototype)!="undefined"){return}var h=Array.prototype.slice;function c(f,d){var k=f.length,g=d.length;while(g--){f[k+g]=d[g]}return f}function b(f,d){f=h.call(f,0);return c(f,d)}function a(d){if(arguments.length<2&&typeof arguments[0]==="undefined"){return this}var g=this,f=h.call(arguments,1);return function(){var k=b(f,arguments);return g.apply(d,k)}}return{bind:a}})());(function(){var c=location.host.split(".").reverse();c="."+c[1]+"."+c[0];function b(g,f,l){var h="",k="";if(l){h=new Date();h.setTime(h.getTime()+(l*1000));k="; expires="+h.toGMTString()}document.cookie=g+"="+f+k+"; path=/; domain="+c+";"}function a(g){var f=g+"=",l=document.cookie.split(";"),h;for(var k=0;k<l.length;k++){h=l[k];while(h.charAt(0)==" "){h=h.substring(1,h.length)}if(h.indexOf(f)===0){return h.substring(f.length,h.length)}}return null}function d(f){b(f,"",-1)}OOo.extend(OOo,{createCookie:b,readCookie:a,eraseCookie:d})})();OOo.Ocode=function(f){if(!OOo.Browser.isModern||(f.disableMobile&&OOo.Browser.isMobile)){return}OOo.instanceCount++;this.options={tealeafCookieName:"TLTSID"};OOo.extend(this.options,f);var d=this.options,g=d.referrerRewrite;if(d.cookie&&this.matchUrl()){return}if(d.thirdPartyCookies&&OOo.checkThirdPartyCookies(d.thirdPartyCookies)){return}if(d.abandonment&&!OOo.checkAbandonment(d.abandonment)){return}if(d.tunnel&&!OOo.checkTunnel(d.tunnel.path,d.tunnel.cookieName)){return}if(d.events&&d.events.onSingleClick){this.singProbability=Math.random()<1-d.events.onSingleClick/100}d.tealeafId=OOo.readCookie(d.tealeafCookieName);this.frameName=d.onPageCard?"OnlineOpinion"+OOo.instanceCount:"OnlineOpinion";d.metrics=OOo.createMetrics();if(g){d.metrics.referer=g.searchPattern?window.location.href.replace(g.searchPattern,g.replacePattern):g.replacePattern}if(d.events){this.setupEvents();if(d.events.disableLinks||d.events.disableFormElements){this.setupDisableElements()}}if(d.floating){this.floating()}else{if(d.bar){this.bar()}else{if(d.tab){this.tab()}}}};OOo.Ocode.prototype={show:function(){var b=this.options;if(this.interruptShow){return}if(!b.floating&&b.events&&this.singProbability){return}if(b.cookie){this.tagUrl()}if(b.thirdPartyCookies){if(OOo.checkThirdPartyCookies(b.thirdPartyCookies)){return}OOo.setThirdPartyCookies(b.thirdPartyCookies)}if(this.floatingLogo&&b.disappearOnClick){this.floatingLogo.style.display="none"}if(typeof arguments[0]=="string"){b.metrics.trigger=arguments[0]}if(b.clickTalePID&&typeof ClickTale=="function"){b.clickTaleUID=ClickTaleGetUID();b.clickTaleSID=ClickTaleGetSID()}if(b.onPageCard){this.setupOnPageCC()}else{this.launchOOPopup()}},tagUrl:function(){if(this.matchUrl()){return}var f=this.options.cookie,d=f.type=="page"?location.href:location.hostname,g=OOo.readCookie(f.name||"oo_r")||"";OOo.createCookie(f.name||"oo_r",g+OOo.sha1(d),f.expiration)},matchUrl:function(){var d=this.options.cookie.type=="page"?location.href:location.hostname,c=OOo.readCookie(this.options.cookie.name||"oo_r");if(!c){return false}return c.search(OOo.sha1(d))!=-1}};(function(){function a(){var g=this.options,f=g.newWindowSize||[545,325],l=[parseInt((g.metrics.height-f[1])/2),parseInt((g.metrics.width-f[0])/2)],g=this.options,h,k;g.metrics.time2=(new Date()).getTime();g.metrics.type="Popup";h=OOo.appendOOForm(g);k=window.open("","OnlineOpinion","location=no,status=no,width="+f[0]+",height="+f[1]+",top="+l[0]+",left="+l[1]);if(k){h.submit()}}OOo.extend(OOo.Ocode.prototype,{launchOOPopup:a})})();OOo.extend(OOo.Ocode.prototype,{floating:function(){var K=document,L=this.floatingLogo=document.createElement("div"),J=K.createElement("div"),I=K.createElement("div"),F=K.createElement("div"),B=K.createElement("span"),H=this.options.floating,G=OOo.$(H.contentId),E="10px",A=false,x=H.id;if(x){L.id=x}L.className="oo_feedback_float";I.className="oo_transparent";J.className="olUp";F.className="olOver";J.tabIndex=0;J.onkeyup=function(f){var d=f||window.event;if(d.keyCode!=13){return}this.show()}.bind(this);J.innerHTML=H.caption||"Feedback";L.appendChild(J);B.innerHTML=H.hoverCaption||"Click here to<br>rate this page";F.appendChild(B);L.appendChild(F);L.appendChild(I);if(OOo.Browser.IE&&OOo.Browser.Version<7){L.style.position="absolute";L.style.bottom="";OOo.addEventListener(window,"scroll",w,false);OOo.addEventListener(window,"resize",w,false);function w(d){L.style.top=(K.documentElement.scrollTop+document.documentElement.clientHeight-L.clientHeight)+"px"}A=true}else{if(OOo.Browser.MobileSafari){var b=window.innerHeight,c;L.style.bottom=null;L.style.top=(pageYOffset+window.innerHeight-60)+"px";OOo.addEventListener(window,"scroll",function(d){c=pageYOffset-(b-window.innerHeight);L.style.webkitTransform="translateY("+c+"px)"},false)}}if(H.position&&H.position.search(/Content/)&&G){var z=this.spacer=K.createElement("div"),y=OOo.Browser.WebKit?K.body:K.documentElement,D;z.id="oo_feedback_fl_spacer";z.style.left=C(G)+"px";K.body.appendChild(z);switch(H.position){case"rightOfContent":D=function(d){L.style.left=(C(G)-y.scrollLeft)+"px";if(A){D=null}};break;case"fixedPreserveContent":D=function(f){var d=OOo.Browser.IE?K.body.clientWidth:window.innerWidth,g=!A?y.scrollLeft:0;if(d<=C(G)+L.offsetWidth+parseInt(E)){L.style.left=(C(G)-g)+"px"}else{L.style.left="";L.style.right=E}};break;case"fixedContentMax":D=function(f){var d=OOo.Browser.IE?K.body.clientWidth:window.innerWidth;if(d<=C(G)+L.offsetWidth+parseInt(E)){L.style.left="";L.style.right=E;if(f&&f.type=="scroll"&&A){L.style.left=(K.documentElement.clientWidth+y.scrollLeft-105)+"px"}}else{L.style.left=(C(G)-y.scrollLeft)+"px";L.style.right=""}};break}D();OOo.addEventListener(window,"scroll",D,false);OOo.addEventListener(window,"resize",D,false);function a(d){z.style.left=C(G)+"px"}OOo.addEventListener(window,"resize",a,false)}else{L.style.right=E}OOo.addEventListener(L,"click",this.show.bind(this,"Floating"),false);OOo.addEventListener(L,"touchstart",this.show.bind(this,"Floating"),false);K.body.appendChild(L);if(OOo.Browser.IE&&OOo.Browser.Version<7){L.style.top=(K.documentElement.clientHeight-L.clientHeight)+"px";I.style.height=L.clientHeight+"px"}function C(d){return d.offsetLeft+d.offsetWidth}},removeFloatingLogo:function(){document.body.removeChild(this.floatingLogo);if(this.spacer){document.body.removeChild(this.spacer)}}});var Spry;if(!Spry){Spry={}}if(!Spry.Widget){Spry.Widget={}}Spry.Widget.TabbedPanels=function(a,c){this.element=this.getElement(a);this.defaultTab=0;this.tabSelectedClass="TabbedPanelsTabSelected";this.tabHoverClass="TabbedPanelsTabHover";this.tabFocusedClass="TabbedPanelsTabFocused";this.panelVisibleClass="TabbedPanelsContentVisible";this.focusElement=null;this.hasFocus=false;this.currentTabIndex=0;this.enableKeyboardNavigation=true;this.nextPanelKeyCode=Spry.Widget.TabbedPanels.KEY_RIGHT;this.previousPanelKeyCode=Spry.Widget.TabbedPanels.KEY_LEFT;Spry.Widget.TabbedPanels.setOptions(this,c);if(typeof(this.defaultTab)=="number"){if(this.defaultTab<0){this.defaultTab=0}else{var b=this.getTabbedPanelCount();if(this.defaultTab>=b){this.defaultTab=(b>1)?(b-1):0}}this.defaultTab=this.getTabs()[this.defaultTab]}if(this.defaultTab){this.defaultTab=this.getElement(this.defaultTab)}this.attachBehaviors()};Spry.Widget.TabbedPanels.prototype.getElement=function(a){if(a&&typeof a=="string"){return document.getElementById(a)}return a};Spry.Widget.TabbedPanels.prototype.getElementChildren=function(b){var a=[];var c=b.firstChild;while(c){if(c.nodeType==1){a.push(c)}c=c.nextSibling}return a};Spry.Widget.TabbedPanels.prototype.addClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))!=-1)){return}b.className+=(b.className?" ":"")+a};Spry.Widget.TabbedPanels.prototype.removeClassName=function(b,a){if(!b||!a||(b.className&&b.className.search(new RegExp("\\b"+a+"\\b"))==-1)){return}b.className=b.className.replace(new RegExp("\\s*\\b"+a+"\\b","g"),"")};Spry.Widget.TabbedPanels.setOptions=function(d,c,a){if(!c){return}for(var b in c){if(a&&c[b]==undefined){continue}d[b]=c[b]}};Spry.Widget.TabbedPanels.prototype.getTabGroup=function(){if(this.element){var a=this.getElementChildren(this.element);if(a.length){return a[0]}}return null};Spry.Widget.TabbedPanels.prototype.getTabs=function(){var a=[];var b=this.getTabGroup();if(b){a=this.getElementChildren(b)}return a};Spry.Widget.TabbedPanels.prototype.getContentPanelGroup=function(){if(this.element){var a=this.getElementChildren(this.element);if(a.length>1){return a[1]}}return null};Spry.Widget.TabbedPanels.prototype.getContentPanels=function(){var a=[];var b=this.getContentPanelGroup();if(b){a=this.getElementChildren(b)}return a};Spry.Widget.TabbedPanels.prototype.getIndex=function(c,a){c=this.getElement(c);if(c&&a&&a.length){for(var b=0;b<a.length;b++){if(c==a[b]){return b}}}return -1};Spry.Widget.TabbedPanels.prototype.getTabIndex=function(b){var a=this.getIndex(b,this.getTabs());if(a<0){a=this.getIndex(b,this.getContentPanels())}return a};Spry.Widget.TabbedPanels.prototype.getCurrentTabIndex=function(){return this.currentTabIndex};Spry.Widget.TabbedPanels.prototype.getTabbedPanelCount=function(a){return Math.min(this.getTabs().length,this.getContentPanels().length)};Spry.Widget.TabbedPanels.addEventListener=function(c,b,d,a){try{if(c.addEventListener){c.addEventListener(b,d,a)}else{if(c.attachEvent){c.attachEvent("on"+b,d)}}}catch(f){}};Spry.Widget.TabbedPanels.prototype.cancelEvent=function(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}return false};Spry.Widget.TabbedPanels.prototype.onTabClick=function(b,a){this.showPanel(a);return this.cancelEvent(b)};Spry.Widget.TabbedPanels.prototype.onTabMouseOver=function(b,a){this.addClassName(a,this.tabHoverClass);return false};Spry.Widget.TabbedPanels.prototype.onTabMouseOut=function(b,a){this.removeClassName(a,this.tabHoverClass);return false};Spry.Widget.TabbedPanels.prototype.onTabFocus=function(b,a){this.hasFocus=true;this.addClassName(a,this.tabFocusedClass);return false};Spry.Widget.TabbedPanels.prototype.onTabBlur=function(b,a){this.hasFocus=false;this.removeClassName(a,this.tabFocusedClass);return false};Spry.Widget.TabbedPanels.KEY_UP=38;Spry.Widget.TabbedPanels.KEY_DOWN=40;Spry.Widget.TabbedPanels.KEY_LEFT=37;Spry.Widget.TabbedPanels.KEY_RIGHT=39;Spry.Widget.TabbedPanels.prototype.onTabKeyDown=function(g,f){var c=g.keyCode;if(!this.hasFocus||(c!=this.previousPanelKeyCode&&c!=this.nextPanelKeyCode)){return true}var b=this.getTabs();for(var a=0;a<b.length;a++){if(b[a]==f){var d=false;if(c==this.previousPanelKeyCode&&a>0){d=b[a-1]}else{if(c==this.nextPanelKeyCode&&a<b.length-1){d=b[a+1]}}if(d){this.showPanel(d);d.focus();break}}}return this.cancelEvent(g)};Spry.Widget.TabbedPanels.prototype.preorderTraversal=function(a,b){var d=false;if(a){d=b(a);if(a.hasChildNodes()){var f=a.firstChild;while(!d&&f){d=this.preorderTraversal(f,b);try{f=f.nextSibling}catch(c){f=null}}}}return d};Spry.Widget.TabbedPanels.prototype.addPanelEventListeners=function(d,b){var c=this;Spry.Widget.TabbedPanels.addEventListener(d,"click",function(g){return c.onTabClick(g,d)},false);Spry.Widget.TabbedPanels.addEventListener(d,"mouseover",function(g){return c.onTabMouseOver(g,d)},false);Spry.Widget.TabbedPanels.addEventListener(d,"mouseout",function(g){return c.onTabMouseOut(g,d)},false);if(this.enableKeyboardNavigation){var f=null;var a=null;this.preorderTraversal(d,function(g){if(g.nodeType==1){var h=d.attributes.getNamedItem("tabindex");if(h){f=g;return true}if(!a&&g.nodeName.toLowerCase()=="a"){a=g}}return false});if(f){this.focusElement=f}else{if(a){this.focusElement=a}}if(this.focusElement){Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"focus",function(g){return c.onTabFocus(g,d)},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"blur",function(g){return c.onTabBlur(g,d)},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"keydown",function(g){return c.onTabKeyDown(g,d)},false)}}};Spry.Widget.TabbedPanels.prototype.showPanel=function(b){var g=-1;if(typeof b=="number"){g=b}else{g=this.getTabIndex(b)}if(!g<0||g>=this.getTabbedPanelCount()){return}var f=this.getTabs();var c=this.getContentPanels();var a=Math.max(f.length,c.length);for(var d=0;d<a;d++){if(d!=g){if(f[d]){this.removeClassName(f[d],this.tabSelectedClass)}if(c[d]){this.removeClassName(c[d],this.panelVisibleClass);c[d].style.display="none"}}}this.addClassName(f[g],this.tabSelectedClass);this.addClassName(c[g],this.panelVisibleClass);c[g].style.display="block";this.currentTabIndex=g};Spry.Widget.TabbedPanels.prototype.attachBehaviors=function(d){var c=this.getTabs();var a=this.getContentPanels();var f=this.getTabbedPanelCount();for(var b=0;b<f;b++){this.addPanelEventListeners(c[b],a[b])}this.showPanel(this.defaultTab)};Sys.Application.add_load(BackToHandler);function BackToHandler(){try{if(Sys.Browser.agent==Sys.Browser.Firefox){var b=$get("pageContent").getElementsByTagName("a");for(i=0;i<b.length;i++){if(b[i].id.indexOf("hlBackTo")!=-1){b[i].onclick=null;$addHandler(b[i],"click",function(){return gObjMLOSEJsLibrary.GetPageHistoryFireFox(this)})}}}}catch(a){}}Sys.Application.add_load(CheckMVirDirforSearch);function CheckMVirDirforSearch(){var a=$get("ctl00_ECMSSearchTextBox1_srchAnchor1");if(a){if(a.href.toLowerCase().indexOf("/m/")==-1){a.href="M/System/SearchResults.aspx?src_cd=OTHER&k="}}}Sys.Application.add_load(BackToDisable);function BackToDisable(){var a=document.location.hostname;var d=document.referrer;var c=$get("backbutton1");var b=$get("backbutton2");if(d==""||d.toLowerCase().indexOf(a)==-1){if(c){Sys.UI.DomElement.addCssClass(c,"hidden")}if(b){Sys.UI.DomElement.addCssClass(b,"hidden")}}else{if(c){Sys.UI.DomElement.removeCssClass(c,"hidden")}if(b){Sys.UI.DomElement.removeCssClass(b,"hidden")}}}Sys.Application.add_load(HiddenFrameLoginWidget);function HiddenFrameLoginWidget(){if(document.location.protocol.toLowerCase().indexOf("https:")!=-1){var a=document.createElement("iframe");a.setAttribute("id","ifrm");document.body.appendChild(a);a.setAttribute("src","https://olui2.fs.ml.com/ClientFederation/LoginWidget.aspx");a.setAttribute("width","0px");a.setAttribute("height","0px")}};
