Solved

CRM 2011 Ribbon Workbench vs RibbonDiffXml

Posted on 2016-08-01
44
203 Views
Last Modified: 2016-08-12
I need to add a custom button to the Quote Ribbon and populate some fields (date, lookup, text) on the Quote form with javascript.  I am attempting to use Ribbon Workbench but the rules are complicated and I am considering exporting the customizations.xml, modifying the xml and reimporting.

Any opinions on which has worked best for you and any cautions with either approach.  I spent half a day trying to get a button the Quote form and I keep creating errors that prevent the solution from publishing.

Suggestions?

Thanks
0
Comment
Question by:apollo7
  • 29
  • 14
44 Comments
 
LVL 29

Expert Comment

by:feridun
ID: 41738131
I have used Ribbon workbench with success; if you post what you are trying to do I can have a look tomorrow.
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41738764
Hi,

RibbonWorkbench is a powerful tool. However, many of the developers are confused with its UI and are not comfortable with it.

I would suggest Visual Ribbon Editor over RibbonDiffXml. Give it a try- http://crmvisualribbonedit.codeplex.com

Not sure if it connects to CRM 2015/2016 but it will sure work for CRM 2011 and 2013.

Please post a screenshot of error here if you still would like to go for RibbonWorkbench.
0
 
LVL 1

Author Comment

by:apollo7
ID: 41738848
Thanks to both of you, I am using Ribbon Editor and it is working better.  I will wait until I get this button completed but so far Ribbon Editor is working for me.
0
 
LVL 1

Author Comment

by:apollo7
ID: 41739020
I have the Ribbon Editor working, it is activated an on the Quote form ribbon.  It launches the javascript and populates some of the fields I need.  

I am now at the point where I need some assistance using the button to populate a lookup. I have populated dates, option sets and text fields but I am doing something wrong with the the FreightTerms lookup.  

See code below.  I created a separate web resource for this button (quote_autopop.js) and the function  populate is called by the button.

Thanks

function populate() {

    //check status
    var statusText = Crm2011.UtilFunctions.getStatusCodeText();
    alert(statusText);

    //set effective date
    var effFromDate = Xrm.Page.getAttribute("effectivefrom").getValue();
    alert(effFromDate);
    Crm2011.UtilFunctions.setToday("effectivefrom");

    //set sent date 
    var sentDate = Xrm.Page.getAttribute("csc_quotesenttocustomerdate").getValue();
    Crm2011.UtilFunctions.setToday("csc_quotesenttocustomerdate");
    alert(sentDate);

    //set terms and conditions (option set)
    var termsType = Xrm.Page.data.entity.attributes.get("csc_termsandconditions");
    termsType.setValue(862430000);
    alert(termsType);

    //set freight terms (lookup)
    function SetLookupValue(fieldName, id, name, entityType) {
        if (fieldName != null) {
            var lookupValue = new Array();
            lookupValue[0] = new Object();
            lookupValue[0].id = id;
            lookupValue[0].name = name;
            lookupValue[0].entityType = entityType;
            Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
        }
    }

    var FreightTerms = Xrm.Page.data.entity.attributes.get("csc_freightterm");
    if (FreightTerms.getValue() != null) {
        var FreightTermsGUID = FreightTerms.getValue()[0].id;
        var FreightTermsName = FreightTerms.getValue()[0].name;
        SetLookupValue("csc_lookupitemid", FreightTermsGUID, FreightTermsName, "Collect");
    }


}

Open in new window

0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41739070
Hi,

You need to pass entity logical name to the function you're calling.

SetLookupValue("csc_lookupitemid", FreightTermsGUID, FreightTermsName, "Collect"); // "Collect" should be replaced by "csc_collect" entity name (might be different... this is just a wild guess). 

Open in new window

0
 
LVL 1

Author Comment

by:apollo7
ID: 41739085
Rikin,

Thanks, what I am trying to do is populate the FreightTerms lookup with a specific value (i.e. "Collect") which is one of the lookup choices (Collect, Prepaid, Billed, etc).

It looks like I am way off course?
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41739256
You just need to get which entity record that lookup accepts and just pass the entity logical name to the above function.
0
 
LVL 1

Author Comment

by:apollo7
ID: 41739801
I am working just on Freight Terms (lookup field) - all the other field types work fine.

I am using a Ribbon Editor button to execute the following - the button pulls from a web resource called 'csc_quoteautopopup' and calls the 'SetLookupValue' function:

var FreightTerms = Xrm.Page.data.entity.attributes.get("csc_freightterm");
var FreightTermsGUID = FreightTerms.getValue()[0].id;
var FreightTermsName = FreightTerms.getValue()[0].name;
SetLookupValue("csc_freightterm", FreightTermsGUID, FreightTermsName, "csc_freightterm");

//set freight terms (lookup)
function SetLookupValue(fieldName, id, name, entityType) {
    alert("freight1");
        if (fieldName != null) {
        var lookupValue = new Array();
        lookupValue[0] = new Object();
        lookupValue[0].id = id;
        lookupValue[0].name = name;
        lookupValue[0].entityType = entityType;
        Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
    }
}

Open in new window


Help, help, help!  

Thanks
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41740151
What is the record type the lookup accepts?
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740206
Rikin,

I have included the information I think you are looking for and screenshots of everything about this field.

The lookup type I see when I open the lookup is Lookup Item (under Look for).

The screen shot for the Lookup
Opening the Freight Terms lookup on the form
The screen shot for the Field Properties
The Freight Terms (csc_freightterm) field details
The field details from the solution
The field details from the solution
The fields information screen (Details tab)
The field's information screen (Details tab)
The field Relationship screen shot
The field's Relationship screen shot
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740243
Exported the solution and looked for LookupType in the customizations.xml

This is what I have found so far:

<control id="csc_freightterm" classid="{270BD3DB-D9AF-4782-9025-509E298DEC0A}" datafieldname="csc_freightterm" disabled="false">
                                  <parameters>
                                    <AutoResolve>true</AutoResolve>
                                    <DisableMru>false</DisableMru>
                                    <DisableQuickFind>true</DisableQuickFind>
                                    <DisableViewPicker>false</DisableViewPicker>
                                    <DefaultViewId>{5C9D3C46-7F1D-E311-BEBE-463500000031}</DefaultViewId>
                                    <AllowFilterOff>false</AllowFilterOff>
                                    <AvailableViewIds>{5C9D3C46-7F1D-E311-BEBE-463500000031}</AvailableViewIds>
                                  </parameters>
                                </control>

Open in new window


<field name="csc_freightterm" requiredlevel="none" imemode="auto" lookupstyle="single" lookupbrowse="0">
        <IsCustomizable>1</IsCustomizable>
        <IsRenameable>1</IsRenameable>
        <CanModifySearchSettings>1</CanModifySearchSettings>
        <CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
        <IsSecured>0</IsSecured>
        <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
        <IsAuditEnabled>1</IsAuditEnabled>
        <displaynames>
          <displayname description="Freight Terms" languagecode="1033" />
        </displaynames>
      </field>

Open in new window

0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41740340
Hi,

Everything is correct... it should work now. But if it is not working, let us know what error are you getting?
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41740344
Hey,

I think the function SetLookupValue() should be placed outside the main function populate(). Have you tried that?
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740431
No, I will try that now.  

Btw, I dont get an error, the Freight Terms field just remains empty
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740465
Th is the full javascript that I am calling with the Ribbon Editor button is below.  

The function it calls is 'populate' from the web resource 'csc_quote_autopop'

I am not exactly sure how to  move the SetLookupValue function outside of the populate function and still call it it with a single button on the ribbon.

Ribbon Editor button

function populate() {

    //check status
    var statusText = Crm2011.UtilFunctions.getStatusCodeText();
    alert(statusText);

    //set effective date
    var effFromDate = Xrm.Page.getAttribute("effectivefrom").getValue();
    alert(effFromDate);
    Crm2011.UtilFunctions.setToday("effectivefrom");

    //set sent date 
    var sentDate = Xrm.Page.getAttribute("csc_quotesenttocustomerdate").getValue();
    Crm2011.UtilFunctions.setToday("csc_quotesenttocustomerdate");
    alert(sentDate);

    //set terms and conditions (option set)
    var termsType = Xrm.Page.data.entity.attributes.get("csc_termsandconditions");
    termsType.setValue(862430000);
    alert(termsType);

    //set trade compliance (option set)
    var itcType = Xrm.Page.data.entity.attributes.get("csc_itc");
    itcType.setValue(862430000);
    alert(itcType);
    var dpsType = Xrm.Page.data.entity.attributes.get("csc_dps");
    dpsType.setValue(862430000);
    alert(itcType);
    var exportType = Xrm.Page.data.entity.attributes.get("csc_exportcontrolissues");
    exportType.setValue(862430000);
    alert(exportType);
    var proceedType = Xrm.Page.data.entity.attributes.get("csc_proceedwithquote");
    proceedType.setValue(1);
    alert(proceedType);

    var FreightTerms = Xrm.Page.data.entity.attributes.get("csc_freightterm");
    var FreightTermsGUID = FreightTerms.getValue()[0].id;
    var FreightTermsName = FreightTerms.getValue()[0].name;
    SetLookupValue("csc_freightterm", FreightTermsGUID, FreightTermsName, "csc_freightterm");

    //set freight terms (lookup)
    function SetLookupValue(fieldName, id, name, entityType) {
        alert("freight1");
        if (fieldName != null) {
            var lookupValue = new Array();
            lookupValue[0] = new Object();
            lookupValue[0].id = id;
            lookupValue[0].name = name;
            lookupValue[0].entityType = entityType;
            Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
        }
    } 
}

Open in new window

0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41740478
Try this code-

function populate() {

    //check status
    var statusText = Crm2011.UtilFunctions.getStatusCodeText();
    alert(statusText);

    //set effective date
    var effFromDate = Xrm.Page.getAttribute("effectivefrom").getValue();
    alert(effFromDate);
    Crm2011.UtilFunctions.setToday("effectivefrom");

    //set sent date 
    var sentDate = Xrm.Page.getAttribute("csc_quotesenttocustomerdate").getValue();
    Crm2011.UtilFunctions.setToday("csc_quotesenttocustomerdate");
    alert(sentDate);

    //set terms and conditions (option set)
    var termsType = Xrm.Page.data.entity.attributes.get("csc_termsandconditions");
    termsType.setValue(862430000);
    alert(termsType);

    //set trade compliance (option set)
    var itcType = Xrm.Page.data.entity.attributes.get("csc_itc");
    itcType.setValue(862430000);
    alert(itcType);
    var dpsType = Xrm.Page.data.entity.attributes.get("csc_dps");
    dpsType.setValue(862430000);
    alert(itcType);
    var exportType = Xrm.Page.data.entity.attributes.get("csc_exportcontrolissues");
    exportType.setValue(862430000);
    alert(exportType);
    var proceedType = Xrm.Page.data.entity.attributes.get("csc_proceedwithquote");
    proceedType.setValue(1);
    alert(proceedType);

    var FreightTerms = Xrm.Page.data.entity.attributes.get("csc_freightterm");
    var FreightTermsGUID = FreightTerms.getValue()[0].id;
    var FreightTermsName = FreightTerms.getValue()[0].name;
    SetLookupValue("csc_freightterm", FreightTermsGUID, FreightTermsName, "csc_freightterm");
}

//set freight terms (lookup)
function SetLookupValue(fieldName, id, name, entityType) {
	alert("freight1");
	if (fieldName != null) {
		var lookupValue = new Array();
		lookupValue[0] = new Object();
		lookupValue[0].id = id;
		lookupValue[0].name = name;
		lookupValue[0].entityType = entityType;
		Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
	}
} 

Open in new window

0
 
LVL 1

Author Comment

by:apollo7
ID: 41740484
I am trying this with a second action in Ribbon Editor to call SetLookupValue

Quote Autopop btn calls two functions


function populate() {

    //check status
    var statusText = Crm2011.UtilFunctions.getStatusCodeText();
    alert(statusText);

    //set effective date
    var effFromDate = Xrm.Page.getAttribute("effectivefrom").getValue();
    alert(effFromDate);
    Crm2011.UtilFunctions.setToday("effectivefrom");

    //set sent date 
    var sentDate = Xrm.Page.getAttribute("csc_quotesenttocustomerdate").getValue();
    Crm2011.UtilFunctions.setToday("csc_quotesenttocustomerdate");
    alert(sentDate);

    //set terms and conditions (option set)
    var termsType = Xrm.Page.data.entity.attributes.get("csc_termsandconditions");
    termsType.setValue(862430000);
    alert(termsType);

    //set trade compliance (option set)
    var itcType = Xrm.Page.data.entity.attributes.get("csc_itc");
    itcType.setValue(862430000);
    alert(itcType);
    var dpsType = Xrm.Page.data.entity.attributes.get("csc_dps");
    dpsType.setValue(862430000);
    alert(itcType);
    var exportType = Xrm.Page.data.entity.attributes.get("csc_exportcontrolissues");
    exportType.setValue(862430000);
    alert(exportType);
    var proceedType = Xrm.Page.data.entity.attributes.get("csc_proceedwithquote");
    proceedType.setValue(1);
    alert(proceedType);

    var FreightTerms = Xrm.Page.data.entity.attributes.get("csc_freightterm");
    var FreightTermsGUID = FreightTerms.getValue()[0].id;
    var FreightTermsName = FreightTerms.getValue()[0].name;
    SetLookupValue("csc_freightterm", FreightTermsGUID, FreightTermsName, "csc_freightterm");
}
//set freight terms (lookup)
function SetLookupValue(fieldName, id, name, entityType) {
    alert("freight1");
    if (fieldName != null) {
        var lookupValue = new Array();
        lookupValue[0] = new Object();
        lookupValue[0].id = id;
        lookupValue[0].name = name;
        lookupValue[0].entityType = entityType;
        Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
    }
} 

Open in new window

0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41740509
Did you try running it with just populate() function? It should work...
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740513
Substituted in your code, ran both functions with the Quote AutoPopulate btn as pictured above, nothing happens with the second function (SetLookupValue) to populate Freight Terms.

It doesn't display the alert("freight1"); either,  so it appears that my idea of calling SetLookupValue after populate does not work

Is there another way I can test the second function or modify the button?

Thanks
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740516
Missed your post again, will try that.
0
 
LVL 1

Author Comment

by:apollo7
ID: 41740532
After I run the populate function using the button, the Freight Terms is empty but when I hit Save, I get the following error:

Microsoft Dynamics CRM Error Report Contents

<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>Unable to get property '0' of undefined or null reference</Message>
   <Line>37</Line>
   <URL></URL>
   <PageURL>/main.aspx?etc=1084&extraqs=%3f_gridType%3d1084%26etc%3d1084%26id%3d%257bB1A44B99-C758-E611-970C-0050568964CE%257d%26pagemode%3diframe%26preloadcache%3d1470227826049%26rskey%3d987027591&pagetype=entityrecord</PageURL>
   <Function>anonymousr:Unabletogetproperty'0'ofundefinedornullreference</Function>
   <CallStack>
    <Function>anonymousr:Unabletogetproperty'0'ofundefinedornullreference</Function>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729)</BrowserUserAgent>
   <BrowserLanguage>en-US</BrowserLanguage>
   <SystemLanguage>en-US</SystemLanguage>
   <UserLanguage>en-US</UserLanguage>
   <ScreenResolution>1468x867</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClientTime>2016-08-03T08:38:37</ClientTime>
  </ClientInformation>
  <ServerInformation>
    <OrgLanguage>1033</OrgLanguage>
    <OrgCulture>2057</OrgCulture>
    <UserLanguage>1033</UserLanguage>
    <UserCulture>1033</UserCulture>
    <OrgID>{4C1693EF-2C1F-E511-AA3A-0050568964CE}</OrgID>
    <UserID>{76DB6D91-70B9-E511-A382-0050568964CE}</UserID>
    <CRMVersion>5.0.9690.3911</CRMVersion>
  </ServerInformation>
</CrmScriptErrorReport>

Open in new window

0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41740543
Remove the second action for SetLookupValue and try again.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:apollo7
ID: 41740564
Here is where I am at - removed the second action and tried the button again.  It runs all the way through and displays the "freight1" alert, so it is getting to the second function.

It leaves Freight Terms null (btw, not sure how I am going to pre-populate the lookup with the value of COLLECT as required)

If I click Save or Save and Close, it doesn't do anything - the Quote form just remains open.

To close the Quote, I can click on the x in the corner and it gives me "Leave this page, Stay on this Page"
0
 
LVL 1

Author Comment

by:apollo7
ID: 41741849
I had an idea that Visual Ribbon Editor (or Ribbon Workbench) might be able to resolve the issue with populating lookups without javascript.  

Can Ribbon Editor or Ribbon Workbench get a specific lookup value and populate the lookup with that value when the button is clicked?

Thanks
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41741891
I had an idea that Visual Ribbon Editor (or Ribbon Workbench) might be able to resolve the issue with populating lookups without javascript.  

Can Ribbon Editor or Ribbon Workbench get a specific lookup value and populate the lookup with that value when the button is clicked?
- I don't have any knowledge if we can do in that way...
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41741894
Here is where I am at - removed the second action and tried the button again.  It runs all the way through and displays the "freight1" alert, so it is getting to the second function.

It leaves Freight Terms null (btw, not sure how I am going to pre-populate the lookup with the value of COLLECT as required)

Try to alert all the fields... Id, name. Just to check if they come in proper format or not.

If I click Save or Save and Close, it doesn't do anything - the Quote form just remains open.

If you are not able to Save the record, there is an error somewhere in your script. Try refresh the page, click on Leave the page and CRM should show the error popup. Get the error details and we might get the idea what exactly is wrong.
0
 
LVL 1

Author Comment

by:apollo7
ID: 41742334
I am working on this, should have an error shortly.  Thanks
0
 
LVL 1

Author Comment

by:apollo7
ID: 41742374
Here is the error I receive:

Microsoft Dynamics CRM Error Report Contents

<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>Unable to get property '0' of undefined or null reference</Message>
   <Line>37</Line>
   <URL></URL>
   <PageURL>/main.aspx?etc=1084&extraqs=%3f_gridType%3d1084%26etc%3d1084%26id%3d%257b1449DC14-9A55-E611-970C-0050568964CE%257d%26pagemode%3diframe%26preloadcache%3d1470314854326%26rskey%3d903658553&pagetype=entityrecord</PageURL>
   <Function>anonymousr:Unabletogetproperty'0'ofundefinedornullreference</Function>
   <CallStack>
    <Function>anonymousr:Unabletogetproperty'0'ofundefinedornullreference</Function>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729)</BrowserUserAgent>
   <BrowserLanguage>en-US</BrowserLanguage>
   <SystemLanguage>en-US</SystemLanguage>
   <UserLanguage>en-US</UserLanguage>
   <ScreenResolution>1377x797</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClientTime>2016-08-04T08:47:54</ClientTime>
  </ClientInformation>
  <ServerInformation>
    <OrgLanguage>1033</OrgLanguage>
    <OrgCulture>2057</OrgCulture>
    <UserLanguage>1033</UserLanguage>
    <UserCulture>1033</UserCulture>
    <OrgID>{4C1693EF-2C1F-E511-AA3A-0050568964CE}</OrgID>
    <UserID>{76DB6D91-70B9-E511-A382-0050568964CE}</UserID>
    <CRMVersion>5.0.9690.3911</CRMVersion>
  </ServerInformation>
</CrmScriptErrorReport>

Open in new window

0
 
LVL 1

Author Comment

by:apollo7
ID: 41742405
Looking at the error and the code in VS, it appears that the error is being thrown by line 37 which is shown below.  

I will add some alerts and see what I get.

 
    36  var FreightTerms = Xrm.Page.data.entity.attributes.get("csc_freightterm");
    37  var FreightTermsGUID = FreightTerms.getValue()[0].id;
    38  var FreightTermsName = FreightTerms.getValue()[0].name;
    39  SetLookupValue("csc_freightterm", FreightTermsGUID, FreightTermsName, "csc_freightterm");

Open in new window

0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41742484
Hi,

Replace your statement on line 36 with below:

var FreightTerms = Xrm.Page.getAttribute("csc_freightterm");

Open in new window


or can you put a debugger on line 36 and see what values are you getting??
0
 
LVL 1

Author Comment

by:apollo7
ID: 41742524
Tried changing line 36, no change - adding the debugger
0
 
LVL 1

Author Comment

by:apollo7
ID: 41742708
While I get the CRM Server back online, I have a question

I added the debugger above line 36 and removed 'disable script debugging from IE'

When I run the web resource using the button, it stops on the debugger and I hit F10 to continue

On line  37, it threw an error dialog and asked if I wanted to break or continue.

What should I do from this point?  Do I need to add a watch?

Need guidance on using the debugger

Thanks
0
 
LVL 1

Author Comment

by:apollo7
ID: 41742773
As I step through using F10, I get the following after Line 39 [SetLookupValue("csc_freightterm", FreightTermsGUID, FreightTermsName, "csc_freightterm");]

if(typeof IEnumerator=="undefined"){var IEnumerator=function(){};IEnumerator.prototype={get_current:null,moveNext:null,reset:null};IEnumerator.registerInterface("IEnumerator")}if(typeof IEnumerable=="undefined"){var IEnumerable=function(){};IEnumerable.prototype={getEnumerator:null};IEnumerable.registerInterface("IEnumerable")}Type.registerNamespace("CUI");Type.registerNamespace("CUI.Page");if(typeof CUI.Page.PageComponent=="undefined"){CUI.Page.ICommandHandler=function(){};CUI.Page.ICommandHandler.registerInterface("CUI.Page.ICommandHandler");CUI.Page.PageComponent=function(){};CUI.Page.PageComponent.prototype={init:function(){},getGlobalCommands:function(){return null},getFocusedCommands:function(){return null},handleCommand:function(commandId,properties,sequence){return false},canHandleCommand:function(commandId){return false},isFocusable:function(){return false},receiveFocus:function(){return false},yieldFocus:function(){return true},getId:function(){return "PageComponent"}};CUI.Page.PageComponent.registerClass("CUI.Page.PageComponent",null,CUI.Page.ICommandHandler)}Type.registerNamespace("Mscrm");Mscrm.CommandInformation=function(){};Mscrm.ContextualGroupInfo=function(){};Mscrm.CrmClientType=function(){};Mscrm.CrmClientType.prototype={none:0,web:1,outlook:2};Mscrm.CrmClientType.registerEnum("Mscrm.CrmClientType",false);Mscrm.CrmOutlookClientType=function(){};Mscrm.CrmOutlookClientType.prototype={none:0,crmForOutlook:1,crmForOutlookOfflineAccess:2};Mscrm.CrmOutlookClientType.registerEnum("Mscrm.CrmOutlookClientType",false);Mscrm.OutlookRenderType=function(){};Mscrm.OutlookRenderType.prototype={none:0,web:1,outlook:2};Mscrm.OutlookRenderType.registerEnum("Mscrm.OutlookRenderType",false);Mscrm.OutlookVersion=function(){};Mscrm.OutlookVersion.prototype={none:0,version2003:1,version2007:2,version2010:3};Mscrm.OutlookVersion.registerEnum("Mscrm.OutlookVersion",false);Mscrm.CrmOfflineAccessState=function(){};Mscrm.CrmOfflineAccessState.prototype={none:0,online:1,offline:2};Mscrm.CrmOfflineAccessState.registerEnum("Mscrm.CrmOfflineAccessState",false);Mscrm.CommandHandler=function($p0,$p1,$p2){this.$$d_$Ee_1=Function.createDelegate(this,this.$Ee_1);Mscrm.CommandHandler.initializeBase(this);this.$4_1=$p0;this.$H_1=$p1;this.$2D_1=$p2;$addHandler(window,"unload",this.$$d_$Ee_1)};Mscrm.CommandHandler.$AD=function($p0,$p1,$p2){if(isNullOrEmptyString($p1))$p1=null;for(var $v_0=[$p2[$p1],$p2[null]],$v_1=0;$v_1<$v_0.length;$v_1++){var $v_2=$v_0[$v_1];if(!IsNull($v_2)){var $v_3=$v_2[$p0];if(!IsNull($v_3))return $v_3}}return null};Mscrm.CommandHandler.$7l=function($p0){if(!$p0)return null;else{for(var $v_0=new Sys.StringBuilder,$v_1=0;$v_1<$p0.length;$v_1++){$v_1>0&&$v_0.append(",");$v_0.append($p0[$v_1].toString())}return $v_0.toString()}};Mscrm.CommandHandler.prototype={$4_1:null,$H_1:null,$2D_1:null,$5T_1:true,$3m_1:false,get_enableState:function(){return this.$5T_1},set_enableState:function($p0){this.$5T_1=$p0;return $p0},getGlobalCommands:function(){return this.$2D_1},getFocusedCommands:function(){return this.$2D_1},$Ee_1:function($p0){this.$3m_1=true;$removeHandler(window,"unload",this.$$d_$Ee_1)},handleCommand:function($p0,$p1,$p2){var $v_0=this.parseCommandFromRibbon($p0),$v_1=this.$7w_1($v_0.command,$v_0.entityLogicalName,$p1,$p2),$v_2=$p1;if(!IsNull($v_2)&&!isNullOrEmptyString($v_2.PopulationXML)&&!$v_2.SuppressCommandIncludes){var $v_3=null;if($v_0.entityContext==="Form"){var $v_4=$find("crmFormSelector");if($v_4)$v_3=$v_4.get_currentFormId()}$v_2.PopulationXML=this.$Ep_1($v_2.PopulationXML,$v_0.entityLogicalName,$v_3)}return $v_1},canHandleCommand:function($p0){if(!this.$5T_1)return false;var $v_0=this.parseCommandFromRibbon($p0),$v_1=this.$CH_1($v_0.command,$v_0.entityLogicalName);if($v_1&&!IsNull(this.$H_1.$5D_2[$p0]))$v_1=Mscrm.RibbonNavigationModel.shouldContextGroupBeShown($v_0,this.$H_1);else if($v_1&&!IsNull(this.$H_1.$28_2[$p0]))$v_1=Mscrm.RibbonNavigationModel.shouldTabBeShown($p0,$v_0,this.$H_1);if(!IsNull(this.$H_1.$28_2[$p0]))this.$H_1.$28_2[$p0]=$v_1;return $v_1},parseCommandFromRibbon:function($p0){var $v_0=$p0.indexOf("|"),$v_1=$p0.indexOf("|",$v_0+1),$v_2=$p0.indexOf("|",$v_1+1),$v_3=new Mscrm.CommandInformation;$v_3.entityLogicalName=$p0.substr(0,$v_0);var $v_4=$p0.substr($v_0+1,$v_1-$v_0-1);$v_3.entityContext=$p0.substr($v_1+1,$v_2-$v_1-1);$v_3.command=$p0.substr($v_2+1);switch($v_4){case "ManyToMany":$v_3.relationshipType=Mscrm.RibbonRuleRelationshipType.manyToMany;break;case "OneToMany":$v_3.relationshipType=Mscrm.RibbonRuleRelationshipType.oneToMany;break;case "NoRelationship":$v_3.relationshipType=Mscrm.RibbonRuleRelationshipType.noRelationship;break}return $v_3},getCommandDefinition:function($p0,$p1){if(IsNull(Mscrm.RibbonCommands)||IsNull(Mscrm.RibbonCommands.commands))return null;return Mscrm.CommandHandler.$AD($p0,$p1,Mscrm.RibbonCommands.commands)},getEnableRuleDefinition:function($p0,$p1){if(IsNull(Mscrm.RibbonCommands)||IsNull(Mscrm.RibbonCommands.enableRules))return null;return Mscrm.CommandHandler.$AD($p0,$p1,Mscrm.RibbonCommands.enableRules)},$Ep_1:function($p0,$p1,$p2){var $v_0=new RemoteCommand("Ribbon","ProcessDynamicMenuXml");$v_0.SetParameter("dynamicMenuXml",$p0);$v_0.SetParameter("entityLogicalName",$p1);$v_0.SetParameter("hierarchyLocation",$p2);var $v_1=$v_0.Execute();if($v_1.Success){var $v_2=$v_1.ReturnValue,$v_3=Sys.Serialization.JavaScriptSerializer.deserialize($v_2.CommandDefinitions),$v_4=Sys.Serialization.JavaScriptSerializer.deserialize($v_2.RuleDefinitions),$v_5=new Mscrm.DynamicMenuCommandHandler($v_2.CommandPrefix,this.$H_1,$v_3,$v_4,$p1);this.$H_1&&this.$H_1.$4v_2&&this.$H_1.$4v_2.$9U_3($v_5);return $v_2?$v_2.MenuXml:$p0}else return $p0},$CH_1:function($p0,$p1){if(IsNull(Mscrm.RibbonCommands.enableRules))return true;var $v_0=this.getCommandDefinition($p0,$p1);if(IsNull($v_0))return true;var $v_1=$v_0.EnableRules;if(IsNull($v_1))return true;for(var $v_2=true,$v_3=0;$v_2&&$v_3<$v_1.length;$v_3++){var $v_4=$v_1[$v_3];if(IsNull($v_4)||!$v_4.length)continue;$v_2=$v_2&&this.$D0_1($v_4,$p1)}return $v_2},getId:function(){return this.$4_1},get_commandList:function(){return this.$2D_1},set_commandList:function($p0){this.$2D_1=$p0;return $p0},$7w_1:function($p0,$p1,$p2,$p3){var $v_0=this.getCommandDefinition($p0,$p1);if(IsNull($v_0)||IsNull($v_0.Actions))return false;for(var $v_1=0;$v_1<$v_0.Actions.length;$v_1++){var $v_2=$v_0.Actions[$v_1];switch($v_2.ActionType){case 2:this.$DF_1($v_2.Attributes);break;case 3:var $v_3=$v_2.Attributes;this.$9z_1($v_3.FunctionName,$v_3.Library,$v_2.Parameters,$p2);break;case 1:this.$DG_1($v_2.Attributes,$v_2.Parameters);break}}return true},$DF_1:function($p0){var $v_0=$p0.JavaScriptAction;!IsNull($v_0)&&typeof $v_0===Mscrm.TypeNames.functionType&&$v_0()},$9z_1:function($p0,$p1,$p2,$p3){Mscrm.CrmHeader.setScriptFile(Mscrm.CrmUri.create($p1),true);for(var $v_0=window,$v_1=$p0.split("."),$v_2=0;$v_2<$v_1.length;$v_2++)if($v_0)$v_0=$v_0[$v_1[$v_2]];if(!IsNull($v_0)&&typeof $v_0===Mscrm.TypeNames.functionType){var $v_3=this.$CN_1($p2,$p3);return $v_0.apply(null,$v_3)}return null},$DG_1:function($p0,$p1){var $v_0=Mscrm.CrmUri.create($p0.Address);$v_0.checkParamsNoEqual=true;if($p0.PassParameters)$v_0=addIsvParameters($v_0);for(var $v_1=0;$v_1<$p1.length;$v_1++){var $v_2=$p1[$v_1].ParameterName,$v_3=this.$9x_1($p1[$v_1],1);if(!IsNull($v_2)&&$v_2.length>0)$v_0.get_query()[$v_2]=$v_3}openIsvWin($v_0,false,$p0.WinMode,$p0.WinParameters,null)},$9x_1:function($p0,$p1){switch($p0.ParameterType){case 18:case 19:case 20:case 21:return $p0.Value;case 14:return window.ORG_UNIQUE_NAME;case 15:return window.ORG_LANGUAGE_CODE;case 16:return window.USER_LANGUAGE_CODE;case 1:return this.$H_1.get_$Ay_2();case 2:return this.$H_1.get_$Az_2();case 3:if($p1===1)return Mscrm.CommandHandler.$7l(this.$H_1.get_$8Q_2());else return Array.clone(this.$H_1.get_$8Q_2());case 4:var $v_0=this.$H_1.get_$8Q_2();return !IsNull($v_0)&&!IsNull($v_0.length)&&$v_0.length>0?$v_0[0]:null;case 7:return this.$H_1.get_$B7_2();case 8:return this.$H_1.get_$B8_2();case 11:case 22:return this.$H_1.get_$B9_2();case 25:var $v_1=this.$H_1.$g_2;return $v_1?$v_1.get_recordCount():0;case 28:var $v_2=this.$H_1.$g_2;return $v_2?$v_2.get_recordCount()-$v_2.get_selectedRecordCount():0;case 9:case 23:case 29:case 26:var $v_3=this.$H_1.$g_2,$v_4=null;if($v_3)if($p0.ParameterType===9||$p0.ParameterType===23)$v_4=this.$H_1.get_$BA_2();else if($p0.ParameterType===29)$v_4=this.$H_1.$g_2.get_unselectedIds();else $v_4=this.$H_1.$g_2.get_allRecordIds();else $v_4=[];if($p1===1)return Mscrm.CommandHandler.$7l($v_4);else return Array.clone($v_4);case 24:case 30:case 27:var $v_5=this.$H_1.$g_2,$v_6=null;if($v_5)if($p0.ParameterType===24)$v_6=this.$H_1.$g_2.get_selectedRecords();else if($p0.ParameterType===30)$v_6=this.$H_1.$g_2.get_unselectedRecords();else $v_6=this.$H_1.$g_2.get_allRecords();else $v_6=[];if($p1===1){for(var $v_7=new Array($v_6.length),$v_8=0;$v_8<$v_6.length;$v_8++)$v_7[$v_8]=$v_6[$v_8].Id;return Mscrm.CommandHandler.$7l($v_7)}else return Array.clone($v_6);case 10:var $v_9=this.$H_1.get_$BA_2();return !IsNull($v_9)&&!IsNull($v_9.length)&&$v_9.length>0?$v_9[0]:null;case 5:case 6:case 12:case 13:var $v_A=$p0.ParameterType===5||$p0.ParameterType===6,$v_B=true,$v_C=$v_A?this.$H_1.$1r_2:this.$H_1.$g_2,$v_D=null,$v_E=null;if($v_C)$v_E=$v_C.get_id();else{$v_B=false;$v_D=$v_A?null:this.$H_1.$4K_2;if($v_D)$v_E=$v_D.id;else return null}if($p0.ParameterType===13||$p1===1)return $v_E;else if($v_B)return $v_C;else return $v_D;case 0:default:return null}},$CN_1:function($p0,$p1){for(var $v_0=[],$v_1=0;$v_1<$p0.length;$v_1++)if($p0[$v_1].ParameterType===17)$v_0[$v_1]=$p1;else $v_0[$v_1]=this.$9x_1($p0[$v_1],3);return $v_0},$D0_1:function($p0,$p1){var $v_0=this.getEnableRuleDefinition($p0,$p1);if(IsNull($v_0)||IsNull($v_0.Rules)||!$v_0.Rules.length)return true;for(var $v_1=true,$v_2=0;$v_1&&$v_2<$v_0.Rules.length;$v_2++)$v_1=$v_1&&this.$9y_1($v_0.Rules[$v_2]);return $v_1},$9y_1:function($p0){if(IsNull($p0))return false;var $v_0=$p0.DefaultValue;switch($p0.RuleType){case 8:$v_0=this.$Cz_1($p0);break;case 1:$v_0=this.$D2_1($p0);break;case 7:$v_0=this.$D3_1($p0,$p0.DefaultValue);break;case 4:$v_0=this.$D4_1($p0,$p0.DefaultValue);break;case 16:$v_0=this.$D5_1($p0);break;case 2:$v_0=this.$D6_1($p0);break;case 10:$v_0=this.$D7_1($p0);break;case 19:$v_0=this.$D8_1($p0,$p0.DefaultValue);break;case 17:$v_0=this.$D9_1($p0);break;case 12:$v_0=this.$DA_1($p0);break;case 6:$v_0=this.$D1_1($p0,$p0.DefaultValue);break;case 5:$v_0=this.$DB_1($p0,$p0.DefaultValue);break;case 11:$v_0=this.$DC_1($p0);break;case 3:$v_0=this.$DD_1($p0,$p0.DefaultValue);break}if(IsNull($v_0))$v_0=IsNull($p0.DefaultValue)?true:$p0.DefaultValue;if(!IsNull($p0.InvertResult)&&$p0.InvertResult)$v_0=!$v_0;return $v_0},$Cz_1:function($p0){if(Mscrm.SessionInfo.isOutlookClient())return $p0.ClientType===2;else return $p0.ClientType===1},$D2_1:function($p0){var $v_0=null,$v_1=null,$v_2=-1,$v_3=$p0.AppliesTo;if(IsNull($v_3)||$v_3===Mscrm.RuleAppliesTo.none)$v_3=Mscrm.RuleAppliesTo.primaryEntity;if($v_3===Mscrm.RuleAppliesTo.primaryEntity){$v_0=this.$H_1.get_$Az_2();$v_2=this.$H_1.get_$Ay_2();$v_1=this.$H_1.get_$En_2()}else if($v_3===Mscrm.RuleAppliesTo.selectedEntity){$v_0=this.$H_1.get_$B8_2();$v_2=this.$H_1.get_$B7_2();$v_1=this.$H_1.get_$B6_2()}var $v_4=IsNull($p0.EntityLogicalName)||!$p0.EntityLogicalName.length||($p0.EntityLogicalName==="listmember"?$v_0==="account"||$v_0==="contact"||$v_0==="lead":$v_0===$p0.EntityLogicalName);if(!$v_4)if($v_2!==-1&&$p0.EntityLogicalName==="activitypointer"&&Mscrm.EntityPropUtil.isActivityTypeCode($v_2)&&$v_1===Mscrm.RibbonContexts.homepageGrid)$v_4=true;var $v_5=IsNull($p0.EntityContextName)||!$p0.EntityContextName.length||$v_1===$p0.EntityContextName;return $v_4&&$v_5},$D3_1:function($p0,$p1){var $v_0=this.$H_1.$1r_2;if($v_0&&isInstanceOfTypeAcrossFrames($v_0,Mscrm.FormProxyForRibbon))$v_0=$v_0.get_crmFormControl();if(!$v_0||!isInstanceOfTypeAcrossFrames($v_0,Mscrm.FormControl))return $p1;var $v_1=$v_0.get_formType();return $v_1===$p0.FormState},$D4_1:function($p0,$p1){var $v_0=this.$9z_1($p0.FunctionName,$p0.Library,$p0.Parameters,null);if(!IsNull($v_0)&&typeof $v_0===Mscrm.TypeNames.booleanType)return $v_0;else return $p1},$D5_1:function($p0){if(Mscrm.SessionInfo.isOutlookClient())if(Mscrm.SessionInfo.isOnline())return $p0.OfflineAccessState===1;else return $p0.OfflineAccessState===2;else return false},$D6_1:function($p0){for(var $v_0=0;$v_0<$p0.OrGroups.length;$v_0++){for(var $v_1=$p0.OrGroups[$v_0],$v_2=true,$v_3=0;$v_2&&$v_3<$v_1.Rules.length;$v_3++)$v_2=$v_2&&this.$9y_1($v_1.Rules[$v_3]);if($v_2)return true}return false},$D7_1:function($p0){if(Mscrm.SessionInfo.isOutlookWorkstationClient())return $p0.OutlookClientType===1;else if(Mscrm.SessionInfo.isOutlookLaptopClient())return $p0.OutlookClientType===2;else return false},$D8_1:function($p0,$p1){if(Mscrm.SessionInfo.isOutlookClient()){var $v_0=getOutlookHostedWindow().isItemTrackedInCrm();return $v_0===$p0.TrackedInCrm}else return $p1},$D9_1:function($p0){if(Mscrm.SessionInfo.isOutlookClient()){var $v_0=Mscrm.SessionInfo.getOutlookMajorVersion();if(!$v_0)if($p0.Version===1||$p0.Version===2)return true;else return false;else if($v_0<=11)return $p0.Version===1;else if($v_0===12)return $p0.Version===2;else if($v_0===14)return $p0.Version===3}return false},$DA_1:function($p0){var $v_0=Mscrm.Utilities.getContentUrl(this),$v_1=$v_0.get_path(),$v_2=Mscrm.CrmUri.create($p0.Address).get_path();if(!$v_1.startsWith("/"))$v_1="/"+$v_1;if(!$v_2.startsWith("/"))$v_2="/"+$v_2;$v_1=$v_1.toUpperCase();$v_2=$v_2.toUpperCase();return $v_1===$v_2},$D1_1:function($p0,$p1){var $v_0=this.$H_1.get_$Ax_2();if(!$v_0)return $p1;var $v_1=$p0.PrivilegeType;return $v_0.verifyRecordPermission($v_1)},$DB_1:function($p0,$p1){var $v_0;if($p0.AppliesTo===Mscrm.RuleAppliesTo.primaryEntity)$v_0=this.$H_1.get_$Eo_2();else if($p0.AppliesTo===Mscrm.RuleAppliesTo.selectedEntity)$v_0=this.$H_1.get_$B9_2();else return $p1;return $v_0>=$p0.Minimum&&($v_0<=$p0.Maximum||$p0.Maximum===-1)},$DC_1:function($p0){var $v_0=0;if(window.IS_LIVE)$v_0|=2;if(window.IS_ONPREMISE)$v_0|=1;if(window.IS_SPLA)$v_0|=4;var $v_1=$v_0&$p0.SkuTypes;return !!$v_1},$DD_1:function($p0,$p1){var $v_0=this.$H_1.get_$Ax_2();if(!$v_0)return $p1;var $v_1=$v_0.getUnformattedValue($p0.Field);if(IsNull($v_1))return $p1;return $v_1.toString()===$p0.Value}};Mscrm.CommandHandlerWrapper=function($p0){Mscrm.CommandHandlerWrapper.initializeBase(this);this.$1w_1=$p0;this.$2D_1=$p0.getGlobalCommands();this.$4_1=$p0.getId()};Mscrm.CommandHandlerWrapper.prototype={$1w_1:null,$2D_1:null,$4_1:null,getGlobalCommands:function(){return this.$2D_1},getFocusedCommands:function(){return this.$2D_1},handleCommand:function($p0,$p1,$p2){if(this.$1w_1&&!this.$1w_1.$3m_1)return this.$1w_1.handleCommand($p0,$p1,$p2);return false},canHandleCommand:function($p0){if(this.$1w_1&&!this.$1w_1.$3m_1)return this.$1w_1.canHandleCommand($p0);return false},getId:function(){return this.$4_1}};Mscrm.AlwaysEnabledCommandHandler=function($p0,$p1){this.$2E_1=[];Mscrm.AlwaysEnabledCommandHandler.initializeBase(this);this.$4_1=$p0;this.$2E_1=$p1};Mscrm.AlwaysEnabledCommandHandler.prototype={$4_1:null,getGlobalCommands:function(){return this.$2E_1},handleCommand:function($p0,$p1,$p2){return true},canHandleCommand:function($p0){return true},getId:function(){return this.$4_1}};Mscrm.CrmDataSource=function($p0,$p1,$p2){this.$$d_$CL_1=Function.createDelegate(this,this.$CL_1);Mscrm.CrmDataSource.initializeBase(this,[null,null,null]);this.$6y_1=$p1;this.$38_1=$p2;this.$Eh_1($p0)};Mscrm.CrmDataSource.$CJ=function($p0,$p1){var $v_0=$p0.sequence,$v_1=$p1.sequence;if(IsNull($v_1))return -1;else if(IsNull($v_0))return 1;else return $v_0-$v_1};Mscrm.CrmDataSource.prototype={$1u_1:null,$6y_1:null,$38_1:null,dispose:function(){this.$1u_1=null;this.$6y_1=null;this.$38_1=null;CUI.DataSource.prototype.dispose.call(this)},runQuery:function($p0){var $v_0=null;switch($p0.queryType){case 5:$v_0=this.$Dc_1($p0);break;case 4:$v_0=this.$Dd_1($p0);break;case 2:$v_0=this.$DW_1($p0);break;default:break}var $v_1=new CUI.DataQueryResult;$v_1.contextData=$p0.data;$v_1.id=$p0.id;if(!IsNull($v_0)){$v_1.queryData=$v_0;$v_1.success=true;$p0.handler($v_1)}else $v_1.success=false},getInitialTabId:function($p0){this.$1u_1.sort(this.$$d_$CL_1);for(var $v_0=0;$v_0<this.$1u_1.length;$v_0++)if(this.$1u_1[$v_0]===$p0)return $p0;if(this.$1u_1.length>0)return this.$1u_1[0];return ""},onDataReturned:function($p0){},$Dc_1:function($p0){var $v_0=null;if($p0.id===Mscrm.RibbonConstants.jewelId)$v_0=this.$6y_1;return $v_0},$Dd_1:function($p0){var $v_0=$p0.id,$v_1=this.$38_1[$v_0];if(!IsNull($v_1)&&$v_1.TabExists){var $v_2=[],$v_3=[];if($v_1.IsContextual){var $v_5=[];Array.add($v_5,$v_1.TabLayout);this.$BE_1($v_1.ContextualGroupLayout,$v_5);Array.add($v_3,$v_1.ContextualGroupLayout)}else Array.add($v_2,$v_1.TabLayout);var $v_4=$v_1.FullLayout;this.$BH_1($v_4,$v_2,$v_3);return $v_4}return null},$DW_1:function($p0){for(var $v_0=$p0.id,$v_1=[],$v_2=[],$v_3={},$v_4=null,$v_6=0;$v_6<this.$1u_1.length;$v_6++){var $v_7=this.$38_1[this.$1u_1[$v_6]];if(!IsNull($v_7)&&$v_7.TabExists){var $v_8=null;if($v_7.IsContextual){var $v_9=$v_7.ContextualGroupId;if(IsNull($v_3[$v_9])){var $v_A=new Mscrm.ContextualGroupInfo;$v_A.id=$v_9;$v_A.sequence=$v_7.ContextGroupSequence;Array.add($v_2,$v_A);$v_3[$v_9]={};$v_3[$v_9]["Layout"]=$v_7.ContextualGroupLayout;$v_3[$v_9]["Tabs"]=[]}$v_8=$v_3[$v_9]["Tabs"]}else $v_8=$v_1;if($v_7.TabId===$v_0){Array.add($v_8,$v_7.TabLayout);$v_4=$v_7.FullLayout}else Array.add($v_8,$v_7.TabHeaderLayout)}}if(IsNull($v_4))return null;$v_2.sort(Mscrm.CrmDataSource.$CJ);for(var $v_5=[],$v_B=0;$v_B<$v_2.length;$v_B++){var $v_C=$v_2[$v_B].id,$v_D=$v_3[$v_C],$v_E=$v_D["Layout"];this.$BE_1($v_E,$v_D["Tabs"]);Array.add($v_5,$v_E)}if(!$v_1.length&&!$v_5.length)return null;this.$BH_1($v_4,$v_1,$v_5);return $v_4},$BE_1:function($p0,$p1){$p0["children"]=$p1},$BH_1:function($p0,$p1,$p2){var $v_0=0,$v_1=$p0["children"];if(!IsNull($v_1))for(var $v_2=0;$v_2<$v_1.length&&$v_0<2;$v_2++){var $v_3=$v_1[$v_2];if(!IsNull($v_3)&&$v_3["name"]==="Ribbon")for(var $v_4=$v_3["children"],$v_5=0;$v_5<$v_4.length;$v_5++){var $v_6=$v_4[$v_5];if(!IsNull($v_6)){var $v_7=$v_6["name"];if($v_7==="Tabs"){$v_6["children"]=$p1;$v_0++}else if($v_7==="ContextualTabs"){$v_6["children"]=$p2;$v_0++}}}}},$Eh_1:function($p0){this.$1u_1=new Array(0);for(var $v_0=0;$v_0<$p0.length;$v_0++){var $v_1=$p0[$v_0],$v_2=this.$38_1[$v_1];if(!IsNull($v_2)&&$v_2.TabExists)this.$1u_1[this.$1u_1.length]=$v_1}},$CL_1:function($p0,$p1){var $v_0=this.$38_1[$p0],$v_1=this.$38_1[$p1];if(IsNull($v_1)||!$v_1.TabExists)return -1;else if(IsNull($v_0)||!$v_0.TabExists)return 1;if(!$v_0.IsContextual&&$v_1.IsContextual)return -1;else if($v_0.IsContextual&&!$v_1.IsContextual)return 1;var $v_2,$v_3;if(!$v_0.IsContextual&&!$v_1.IsContextual||$v_0.ContextualGroupId===$v_1.ContextualGroupId){$v_2=$v_0.TabSequence;$v_3=$v_1.TabSequence}else{$v_2=$v_0.ContextGroupSequence;$v_3=$v_1.ContextGroupSequence}if(IsNull($v_3))return -1;else if(IsNull($v_2))return 1;else return $v_2-$v_3}};Mscrm.DynamicMenuCommandHandler=function($p0,$p1,$p2,$p3,$p4){this.$2E_2={};this.$7Q_2={};Mscrm.DynamicMenuCommandHandler.initializeBase(this,[$p0,$p1,null]);this.$90_2=$p4;for(var $v_0=new Array($p2.length),$v_1=0;$v_1<$p2.length;$v_1++){$v_0[$v_1]=$p2[$v_1].Id;this.$2E_2[$p2[$v_1].Id]=$p2[$v_1]}for(var $v_2=0;$v_2<$p3.length;$v_2++)this.$7Q_2[$p3[$v_2].Id]=$p3[$v_2];this.$2D_1=$v_0};Mscrm.DynamicMenuCommandHandler.prototype={$90_2:null,getCommandDefinition:function($p0,$p1){var $v_0=this.$2E_2[$p0];return $v_0?$v_0:Mscrm.CommandHandler.prototype.getCommandDefinition.call(this,$p0,$p1)},getEnableRuleDefinition:function($p0,$p1){var $v_0=this.$7Q_2[$p0];return $v_0?$v_0:Mscrm.CommandHandler.prototype.getEnableRuleDefinition.call(this,$p0,$p1)},parseCommandFromRibbon:function($p0){var $v_0=new Mscrm.CommandInformation;$v_0.command=$p0;$v_0.entityContext="";$v_0.entityLogicalName=this.$90_2;$v_0.relationshipType=Mscrm.RibbonRuleRelationshipType.noRelationship;return $v_0}};Mscrm.RibbonData=function(){this.$7T_2=Mscrm.EntityTypeCode.None;this.$7S_2=new Array(0);Mscrm.RibbonData.initializeBase(this)};Mscrm.RibbonData.setRibbonEnabledState=function(enabled){var $v_0=$find("crmRibbonData");if($v_0){$v_0.get_$3G_2().$5T_1=enabled;$v_0.raiseEventWithCheck(Mscrm.ScriptEvents.RibbonRefresh,null)}};Mscrm.RibbonData.prototype={$1S_2:null,$5a_2:null,$6T_2:null,$1w_2:null,$3C_2:null,$2E_2:null,$28_2:null,$5D_2:null,$9E_2:false,$8n_2:false,$3m_2:false,$6u_2:false,dispose:function(){if(this.get_isDisposed())return;if(!IsNull(Mscrm)){if(!IsNull(Mscrm.RibbonLayout)){Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.jewelLayout);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.tabs);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.TabLayouts);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.ContextualGroupLayouts);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.menuSectionAndGroupCounts);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.menuSectionAndGroupControls);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.tabGroupCount);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout.parentGroupCommands);Mscrm.Utilities.destroyObject(Mscrm.RibbonLayout)}if(!IsNull(Mscrm.RibbonCommands)){Mscrm.Utilities.destroyObject(Mscrm.RibbonCommands.commands);Mscrm.Utilities.destroyObject(Mscrm.RibbonCommands.enableRules);Mscrm.Utilities.destroyObject(Mscrm.RibbonCommands)}delete Mscrm.RibbonLayout;delete Mscrm.RibbonCommands}this.$4K_2=null;this.$8r_2=null;Mscrm.CrmUIComponent.prototype.dispose.call(this)},initialize:function(){Mscrm.CrmUIComponent.prototype.initialize.call(this);this.$5a_2={};this.$6T_2={};this.$28_2={};this.$5D_2={};this.$8n_2=Mscrm.RibbonLayout.isInvalid;for(var $v_0=0;$v_0<this.$1S_2.TabList.length;$v_0++){var $v_1=this.$1S_2.TabList[$v_0],$v_2=$v_1.TabId,$v_3=this.get_$4E_2()[$v_2];if(!IsNull($v_3)&&$v_3.TabExists){if(!isNullOrEmptyString($v_3.TabCommand))this.$28_2[$v_3.TabCommand]=false;if(!isNullOrEmptyString($v_3.ContextGroupCommand))this.$5D_2[$v_3.ContextGroupCommand]=false}var $v_4=this.$BQ_2($v_2);if(IsNull(this.get_$6L_2()[$v_4])){this.$5a_2[$v_2]=true;if(!IsNull($v_3)&&$v_3.IsContextual&&!isNullOrEmptyString($v_3.ContextualGroupId))this.$6T_2[$v_3.ContextualGroupId]=true}}!IsNull(this.$4s_2)&&this.$F5_2($get(this.$4s_2.get_id()))},$BQ_2:function($p0){var $v_0=$p0;if($v_0.startsWith("EntityTemplateTab.")){$v_0=$v_0.substr(18);for(var $v_1=new Array(4),$v_2=0,$v_3=0;$v_3<3;$v_3++){var $v_4=$v_0.indexOf(".",$v_2);$v_1[$v_3]=$v_0.substring($v_2,$v_4);$v_2=$v_4+1}$v_1[3]=$v_0.substr($v_2);$v_0=$v_1.join("|")}return $v_0},handleEvent:function(eventCode,parameters,sourceComponent){switch(eventCode){case Mscrm.ScriptEvents.PageLoaded:($find("crmPageManager")===sourceComponent||$find("crmInlinePageManager")===sourceComponent)&&this.raiseEvent(Mscrm.ScriptEvents.RibbonDataLoad,null);break;case Mscrm.ScriptEvents.PageUnloaded:if(false===this.$9E_2&&($find("crmPageManager")===sourceComponent||$find("crmInlinePageManager")===sourceComponent)){this.$9E_2=true;this.raiseEvent(Mscrm.ScriptEvents.RibbonDataUnload,null);this.dispose()}break;case Mscrm.ScriptEvents.SelectionChanged:if($find(sourceComponent.get_id())===sourceComponent)if(sourceComponent===this.$1r_2&&this.$4v_2)this.raiseEvent(Mscrm.ScriptEvents.RibbonRefresh,null);else sourceComponent===this.$g_2&&this.$BL_2(sourceComponent);break;case Mscrm.ScriptEvents.SetRibbonSelectedControl:if(IsNull(this.$4s_2)){var $v_0=parameters["selectedControl"];this.$BG_2($v_0)}break;case Mscrm.ScriptEvents.RibbonTabSwitch:var $v_1=parameters;this.$8q_2=$v_1.NewContextCommand;break}return null},$8q_2:null,get_serverInformation:function(){return this.$1S_2},set_serverInformation:function(value){this.$1S_2=value;return value},isControlVisible:function(command,id){return !IsNull(this.get_$7j_2()[command])&&IsNull(this.get_$6L_2()[id])},isControlEnabled:function(command){return !IsNull(this.get_$7j_2()[command])&&this.get_$3G_2().canHandleCommand(command)},$A5_2:function(){var $$dict_0=this.$28_2;for(var $$key_1 in $$dict_0){var $v_0={key:$$key_1,value:$$dict_0[$$key_1]};this.get_$3G_2().canHandleCommand($v_0.key)}},executeCommand:function(command,properties){if(this.isControlEnabled(command)){if(!properties)properties={};this.get_$3G_2().handleCommand(command,properties,0)}},getDynamicMenuRibbonFromCommand:function(command,properties){if(this.isControlEnabled(command)){if(!properties)properties={};this.get_$3G_2().handleCommand(command,properties,0);return properties["PopulationXML"]}return null},get_$44_2:function(){return this.$1S_2.InitialTabId},set_$44_2:function($p0){this.$1S_2.InitialTabId=$p0;return $p0},get_$6L_2:function(){if(IsNull(this.$3C_2)){this.$3C_2={};for(var $v_0=0;$v_0<this.$1S_2.TrimList.length;$v_0++){var $v_1=this.$1S_2.TrimList[$v_0];this.$3C_2[$v_1]=true;if(!IsNull(Mscrm.RibbonLayout.menuSectionAndGroupControls)){var $v_2=Mscrm.RibbonLayout.menuSectionAndGroupControls[$v_1];if(!isNullOrEmptyString($v_2)){var $v_3=Mscrm.RibbonLayout.menuSectionAndGroupCounts[$v_2]-1;Mscrm.RibbonLayout.menuSectionAndGroupCounts[$v_2]=$v_3;if($v_3<=0){this.$3C_2[$v_2]=true;var $v_4=Mscrm.RibbonLayout.menuSectionAndGroupControls[$v_2];if(!isNullOrEmptyString($v_4)){var $v_5=Mscrm.RibbonLayout.tabGroupCount[$v_4]-1;Mscrm.RibbonLayout.tabGroupCount[$v_4]=$v_5;if($v_5<=0){var $v_6=this.$BQ_2($v_4);this.$3C_2[$v_6]=true}}}}}}if(this.$De_2()){var $v_7=window.parent.$find("crmRibbonData");if($v_7&&isInstanceOfTypeAcrossFrames($v_7,Mscrm.RibbonData)){var $v_8=$v_7.get_$6L_2(),$$dict_9=$v_8;for(var $$key_A in $$dict_9){var $v_9={key:$$key_A,value:$$dict_9[$$key_A]};this.$3C_2[$v_9.key]=$v_9.value}}}}return this.$3C_2},$De_2:function(){for(var $v_0=this.$1S_2.TabList,$v_1=this.get_$4E_2(),$v_2=0;$v_2<$v_0.length;$v_2++){var $v_3=$v_1[$v_0[$v_2].TabId];if($v_3&&$v_3.IsContextual&&!isNullOrEmptyString($v_3.ContextualGroupId)&&Mscrm.RibbonNavigationModel.isContextualGroupForAssociatedGrid($v_3.ContextualGroupId))return true}return false},get_$7j_2:function(){if(!this.$2E_2){for(var $v_0={},$v_1=0;$v_1<this.$1S_2.CommandIds.length;$v_1++)$v_0[this.$1S_2.CommandIds[$v_1]]=true;this.$2E_2=$v_0}return this.$2E_2},get_$Dq_2:function(){return this.$1S_2.IsDefaultData},get_$AY_2:function(){if(isNullOrEmptyString(this.get_$44_2()))return true;var $$dict_0=this.$5a_2;for(var $$key_1 in $$dict_0){var $v_0={key:$$key_1,value:$$dict_0[$$key_1]};return false}return true},get_$3G_2:function(){if(IsNull(this.$1w_2)){var $v_0=this.$6l_2+"_CommandHandler";this.$1w_2=new Mscrm.CommandHandler($v_0,this,this.$1S_2.CommandIds)}return this.$1w_2},get_$Dx_2:function(){return Mscrm.RibbonLayout.jewelLayout},get_$4E_2:function(){return Mscrm.RibbonLayout.tabs},$8r_2:null,$6l_2:null,$t_2:null,$4v_2:null,$4K_2:null,$g_2:null,$9K_2:"",$9J_2:0,$8s_2:"",$F5_2:function($p0){this.$4K_2=$p0;this.$BG_2($find($p0.id))},$BG_2:function($p0){this.$g_2=$p0;if(!IsNull($p0))this.$4K_2=$get($p0.get_id());else this.$4K_2=null;this.$BL_2($p0)},$BL_2:function($p0){var $v_0="",$v_1=Mscrm.EntityTypeCode.None,$v_2=0,$v_3=new Array(0),$v_4="";if($p0&&Mscrm.IRibbonSelectionControl.isInstanceOfType($p0)){$v_0=$p0.get_entityTypeName();$v_1=$p0.get_entityTypeCode();$v_2=$p0.get_selectedRecordCount();$v_3=$p0.get_selectedIds();$v_4=$p0.get_id()}var $v_5=this.$9K_2!==$v_0||this.$7T_2!==$v_1||this.$9J_2!==$v_2||this.$7S_2.length!==$v_3.length||this.$8s_2!==$v_4;this.$9K_2=$v_0;this.$7T_2=$v_1;this.$9J_2=$v_2;this.$7S_2=$v_3;this.$8s_2=$v_4;$v_5&&this.$4v_2&&this.raiseEvent(Mscrm.ScriptEvents.RibbonRefresh,null)},get_$B7_2:function(){if(!IsNull(this.$g_2))return this.$g_2.get_entityTypeCode();return 0},get_$B8_2:function(){if(!IsNull(this.$g_2))return this.$g_2.get_entityTypeName();return null},get_$B9_2:function(){if(!IsNull(this.$g_2))return this.$g_2.get_selectedRecordCount();return 0},get_$BA_2:function(){if(!IsNull(this.$g_2))return this.$g_2.get_selectedIds();return null},get_$B6_2:function(){if(!IsNull(this.$g_2))return this.$g_2.get_ribbonContextType();return null},$1r_2:null,get_primaryControl:function(){return this.$1r_2},set_primaryControl:function(value){this.$1r_2=value;return value},$4s_2:null,get_permanentlySelectedControl:function(){return this.$4s_2},set_permanentlySelectedControl:function(value){this.$4s_2=value;return value},get_$Ax_2:function(){return this.$1r_2},get_$Ay_2:function(){var $v_0=this.$1r_2;try{return $v_0.get_entityTypeCode()}catch($$e_1){return Mscrm.EntityTypeCode.None}},get_$Az_2:function(){var $v_0=this.$1r_2;try{return $v_0.get_entityTypeName()}catch($$e_1){return null}},get_$Eo_2:function(){var $v_0=this.$1r_2;try{return $v_0.get_selectedRecordCount()}catch($$e_1){return 0}},get_$8Q_2:function(){var $v_0=this.$1r_2;try{return $v_0.get_selectedIds()}catch($$e_1){return new Array(0)}},get_$En_2:function(){var $v_0=this.$1r_2;try{return $v_0.get_ribbonContextType()}catch($$e_1){return null}}};function _ribbonScaleHeader(elmRibbonTopBars,isRtl){Mscrm.RibbonHeaderScaling.scaleHeader(elmRibbonTopBars,isRtl)}Mscrm.RibbonHeaderScaling=function(){};Mscrm.RibbonHeaderScaling.scaleHeader=function(elmTopBars,isRtl){if(IsNull(isRtl))isRtl=false;for(var $v_0=elmTopBars.childNodes[1],$v_1=$v_0.childNodes.length,$v_2=null,$v_6=0;$v_6<$v_1;$v_6++){var $v_7=$v_0.childNodes[$v_6];if($v_7.className.indexOf("ms-cui-tts")!==-1){$v_2=$v_7;break}}if(IsNull($v_2))return;!Mscrm.RibbonHeaderScaling.$8I($v_0,$v_2,isRtl)&&Mscrm.RibbonHeaderScaling.$DH($v_0,$v_2,isRtl);while(Mscrm.RibbonHeaderScaling.$8I($v_0,$v_2,isRtl)){var $v_8=Mscrm.RibbonHeaderScaling.$84($v_2);Mscrm.RibbonHeaderScaling.$AO($v_2,isRtl);if($v_8===Mscrm.RibbonHeaderScaling.$84($v_2))break}Mscrm.RibbonHeaderScaling.$Cq(elmTopBars,$v_2,isRtl);for(var $v_3=null,$v_4=$v_2.getElementsByTagName("DIV"),$v_9=0;$v_9<$v_4.length;$v_9++){var $v_A=$v_4[$v_9];if($v_A.className.indexOf("ms-cui-cg-t")>=0&&$v_A.style.display!=="none")$v_3=$v_A}var $v_5={};$v_5["tabElement"]=$v_2;$v_5["lastContextualTabElement"]=$v_3;Mscrm.PageManager.get_instance().raiseEvent(Mscrm.ScriptEvents.RibbonTabScalingComplete,$v_5)};Mscrm.RibbonHeaderScaling.$8I=function($p0,$p1,$p2){if(Mscrm.RibbonHeaderScaling.$9e($p0,$p2))return true;if(Mscrm.RibbonHeaderScaling.$Dh($p1,$p2))return true;if(Mscrm.Utilities.isIE7())return false;else return Mscrm.RibbonHeaderScaling.$9e($p1,$p2)};Mscrm.RibbonHeaderScaling.$Dh=function($p0,$p1){if($p1){if($p0.offsetLeft+Mscrm.RibbonHeaderScaling.$84($p0)<220)return true}else if($p0.offsetLeft+$p0.offsetWidth>document.body.offsetWidth-220)return true;return false};Mscrm.RibbonHeaderScaling.$9e=function($p0,$p1){if(!$p0.offsetWidth)return false;for(var $v_0=[],$v_1=$p0.childNodes.length,$v_2=0;$v_2<$v_1;$v_2++){var $v_3=$p0.childNodes[$v_2];!IsNull($v_3)&&$v_3.nodeName!=="#text"&&$v_3.offsetWidth>0&&$v_3.offsetHeight>0&&Array.add($v_0,$v_3)}$v_1=$v_0.length;for(var $v_4=0;$v_4<$v_1-1;$v_4++){var $v_5=$v_0[$v_4],$v_6=$v_0[$v_4+1];if(!IsNull($v_6))if(Mscrm.RibbonHeaderScaling.$BU($v_5,$v_6,$p1))return true}return false};Mscrm.RibbonHeaderScaling.$DH=function($p0,$p1,$p2){Mscrm.RibbonHeaderScaling.$FL($p1,$p2);while(Mscrm.RibbonHeaderScaling.$88($p1)){Mscrm.RibbonHeaderScaling.$Dg($p1,$p2);if(Mscrm.RibbonHeaderScaling.$8I($p0,$p1,$p2)){Mscrm.RibbonHeaderScaling.$AO($p1,$p2);break}}};Mscrm.RibbonHeaderScaling.$88=function($p0){if(IsNull($p0._scaleStep))if($p0.className.indexOf("ms-cui-tts-scale1")!==-1)$p0._scaleStep=1;else if($p0.className.indexOf("ms-cui-tts-scale2")!==-1)$p0._scaleStep=2;else $p0._scaleStep=0;return parseInt($p0._scaleStep)};Mscrm.RibbonHeaderScaling.$AO=function($p0,$p1){var $v_0=$p1&&Mscrm.Utilities.isIE7()?3:Mscrm.RibbonHeaderScaling.$88($p0);switch($v_0){case 0:Mscrm.RibbonHeaderScaling.$4C($p0,1);break;case 1:Mscrm.RibbonHeaderScaling.$4C($p0,2);break;case 2:Mscrm.RibbonHeaderScaling.$4C($p0,3);break;case 3:Mscrm.RibbonHeaderScaling.$Dj($p0,$p1);break}};Mscrm.RibbonHeaderScaling.$Dj=function($p0,$p1){for(var $v_0=$p0.childNodes,$v_1=$v_0.length-1;$v_1>=0;$v_1--)if($v_0[$v_1].style.visibility!=="hidden"){Mscrm.RibbonHeaderScaling.$AQ($v_0[$v_1]);break}};Mscrm.RibbonHeaderScaling.$FL=function($p0,$p1){for(var $v_0=$p0.childNodes,$v_1=$v_0.length-1;$v_1>=0;$v_1--)Mscrm.RibbonHeaderScaling.$BP($v_0[$v_1])};Mscrm.RibbonHeaderScaling.$Dg=function($p0,$p1){var $v_0=$p1&&Mscrm.Utilities.isIE7()?1:Mscrm.RibbonHeaderScaling.$88($p0);switch($v_0){case 1:Mscrm.RibbonHeaderScaling.$4C($p0,0);break;case 2:Mscrm.RibbonHeaderScaling.$4C($p0,1);break;case 3:Mscrm.RibbonHeaderScaling.$4C($p0,2);break}};Mscrm.RibbonHeaderScaling.$84=function($p0){for(var $v_0=0,$v_1=$p0.childNodes,$v_2=$v_1.length-1;$v_2>=0;$v_2--)if($v_1[$v_2].style.visibility==="hidden")$v_0+=$v_1[$v_2].offsetWidth;return $v_0};Mscrm.RibbonHeaderScaling.$4C=function($p0,$p1){$p0.className=Mscrm.RibbonHeaderScaling.$B2[$p1];$p0._scaleStep=$p1};Mscrm.RibbonHeaderScaling.$BU=function($p0,$p1,$p2){if($p2){if($p1.offsetLeft+$p1.offsetWidth>$p0.offsetLeft)return true}else if($p0.offsetLeft+$p0.offsetWidth>$p1.offsetLeft)return true;return false};Mscrm.RibbonHeaderScaling.$Cq=function($p0,$p1,$p2){var $v_0=$p0.childNodes[0];if(IsNull($v_0))return;for(var $v_1=$v_0.childNodes.length,$v_2=null,$v_4=0;$v_4<$v_1;$v_4++){var $v_5=$v_0.childNodes[$v_4];if($v_5.className.indexOf("ms-cui-QATRowCenter")!==-1){$v_2=$v_5;break}}if(IsNull($v_2))return;var $v_3=$p1.childNodes[$p1.childNodes.length-1];if($v_3.className.indexOf("ms-cui-cg")!==-1&&Mscrm.RibbonHeaderScaling.$BU($v_3,$v_2,$p2))Mscrm.RibbonHeaderScaling.$AQ($v_2);else Mscrm.RibbonHeaderScaling.$BP($v_2)};Mscrm.RibbonHeaderScaling.$AQ=function($p0){var $v_0=$p0._titleHidden;if(IsNull($v_0)||$v_0==="0"){$p0.style.visibility="hidden";$p0._titleHidden="1"}};Mscrm.RibbonHeaderScaling.$BP=function($p0){var $v_0=$p0._titleHidden;if(!IsNull($v_0)&&$v_0==="1"){$p0.style.visibility="visible";$p0._titleHidden="0"}};Mscrm.RibbonManager=function($p0){this.$$d_$Ez_3=Function.createDelegate(this,this.$Ez_3);this.$$d_$Em_3=Function.createDelegate(this,this.$Em_3);this.$2r_3=new Array(0);Mscrm.RibbonManager.initializeBase(this,[$p0]);this.get_element().setAttribute("currentRibbonElement","");if(!IsNull($get("perceivedRibbonId")))$get("crmTopBar").style.visibility="hidden"};Mscrm.RibbonManager.get_$3H=function(){if(!Mscrm.RibbonManager.$5h)Mscrm.RibbonManager.$5h=CUI.Page.PageManager.get_instance();return Mscrm.RibbonManager.$5h};Mscrm.RibbonManager.prototype={$3l_3:false,$5V_3:false,$2t_3:null,$E_3:null,$1W_3:null,$4I_3:null,$5R_3:null,$4G_3:false,$4i_3:false,$3u_3:null,initialize:function(){Mscrm.CrmUIControl.prototype.initialize.call(this);if(this.get_$8j_3())this.get_element().style.height="135px";else if(this.$5V_3)this.get_element().style.height="43px";else this.get_element().style.height="0px"},get_isOnOutlookStage:function(){return this.$3l_3},set_isOnOutlookStage:function(value){this.$3l_3=value;return value},get_hideChrome:function(){return this.$5V_3},get_isMinimized:function(){return Mscrm.RibbonManager.$4h},set_isMinimized:function(value){if(this.$E_3&&this.$E_3.$t_2&&this.$E_3.$t_2.get_ribbon()){var $v_0=this.$E_3.$8q_2,$v_1=this.$E_3.$t_2.get_ribbon();$v_1.set_minimized(Mscrm.RibbonManager.$4h=value);!value&&!isNullOrEmptyString($v_0)&&this.$E_3.$28_2[$v_0]&&$v_1.selectTabByCommand($v_0);!value&&isNullOrEmptyString($v_0)&&$v_1.selectTabById(this.$E_3.get_$44_2());this.$8U_3()}return value},setTabById:function(id){if(this.$E_3&&this.$E_3.$t_2&&this.$E_3.$t_2.get_ribbon()){this.$E_3.$t_2.get_ribbon().selectTabById(id);this.$8U_3()}},get_$8j_3:function(){var $v_0=true,$v_1=Mscrm.CrmUri.create(window.location.href);if($v_1.get_scheme().toLowerCase()==="outlook")$v_0=false;else{var $v_3=$v_1.get_query()["web"];if(!IsNull($v_3))$v_0=$v_3!=="false"}if(!IsNull($v_1.get_query()["_hc"])){this.$5V_3=$v_1.get_query()["_hc"].toLowerCase()==="true";if(this.$5V_3)return false}if(this.$Du_3($v_0))return false;var $v_2=Mscrm.SessionInfo.getClientMajorVersion();if(!IsNull($v_2)&&$v_2<=4)return !this.$3l_3||$v_0;if(this.$3l_3)return false;return $v_0},$Du_3:function($p0){if($p0)return false;var $v_0=Mscrm.CrmUri.create(window.location.href);if($v_0.get_path().toUpperCase().endsWith("/MAIN.ASPX")&&$v_0.get_query()["pagetype"]==="entitylist"){var $v_1=window.IS_ENTITY_RIBBONIZED;return !IsNull($v_1)&&!$v_1}return false},get_$BO_3:function(){return Mscrm.SessionInfo.isOutlook14Client()},get_$7q_3:function(){if(!this.$5R_3)this.$5R_3={};return this.$5R_3},handleEvent:function(eventCode,parameters,sourceComponent){switch(eventCode){case Mscrm.ScriptEvents.RibbonDataLoad:if(!IsNull(sourceComponent)){var $v_0=sourceComponent;(!$v_0.get_$AY_2()||$v_0.get_$B6_2()===Mscrm.RibbonContexts.homepageGrid)&&this.$Db_3(sourceComponent,parameters)}break;case Mscrm.ScriptEvents.RibbonDataUnload:this.$8C_3(sourceComponent);break;case Mscrm.ScriptEvents.PageLoaded:this.$DY_3(sourceComponent);break;case Mscrm.ScriptEvents.PageUnloaded:this.$DZ_3(sourceComponent);break;case Mscrm.ScriptEvents.RibbonRefresh:this.$8U_3();break;case Mscrm.ScriptEvents.RibbonRequestVisibleState:var $v_1=parameters["command"],$v_2=parameters["id"];if($v_1&&typeof $v_1===Mscrm.TypeNames.stringType&&$v_2&&typeof $v_2===Mscrm.TypeNames.stringType)return this.$AX_3($v_1,$v_2);else return false;case Mscrm.ScriptEvents.RibbonRequestEnabledState:var $v_3=parameters["command"],$v_4=parameters["id"];if($v_3&&typeof $v_3===Mscrm.TypeNames.stringType&&$v_4&&typeof $v_4===Mscrm.TypeNames.stringType)return this.$Dp_3($v_3,$v_4);else return false;case Mscrm.ScriptEvents.RibbonExecuteCommand:var $v_5=parameters["command"],$v_6=parameters["getRibbonXmlForOutlookClient"];if($v_5&&typeof $v_5===Mscrm.TypeNames.stringType)if(!$v_6)this.$7w_3($v_5);else{var $v_7=this.$DV_3($v_5,parameters);parameters["RibbonXmlForOutlookClientResult"]=$v_7}break;case Mscrm.ScriptEvents.RibbonRootEvent:var $v_8=parameters,$v_9=$v_8.Minimized;if(!IsNull($v_9)&&typeof $v_9===Mscrm.TypeNames.booleanType)Mscrm.RibbonManager.$4h=$v_9;this.raiseEvent(Mscrm.ScriptEvents.RequestResize,null);break;case Mscrm.ScriptEvents.RibbonTabSwitch:var $v_A=parameters;Mscrm.RibbonNavigationModel.onTabSwitch($v_A.OldContextId,$v_A.NewContextId,this.$E_3,$v_A.ChangedByUser);break;case Mscrm.ScriptEvents.RibbonSetFocusToLastControl:case Mscrm.ScriptEvents.RibbonSetFocusToSelf:var $v_B=parameters;this.$F9_3(eventCode,$v_B.eventElement);$v_B.eventElement=null;break}return null},dispose:function(){if(!IsNull(this.$3u_3)){window.clearTimeout(this.$3u_3);this.$4i_3=false}this.$4I_3=null;Mscrm.CrmUIControl.prototype.dispose.call(this)},$7w_3:function($p0){if(!IsNull(this.$E_3)){var $v_0={};$v_0["SourceControlId"]=this.get_id();this.$E_3.executeCommand($p0,$v_0)}},$DV_3:function($p0,$p1){if(!IsNull(this.$E_3))return this.$E_3.getDynamicMenuRibbonFromCommand($p0,$p1);return null},$Dp_3:function($p0,$p1){var $v_0=this.get_$7q_3()[$p0];if(IsNull($v_0)){if(!IsNull(this.$E_3))$v_0=this.$AX_3($p0,$p1)&&this.$E_3.isControlEnabled($p0);else $v_0=false;this.get_$7q_3()[$p0]=$v_0}return $v_0},$AX_3:function($p0,$p1){if(!IsNull(this.$E_3))return this.$E_3.isControlVisible($p0,$p1);else return false},$9U_3:function($p0){Mscrm.RibbonManager.get_$3H().addPageComponent($p0)},$Db_3:function($p0,$p1){if(!isInstanceOfTypeAcrossFrames($p0,Mscrm.RibbonData))return;if($p0.get_$Dq_2()&&IsNull(this.$2t_3)){this.$2t_3=$p0;return}if(this.$3l_3)this.$8G_3($p0,$p1);else this.$Ac_3($p0,$p1)},$Ac_3:function($p0,$p1){var $$t_4=this,$v_0=function(){try{$$t_4.$8G_3($p0,$p1)}catch($v_1){if($v_1.number!==-2146823277)throw $v_1}};executeFunctionDeferred($v_0,true,false)},$8G_3:function($p0,$p1){if($p0.$6u_2)return;this.$E_3&&!this.$E_3.$3m_2&&this.$8C_3(this.$E_3,true);var $v_0=$get("ms-crm-lightbox");if($v_0)$v_0.style.visibility="hidden";for(var $v_2=0;$v_2<this.$2r_3.length;$v_2++){var $v_3=this.$2r_3[$v_2];if(!IsNull($v_3)){var $v_4=$v_3.get_ribbon();!IsNull($v_4)&&$v_4.dispose();$v_3.dispose();$v_4=null;$v_3=null}this.$2r_3[$v_2]=null}this.$2r_3=[];$p0.$6l_2="ribbonContainer"+Mscrm.RibbonManager.$9M++;$p0.$4v_2=this;try{this.$E_3=$p0.get_$AY_2()?this.$2t_3:$p0}catch($$e_6){this.$E_3=this.$2t_3}if(!IsNull(this.$E_3)){this.$E_3.$A5_2();this.$E0_3(this.$E_3);this.$E1_3(this.$E_3,$p1);this.get_$BO_3()&&this.$B1_3()}this.$4G_3=false;var $v_1=$get("perceivedRibbonId");if(!IsNull($v_1)){if($get("crmTopBar"))$get("crmTopBar").style.visibility="visible";$v_1.style.visibility="hidden";$v_1.innerHTML="<div/>"}if(!IsNull(this.$E_3)){this.$E_3.$6u_2=true;this.$E_3.$3m_2=false}this.raiseEvent(Mscrm.ScriptEvents.RibbonRendered,null);executeFunctionDeferred(this.$$d_$Em_3,true,false)},$Em_3:function(){window.self.FullyLoadedTime=(new Date).getTime();var $$t_1=this;executeFunctionDeferred(function(){var $v_0=$get("perceivedRibbonId");!IsNull($v_0)&&typeof processLoadedRibbon!=="undefined"&&window.processLoadedRibbon()},false,false)},$E0_3:function($p0){if(!IsNull(this.$1W_3)){Mscrm.RibbonManager.get_$3H().removePageComponent(this.$1W_3);this.$1W_3=null}if(!IsNull($p0)&&!IsNull($p0.get_$3G_2())){this.$1W_3=new Mscrm.CommandHandlerWrapper($p0.get_$3G_2());Mscrm.RibbonManager.get_$3H().addPageComponent(this.$1W_3)}},$E1_3:function($p0,$p1){this.get_$8j_3()&&this.$E2_3($p0,$p1);isOutlookHostedWindow()&&getOutlookHostedWindow().handleEvent(Mscrm.ScriptEvents.RibbonRefresh,null,null)},$E2_3:function($p0,$p1){var $v_0=document.createElement("div");$v_0.id=$p0.$6l_2;Mscrm.RibbonManager.get_$3H().disposeAllRoots();if(!IsNull(this.$4I_3)){Mscrm.Utilities.destroyElement(this.$4I_3);this.$4I_3=null}this.get_element().appendChild($v_0);this.get_element().style.height="";$p0.$8r_2=$v_0;this.$4I_3=$v_0;this.get_element().setAttribute("currentRibbonElement",$v_0.id);var $v_1=$p0.get_$6L_2(),$v_2=$p0.$6T_2,$v_3=$p0.$5a_2,$v_4=$p0.get_$4E_2(),$v_5=new Array(0),$$dict_8=$v_3;for(var $$key_9 in $$dict_8){var $v_A={key:$$key_9,value:$$dict_8[$$key_9]},$v_B=$v_A.key;if(!IsNull($v_B)&&$v_B.length>0&&IsNull($v_1[$v_B]))$v_5[$v_5.length]=$v_B}var $v_6=new CUI.RibbonBuildOptions;$v_6.shownTabs=$v_3;$v_6.initiallyVisibleContextualGroups=$v_2;$v_6.trimmedIds=$v_1;$v_6.showJewelId=Mscrm.RibbonConstants.jewelId;$v_6.trimEmptyGroups=true;$v_6.minimized=Mscrm.RibbonManager.$4h;var $v_7=new CUI.RibbonBuilder($v_6,$v_0,Mscrm.RibbonManager.get_$3H()),$v_8=new Mscrm.CrmDataSource($v_5,$p0.get_$Dx_2(),$v_4);$v_7.$v_0=$v_8;var $v_9=$p0.get_$44_2();if($p1&&!isNullOrEmptyString($p1["initialTabId"]))$v_9=$p1["initialTabId"];$p0.set_$44_2($v_8.getInitialTabId($v_9));$v_7.buildRibbonAndInitialTab($p0.get_$44_2());$p0.$t_2=$v_7;$v_0.style.display="inline";this.raiseEvent(Mscrm.ScriptEvents.RequestResize,null);$p0.$8n_2&&openErrorDlg("0x8004f671",null,null,0,0);$v_7.get_ribbon().$3O_2()},$8C_3:function($p0,$p1){var $v_0;if(IsNull($p1))$p1=false;if(this.$4G_3)return;if(!isInstanceOfTypeAcrossFrames($p0,Mscrm.RibbonData))return;if($p0!==this.$E_3)return;$p0.$3m_2=true;$p0.$6u_2=false;if(!IsNull(this.$1W_3)){Mscrm.RibbonManager.get_$3H().removePageComponent(this.$1W_3);if(!$p1){var $v_1=[],$$dict_4=$p0.$28_2;for(var $$key_5 in $$dict_4){var $v_2={key:$$key_5,value:$$dict_4[$$key_5]};if(this.$1W_3.canHandleCommand($v_2.key))$v_1[$v_1.length]=$v_2.key}var $$dict_7=$p0.$5D_2;for(var $$key_8 in $$dict_7){var $v_3={key:$$key_8,value:$$dict_7[$$key_8]};if(this.$1W_3.canHandleCommand($v_3.key))$v_1[$v_1.length]=$v_3.key}this.$1W_3=new Mscrm.AlwaysEnabledCommandHandler(this.$1W_3.getId()+"_tabsOnly",$v_1);Mscrm.RibbonManager.get_$3H().addPageComponent(this.$1W_3);$v_0=this.$E_3.$t_2;if(!IsNull($v_0)){var $v_4=$v_0.get_ribbon();if(!IsNull($v_4)){var $v_5=$v_4.get_element(),$v_6=$get("ms-crm-lightbox");if(!$v_6){$v_6=document.createElement("DIV");$v_6.id=$v_6.className="ms-crm-lightbox";$v_6.style.top=$v_5.offsetTop.toString()+"px";$v_6.style.left=$v_5.offsetLeft.toString()+"px";$v_6.style.height=$v_5.offsetHeight.toString()+"px";$v_6.style.width=$v_5.offsetWidth.toString()+"px";$v_5.appendChild($v_6)}else $v_6.style.visibility="visible";var $v_7=$v_5.className;$v_5.className=!IsNull($v_7)?"ms-cui-disabled":$v_7+" ms-cui-disabled"}}}}$v_0=$p0.$t_2;$p0.$t_2=null;if(!IsNull($v_0)){var $v_8=$v_0.get_ribbon();!IsNull($v_8)&&$v_8.$40_1();this.$2r_3[this.$2r_3.length]=$v_0}this.$4G_3=true},$DY_3:function($p0){if(isInstanceOfTypeAcrossFrames($p0,Mscrm.ContentPanel)&&!IsNull(this.$2t_3))if(this.$3l_3)this.$8G_3(this.$2t_3,null);else this.$Ac_3(this.$2t_3,null)},$DZ_3:function($p0){if(!IsNull(this.$3u_3)){window.clearTimeout(this.$3u_3);this.$4i_3=false}isInstanceOfTypeAcrossFrames($p0,Mscrm.ContentPanel)&&!IsNull(this.$E_3)&&this.$8C_3(this.$E_3)},$8U_3:function(){if(this.$4G_3)return;if(!this.$4i_3){this.$4i_3=true;this.$3u_3=window.setTimeout(this.$$d_$Ez_3,100)}},$Ez_3:function(){this.$3u_3=null;isOutlookHostedWindow()&&Mscrm.SessionInfo.getOutlookMajorVersion()<14&&getOutlookHostedWindow().handleEvent(Mscrm.ScriptEvents.RibbonRefresh,null,null);this.$Eu_3()},$Eu_3:function(){this.$4i_3=false;if(this.$4G_3)return;this.get_$8j_3()&&this.$Ev_3();this.get_$BO_3()&&this.$B1_3();this.raiseEvent(Mscrm.ScriptEvents.RequestResize,null)},$Ev_3:function(){if(this.$E_3&&this.$E_3.$t_2&&this.$E_3.$t_2.get_ribbon()){var $v_0={},$$dict_1=this.$E_3.$28_2;for(var $$key_2 in $$dict_1){var $v_2={key:$$key_2,value:$$dict_1[$$key_2]};$v_0[$v_2.key]=$v_2.value}this.$E_3.$A5_2();if(this.$E_3.$t_2.get_ribbon().$A_2)this.$E_3.$t_2.get_ribbon().$A_2.$18_2=false;this.$E_3.$t_2.get_ribbon().refresh();var $v_1=null,$$dict_5=this.$E_3.$28_2;for(var $$key_6 in $$dict_5){var $v_3={key:$$key_6,value:$$dict_5[$$key_6]};if($v_3.value&&!$v_0[$v_3.key]){$v_1=$v_3.key;break}}!isNullOrEmptyString($v_1)&&this.$E_3.$t_2.get_ribbon().selectTabByCommand($v_1)}},$B1_3:function(){var $v_0=this.get_$7q_3(),$v_1={},$v_2;if(!IsNull(this.$E_3))$v_2=this.$E_3.get_$7j_2();else $v_2={};var $v_3=new Array(0),$$dict_4=$v_2;for(var $$key_5 in $$dict_4){var $v_4={key:$$key_5,value:$$dict_4[$$key_5]},$v_5=$v_4.key,$v_6=$v_0[$v_5],$v_7=this.$E_3.isControlEnabled($v_5);$v_1[$v_5]=$v_7;if(IsNull($v_6)||$v_6!==$v_7)$v_3[$v_3.length]=$v_5}this.$5R_3=$v_1;getOutlookHostedWindow().handleEvent(Mscrm.ScriptEvents.RibbonRefresh,null,null)},$F9_3:function($p0,$p1){if(this.$E_3&&this.$E_3.$t_2&&this.$E_3.$t_2.get_ribbon()){var $v_0=this.$E_3.$t_2.get_ribbon();switch($p0){case Mscrm.ScriptEvents.RibbonSetFocusToLastControl:$v_0.jumpToLastFocused($p1);break;case Mscrm.ScriptEvents.RibbonSetFocusToSelf:$v_0.jumpToRibbonTab($p1);break}}}};Mscrm.RibbonNavigationModel=function(){};Mscrm.RibbonNavigationModel.isContextualGroupForAssociatedGrid=function($p0){return Mscrm.RibbonNavigationModel.$5s.test($p0)};Mscrm.RibbonNavigationModel.shouldContextGroupBeShown=function($p0,$p1){if(Mscrm.RibbonNavigationModel.$9L.test($p0.command)){var $v_0=$p1.$g_2;if($v_0&&Mscrm.IGridControl.isInstanceOfType($v_0)){var $v_1=parseInt($v_0.GetParameter("relationshipType"),10);return $v_1===$p0.relationshipType}}return true};Mscrm.RibbonNavigationModel.shouldTabBeShown=function($p0,$p1,$p2){var $$dict_3=$p2.get_$4E_2();for(var $$key_4 in $$dict_3){var $v_0={key:$$key_4,value:$$dict_3[$$key_4]},$v_1=$v_0.value;if($v_1.TabCommand===$p0){var $v_2=new Mscrm.CommandInformation;$v_2.command=$v_1.ContextGroupCommand;$v_2.entityContext=$p1.entityContext;$v_2.entityLogicalName=$p1.entityLogicalName;$v_2.relationshipType=$p1.relationshipType;return Mscrm.RibbonNavigationModel.shouldContextGroupBeShown($v_2,$p2)}}return true};Mscrm.RibbonNavigationModel.onTabSwitch=function($p0,$p1,$p2,$p3){if($p3){if(isNullOrEmptyString($p0))$p0=$p2.get_$44_2();var $v_0=$p2.get_$4E_2()[$p0],$v_1=$p2.get_$4E_2()[$p1];if($v_0&&$v_1){var $v_2=$v_0.ContextualGroupId||"",$v_3=$v_1.ContextualGroupId||"";if(Mscrm.RibbonNavigationModel.$7b.test($v_2)&&!Mscrm.RibbonNavigationModel.$7b.test($v_3)){var $v_4=window.frames[0].window,$v_5=$v_4.location.pathname.toUpperCase();if(!$v_5.endsWith("/ADVFIND.ASPX"))setSelectedControl(null);else $v_4.ShowQuery(null)}if((Mscrm.RibbonNavigationModel.$5s.test($v_2)||$p0==="Mscrm.DocumentsTab")&&!Mscrm.RibbonNavigationModel.$5s.test($v_3)){var $v_6=$find("crmContentPanel"),$v_7=0;while(true){var $v_8=$v_6.get_contentWindow().document.getElementById("tab"+$v_7+"Tab");if($v_8){if($v_8.parentNode.style.visibility!=="hidden"&&$v_8.parentNode.style.display!=="none"){$v_6.get_contentWindow()._initialTabId=$p1;window.setTimeout(function(){Mscrm.Utilities.click($v_8)},0);break}}else break;$v_7++}}}}};Type.registerNamespace("CUI");CUI.IRootBuildClient=function(){};CUI.IRootBuildClient.registerInterface("CUI.IRootBuildClient");CUI.CommandType=function(){};CUI.CommandType.prototype={general:1,tabSelection:2,optionSelection:3,menuCreation:4,preview:5,previewRevert:6,optionPreview:7,optionPreviewRevert:8,ignoredByMenu:9,menuClose:10,rootEvent:11};CUI.CommandType.registerEnum("CUI.CommandType",false);CUI.ISelectableControl=function(){};CUI.ISelectableControl.registerInterface("CUI.ISelectableControl");CUI.QueryRecord=function(){};CUI.DataQueryType=function(){};CUI.DataQueryType.prototype={none:0,all:1,ribbonVisibleTabDeep:2,ribbonShallow:3,ribbonTab:4,root:5};CUI.DataQueryType.registerEnum("CUI.DataQueryType",false);CUI.GalleryElementDimensions=function(){};CUI.GalleryElementDimensions.prototype={size16by16:1,size32by32:2,size48by48:3,size64by48:4,size72by96:5,size96by72:6,size96by96:7,size128by128:8,size190by30:9,size190by40:10,size190by50:11,size190by60:12};CUI.GalleryElementDimensions.registerEnum("CUI.GalleryElementDimensions",false);CUI.IMenuItem=function(){};CUI.IMenuItem.registerInterface("CUI.IMenuItem");CUI.ContextualColor=function(){};CUI.ContextualColor.prototype={none:0,darkBlue:1,lightBlue:2,teal:3,orange:4,green:5,magenta:6,yellow:7,purple:8};CUI.ContextualColor.registerEnum("CUI.ContextualColor",false);CUI.DeclarativeTemplateBuildContext=function(){};CUI.CommandInformation=function(){this.CommandId=null;this.RootId=null;this.TabId=null;this.RootType=null;this.RootLocation=null};CUI.IModalController=function(){};CUI.IModalController.registerInterface("CUI.IModalController");CUI.Direction=function(){};CUI.Direction.prototype={LTR:0,RTL:1};CUI.Direction.registerEnum("CUI.Direction",false);CUI.DisabledCommandInfoProperties=function(){this.Description=null;this.Title=null;this.Icon=null;this.IconClass=null;this.IconTop=null;this.IconLeft=null;this.HelpKeyWord=null};CUI.ImgContainerType=function(){};CUI.ImgContainerType.prototype={div:1,span:2,anchor:3};CUI.ImgContainerType.registerEnum("CUI.ImgContainerType",false);CUI.ImgContainerSize=function(){};CUI.ImgContainerSize.prototype={none:0,size5by3:1,size13by13:2,size16by16:3,size32by32:4,size48by48:5,size64by48:6,size72by96:7,size96by72:8,size96by96:9,size56by24:10,size2by16:11};CUI.ImgContainerSize.registerEnum("CUI.ImgContainerSize",false);CUI.PMarker=function(){};CUI.PMarker.prototype={beginSession:1,endSession:2,perfCUIRibbonInitStart:7103,perfCUIRibbonInitPercvdEnd:7104,perfCUIRibbonTabSwitchWarmStart:7105,perfCUIRibbonTabSwitchWarmPercvdEnd:7106,perfCUIRibbonTabSwitchWarmEnd:7107,perfCUIRibbonCompleteConstruction:7108,perfCUIRibbonQueryDataStart:7109,perfCUIRibbonQueryDataEnd:7110,perfWSSWikiUpdatePanelStart:7111,perfWSSWikiUpdatePanelEnd:7112,perfWSSWebPartComponentMouseClickStart:7186,perfWSSWebPartComponentMouseClickEnd:7187,perfCUIAddAndPositionBackFrameStart:7188,perfCUIAddAndPositionBackFrameEnd:7189,perfCUIFlyoutAnchorOnClickStart:7190,perfCUIFlyoutAnchorOnClickEnd:7191,perfCUIDropDownOnArrowButtonClickStart:7192,perfCUIDropDownOnArrowButtonClickEnd:7193,perfWSSBreadcrumbStart:7386,perfWSSBreadcrumbEnd:7387,perfWSSSelectOrDeselectAllStart:7388,perfWSSSelectOrDeselectAllEnd:7389,perfWSSSelectItemStart:7390,perfWSSSelectItemEnd:7391,perfWSSFilterSortStart:7392,perfWSSFilterSortEnd:7393,perfWSSMMUOpenStart:7394,perfWSSMMUOpenEnd:7395,perfWSSECBClickStart:7396,perfWSSECBClickEnd:7397,perfSPSSaveStatusNoteBegin:7634,perfSPSSaveStatusNoteEnd:7635,perfWSSCalendarRenderStart:7644,perfWSSCalendarRenderEnd:7645,perfPLTxInstrumentStart:7698,perfPLTxInstrumentEnd:7699,perfCUIRibbonButtonOnClickStart:7700,perfCUIRibbonButtonOnClickEnd:7701,perfCUIRibbonInsertTableOnClickStart:7702,perfCUIRibbonInsertTableOnClickEnd:7703,perfCUIRibbonToggleButtonOnClickStart:7704,perfCUIRibbonToggleButtonOnClickEnd:7705,perfWSSDialogShow:7706,perfWSSDialogClosed:7707,perfWSSRTEDialogOnLoadEnd:7708,perfWSSRTEDialogOnOkButtonClickStart:7709,perfWSSRTEAutoCompleteSetResultsStart:7710,perfWSSRTEAutoCompleteSetResultsEnd:7711,perfCUIRibbonEditWikiPageStart:7735,perfCUIRibbonEditWikiPageEnd:7736};CUI.PMarker.registerEnum("CUI.PMarker",false);CUI.BuildOptions=function(){};CUI.BuildOptions.prototype={lazyMenuInit:false,trimmedIds:null,attachToDOM:false,validateServerRendering:false,fixedPositioningEnabled:false,dataExtensions:null,clientID:null};CUI.BuildContext=function(){};CUI.DataNodeWrapper=function($p0){this.$d_0=$p0};CUI.DataNodeWrapper.getFirstChildNodeWithName=function($p0,$p1){for(var $v_0=CUI.DataNodeWrapper.getNodeChildren($p0),$v_1=$v_0.length,$v_2=null,$v_3=0;$v_3<$v_1;$v_3++){$v_2=$v_0[$v_3];var $v_4=$v_2.name;if($v_4===$p1)return $v_2}return null};CUI.DataNodeWrapper.getNodeName=function($p0){return $p0.name};CUI.DataNodeWrapper.getNodeChildren=function($p0){var $v_0=$p0.children;if(CUI.ScriptUtility.isNullOrUndefined($v_0))return CUI.DataNodeWrapper.get_$Cl();return $v_0};CUI.DataNodeWrapper.get_$Cl=function(){if(CUI.ScriptUtility.isNullOrUndefined(CUI.DataNodeWrapper.$6H))CUI.DataNodeWrapper.$6H=[];return CUI.DataNodeWrapper.$6H};CUI.DataNodeWrapper.getNodeAttributes=function($p0){return $p0.attrs};CUI.DataNodeWrapper.getNodeAttribute=function($p0,$p1){var $v_0=$p0.attrs;return $v_0[$p1]};CUI.DataNodeWrapper.prototype={$d_0:null,get_node:function(){return this.$d_0},set_node:function($p0){this.$d_0=$p0;return $p0},get_name:function(){return CUI.DataNodeWrapper.getNodeName(this.$d_0)},get_children:function(){return CUI.DataNodeWrapper.getNodeChildren(this.$d_0)},get_attributes:function(){return CUI.DataNodeWrapper.getNodeAttributes(this.$d_0)},get_hasChildren:function(){return CUI.DataNodeWrapper.getNodeChildren(this.$d_0).length>0}};CUI.Builder=function(options,elmPlaceholder,rootBuildClient){this.$$d_$Cg_0=Function.createDelegate(this,this.$Cg_0);this.$$d_$8M_0=Function.createDelegate(this,this.$8M_0);this.$u_0=options;if(CUI.ScriptUtility.isNullOrUndefined(this.$u_0.trimmedIds))this.$u_0.trimmedIds={};this._elmPlaceholder=elmPlaceholder;this.$1R_0=rootBuildClient;this.$2R_0=this.$$d_$8M_0;$addHandler(window,"unload",this.$2R_0)};CUI.Builder.$CP=function($p0){var $v_0=CUI.NativeUtility.createXMLDocFromString($p0);if(CUI.ScriptUtility.isNullOrUndefined($v_0))return null;return CUI.Builder.$CQ($v_0)};CUI.Builder.$CQ=function($p0){return eval("("+CUI.Builder.convertNodeToJSON($p0.documentElement)+")")};CUI.Builder.convertNodeToJSON=function(node){var $v_0;$v_0="{";$v_0+='"name" : "';$v_0+=CUI.NativeUtility.ecmaScriptStringLiteralEncode(node.nodeName);$v_0+='",';$v_0+='"attrs": {';var $v_1=node.attributes;if(!CUI.ScriptUtility.isNullOrUndefined(node.attributes)){var $v_3=$v_1.length;if($v_3>0)for(var $v_4=true,$v_5=0;$v_5<$v_3;$v_5++){var $v_6=$v_1.item($v_5);if($v_4)$v_4=false;else $v_0+=",";$v_0+='"';$v_0+=CUI.NativeUtility.ecmaScriptStringLiteralEncode($v_6.name);$v_0+='"';$v_0+=':"';$v_0+=CUI.NativeUtility.ecmaScriptStringLiteralEncode($v_6.value);$v_0+='"'}}$v_0+="}";var $v_2=node.childNodes;if($v_2){var $v_7=$v_2.length;if($v_7>0){$v_0+=",";$v_0+="children:[";for(var $v_8=true,$v_9=0;$v_9<$v_7;$v_9++){var $v_A=$v_2[$v_9];if($v_A.nodeName==="#text")continue;if($v_8)$v_8=false;else $v_0+=",";$v_0+=CUI.Builder.convertNodeToJSON($v_A)}$v_0+="]"}}$v_0+="}";return $v_0};CUI.Builder.applyDataNodeExtensions=function(data,extensions){var $v_0=data.attrs;if(CUI.ScriptUtility.isNullOrUndefined($v_0))return data;var $v_1=$v_0["Id"],$v_2=extensions[$v_1];if(!CUI.ScriptUtility.isNullOrUndefined($v_2)){for(var $v_9=null,$v_A=Number.MAX_VALUE,$v_B=$v_2.length,$v_C=0;$v_C<$v_B;$v_C++){var $v_D=$v_2[$v_C];if(!$v_D)return null;var $v_E=CUI.DataNodeWrapper.getNodeAttribute($v_D,"Sequence");if(CUI.ScriptUtility.isNullOrUndefined($v_E)){if(CUI.ScriptUtility.isNullOrUndefined($v_9))$v_9=$v_D;continue}var $v_F=parseInt($v_E);if($v_F<$v_A){$v_9=$v_D;$v_A=$v_F}}if(!CUI.ScriptUtility.isNullOrUndefined($v_9))data=$v_9}var $v_3=data["children"];if(CUI.ScriptUtility.isNullOrUndefined($v_3)){$v_3=[];data["children"]=$v_3}for(var $v_4=[],$v_5=$v_3.length,$v_G=0;$v_G<$v_5;$v_G++)Array.add($v_4,$v_3[$v_G]);var $v_6=extensions[$v_1+"._children"];if(!CUI.ScriptUtility.isNullOrUndefined($v_6)){for(var $v_H=$v_6.length,$v_I=0;$v_I<$v_H;$v_I++)Array.add($v_4,$v_6[$v_I]);$v_4.sort(CUI.Builder.$CK)}for(var $v_7=[],$v_8=$v_4.length,$v_J=0;$v_J<$v_8;$v_J++){var $v_K=CUI.Builder.applyDataNodeExtensions($v_4[$v_J],extensions);!CUI.ScriptUtility.isNullOrUndefined($v_K)&&Array.add($v_7,$v_K)}data["children"]=$v_7;return data};CUI.Builder.$CK=function($p0,$p1){var $v_0=CUI.DataNodeWrapper.getNodeAttribute($p0,"Sequence"),$v_1=CUI.DataNodeWrapper.getNodeAttribute($p1,"Sequence");if(CUI.ScriptUtility.isNullOrUndefined($v_1)&&CUI.ScriptUtility.isNullOrUndefined($v_0))return 0;if(CUI.ScriptUtility.isNullOrUndefined($v_1))return -1;if(CUI.ScriptUtility.isNullOrUndefined($v_0))return 1;var $v_2=parseInt($v_0),$v_3=parseInt($v_1);if($v_2<$v_3)return -1;else if($v_2>$v_3)return 1;return 0};CUI.Builder.prototype={$1R_0:null,$2R_0:null,$8M_0:function($p0){this.dispose()},$8N_0:function($p0){$p0.$30_1=this.$u_0.fixedPositioningEnabled},dispose:function(){this.$0_0=null;this.$u_0=null;this._elmPlaceholder=null;this.$1R_0=null;this.$v_0=null;$removeHandler(window,"unload",this.$2R_0)},$0_0:null,get_root:function(){return this.$0_0},set_root:function(value){this.$0_0=value;return value},$2f_0:false,get_inQuery:function(){return this.$2f_0},set_inQuery:function(value){this.$2f_0=value;return value},$v_0:null,get_dataSource:function(){return this.$v_0},set_dataSource:function(value){this.$v_0=value;return value},_elmPlaceholder:null,get_placeholder:function(){return this._elmPlaceholder},$u_0:null,isIdTrimmed:function(id){return this.$u_0.trimmedIds[id]},isNodeTrimmed:function(dataNode){var $v_0=CUI.DataNodeWrapper.getNodeAttribute(dataNode,"Id");return this.$u_0.trimmedIds[$v_0]},$1f_0:function($p0,$p1){var $v_0=null,$v_1=$p0.name;switch($v_1){case "ToggleButton":$v_0=this.$CC_0($p0,$p1);break;case "ComboBox":$v_0=this.$Bt_0($p0,$p1);break;case "DropDown":$v_0=this.$Bu_0($p0,$p1);break;case "Button":$v_0=this.$Bp_0($p0,$p1);break;case "SplitButton":$v_0=this.$C9_0($p0,$p1);break;case "FlyoutAnchor":$v_0=this.$Bv_0($p0,$p1);break;case "GalleryButton":$v_0=this.$9c_0($p0,$p1,null);break;case "InsertTable":$v_0=this.$By_0($p0,$p1);break;case "Label":$v_0=this.$C2_0($p0,$p1);break;case "MRUSplitButton":$v_0=this.$C4_0($p0,$p1);break;case "Spinner":$v_0=this.$C8_0($p0,$p1);break;case "TextBox":$v_0=this.$CB_0($p0,$p1);break;case "ColorPicker":$v_0=this.$Bs_0($p0,$p1);break;case "CheckBox":$v_0=this.$Br_0($p0,$p1);break;case "Separator":$v_0=this.$C7_0($p0,$p1);break;default:var $v_2=$p0.attrs,$v_3=$v_2["Classname"];if(CUI.ScriptUtility.isNullOrUndefined($v_3))throw Error.create("Unable to create Control with tagname: "+$v_1);break}return $v_0},$3F_0:function($p0,$p1,$p2){var $v_0=$p0.attrs,$v_1=this.$0_0.$9o_1($v_0["Id"],$v_0["Title"],$v_0["Description"],$v_0["MaxWidth"]);if(this.$u_0.lazyMenuInit&&$p2){$v_1.$8Z_0(this.$$d_$Cg_0,$p0,$p1);return $v_1}this.$A0_0($v_1,$p0,$p1);return $v_1},$A0_0:function($p0,$p1,$p2){for(var $v_0=CUI.DataNodeWrapper.getNodeChildren($p1),$v_1=$v_0.length,$v_2=null,$v_3=0;$v_3<$v_1;$v_3++){$v_2=$v_0[$v_3];var $v_4=$v_2.name;if($v_4!=="MenuSection")throw Error.create("Tags with the name: "+$v_4+" cannot be children of Menu tags.");if(this.isNodeTrimmed($v_2))continue;var $v_5=this.$C3_0($v_2,$p2);$p0.addChild($v_5)}},$Cg_0:function($p0,$p1,$p2){var $v_0=$p0;this.$A0_0($v_0,$p1,$p2);$v_0.$8L_0(true);return $v_0},$C3_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=$v_0["DisplayMode"];if(CUI.ScriptUtility.isNullOrUndefined($v_1))$v_1="Menu";var $v_2=this.$0_0.$9p_1($v_0["Id"],$v_0["Title"],$v_0["Description"],$v_0["Scrollable"]==="true",$v_0["MaxHeight"],$v_1),$v_3=CUI.DataNodeWrapper.getNodeName(CUI.DataNodeWrapper.getNodeChildren($p0)[0]);if($v_3==="Controls")for(var $v_4=CUI.DataNodeWrapper.getNodeChildren(CUI.DataNodeWrapper.getNodeChildren($p0)[0]),$v_5=$v_4.length,$v_6=null,$v_7=0;$v_7<$v_5;$v_7++){$v_6=$v_4[$v_7];if(this.isNodeTrimmed($v_6))continue;var $v_8=this.$1f_0($v_6,$p1);$v_2.addChild($v_8.createComponentForDisplayMode($v_1))}else if($v_3==="Gallery"){var $v_9=this.$Bw_0(CUI.DataNodeWrapper.getNodeChildren($p0)[0],$p1,true);$v_2.addChild($v_9)}return $v_2},$Bw_0:function($p0,$p1,$p2){for(var $v_0=$p0.attrs,$v_1=$p0.attrs,$v_2=this.$0_0.$CX_1($v_1.Id,$v_0["Title"],$v_0["Description"],$v_1),$v_3=$p2?"Menu":"Default",$v_4=CUI.DataNodeWrapper.getNodeChildren($p0),$v_5=$v_4.length,$v_6=null,$v_7=0;$v_7<$v_5;$v_7++){$v_6=$v_4[$v_7];if(this.isNodeTrimmed($v_6))continue;var $v_8;switch(CUI.DataNodeWrapper.getNodeName($v_6)){case "GalleryButton":$v_8=this.$9c_0($v_6,$p1,$v_1.ElementDimensions);break;default:$v_8=this.$1f_0($v_6,$p1);break}$v_2.addChild($v_8.createComponentForDisplayMode($v_3))}return $v_2},$9c_0:function($p0,$p1,$p2){var $v_0;if(CUI.ScriptUtility.isNullOrEmptyString($p2)){var $v_3=$p0.attrs;$p2=$v_3["ElementDimensions"]}if(CUI.ScriptUtility.isNullOrEmptyString($p2))$v_0=2;else $v_0=CUI.Gallery.$9i($p2);var $v_1=$p0.attrs,$v_2=new CUI.Controls.GalleryButton(this.$0_0,$v_1.Id,$v_1,$v_0);return $v_2},$CC_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.ToggleButton(this.$0_0,$v_0.Id,$v_0);return $v_1},$Br_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.CheckBox(this.$0_0,$v_0.Id,$v_0);return $v_1},$Bs_0:function($p0,$p1){for(var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren(CUI.DataNodeWrapper.getFirstChildNodeWithName($p0,"Colors")),$v_2=new Array($v_1.length),$v_3=$v_1.length,$v_5=0;$v_5<$v_3;$v_5++){var $v_6=new CUI.Controls.ColorStyle,$v_7=CUI.DataNodeWrapper.getNodeAttributes($v_1[$v_5]),$v_8=$v_7["Title"];$v_6.Title=CUI.ScriptUtility.isNullOrUndefined($v_8)?$v_7["Alt"]:$v_8;$v_6.Color=$v_7["Color"];$v_6.DisplayColor=$v_7["DisplayColor"];$v_6.Style=$v_7["Style"];$v_2[$v_5]=$v_6}var $v_4=new CUI.Controls.ColorPicker(this.$0_0,$v_0.Id,$v_0,$v_2);return $v_4},$Bt_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren($p0),$v_2=null,$v_3=$p0.attrs,$v_4=null;if(!CUI.Utility.$x($v_3.PopulateDynamically)){$v_2=this.$3F_0($v_1[0],$p1,false);$v_4={};for(var $v_6=CUI.DataNodeWrapper.getNodeChildren($v_1[0]),$v_7=$v_6.length,$v_8=0;$v_8<$v_7;$v_8++)for(var $v_9=CUI.DataNodeWrapper.getNodeChildren($v_6[$v_8]),$v_A=CUI.DataNodeWrapper.getNodeChildren($v_9[0]),$v_B=$v_A.length,$v_C=0;$v_C<$v_B;$v_C++){var $v_D=$v_A[$v_C].attrs,$v_E=$v_D["LabelText"],$v_F=$v_D["MenuItemId"];$v_4[$v_E]=$v_F}}var $v_5=new CUI.Controls.ComboBox(this.$0_0,$v_0.Id,$v_0,$v_2);$v_5.set_menuItems($v_4);return $v_5},$Bu_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren($p0),$v_2=null,$v_3=$p0.attrs;if(!CUI.Utility.$x($v_3.PopulateDynamically))$v_2=this.$3F_0($v_1[0],$p1,false);var $v_4=new CUI.Controls.DropDown(this.$0_0,$v_0.Id,$v_0,$v_2);return $v_4},$Bp_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.Button(this.$0_0,$v_0.Id,$v_0);return $v_1},$C9_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren($p0),$v_2=null;if(!CUI.Utility.$x($v_0.PopulateDynamically))$v_2=this.$3F_0($v_1[0],$p1,true);var $v_3=new CUI.Controls.SplitButton(this.$0_0,$v_0.Id,$v_0,$v_2);return $v_3},$Bv_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren($p0),$v_2=null,$v_3=$p0.attrs;if(!CUI.Utility.$x($v_3.PopulateDynamically))$v_2=this.$3F_0($v_1[0],$p1,true);var $v_4=new CUI.Controls.FlyoutAnchor(this.$0_0,$v_0.Id,$v_0,$v_2);return $v_4},$By_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.InsertTable(this.$0_0,$v_0.Id,$v_0);return $v_1},$C2_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.Label(this.$0_0,$v_0.Id,$v_0);return $v_1},$C4_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren($p0),$v_2=null,$v_3=$p0.attrs;if(!CUI.Utility.$x($v_3.PopulateDynamically))$v_2=this.$3F_0($v_1[0],$p1,false);var $v_4=new CUI.Controls.MRUSplitButton(this.$0_0,$v_0.Id,$v_0,$v_2);return $v_4},$C7_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.Separator(this.$0_0,$v_0.Id,$v_0);return $v_1},$C8_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.Spinner(this.$0_0,$v_0.Id,$v_0,this.$CG_0($p0));return $v_1},$CB_0:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.Controls.TextBox(this.$0_0,$v_0.Id,$v_0);return $v_1},$7m_0:function($p0){if(typeof $p0==="string")return parseFloat($p0);return $p0},$CO_0:function($p0){if(typeof $p0==="string")return parseInt($p0);return $p0},$CG_0:function($p0){for(var $v_0=CUI.DataNodeWrapper.getNodeChildren($p0),$v_1=new Array($v_0.length),$v_2=$v_0.length,$v_3=0;$v_3<$v_2;$v_3++){var $v_4=$v_0[$v_3],$v_5=CUI.DataNodeWrapper.getNodeAttributes($v_4);$v_1[$v_3]=CUI.Controls.Spinner.createUnit($v_5["Name"],this.$CF_0(CUI.DataNodeWrapper.getNodeChildren($v_4)),this.$7m_0($v_5["MinimumValue"]),this.$7m_0($v_5["MaximumValue"]),this.$CO_0($v_5["DecimalDigits"]),this.$7m_0($v_5["Interval"]))}return $v_1},$CF_0:function($p0){for(var $v_0=new Array($p0.length),$v_1=$p0.length,$v_2=0;$v_2<$v_1;$v_2++){var $v_3=$p0[$v_2],$v_4=CUI.DataNodeWrapper.getNodeAttributes($v_3);$v_0[$v_2]=$v_4["Value"]}return $v_0},applyDataExtensions:function(data){if(!CUI.ScriptUtility.isNullOrUndefined(this.$u_0.dataExtensions))return CUI.Builder.applyDataNodeExtensions(data,this.$u_0.dataExtensions);else return data}};CUI.CommandEventArgs=function($p0,$p1,$p2,$p3){CUI.CommandEventArgs.initializeBase(this);this.$4_1=$p0;this.$34_1=$p3;this.$37_1=$p2;this.$I_1=$p1};CUI.CommandEventArgs.prototype={$4_1:null,$7U_1:0,$34_1:null,$37_1:null,$I_1:0,$6R_1:null,get_id:function(){return this.$4_1},get_parameters:function(){return this.$34_1},get_sequenceNumber:function(){return this.$7U_1},set_sequenceNumber:function($p0){this.$7U_1=$p0;return $p0},get_source:function(){return this.$37_1},get_sourceControl:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.$37_1)&&CUI.ControlComponent.isInstanceOfType(this.$37_1))return this.$37_1.$N_1;return null},get_type:function(){return this.$I_1},get_properties:function(){return this.$34_1},get_commandInfo:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$6R_1))this.$6R_1=new CUI.CommandInformation;return this.$6R_1}};CUI.Component=function(root,id,title,description){this._componentWidth=-1;this._componentHeight=-1;this._componentTopPosition=-1;this._componentLeftPosition=-1;this.$4_0=id;this.$0_0=root;this.$1T_0=title;this.$6X_0=description;this.createChildArray()};CUI.Component.prototype={$4_0:null,$2w_0:null,$M_0:null,$0_0:null,$6_0:null,$h_0:true,$5x_0:true,$1Q_0:true,$5S_0:false,$6X_0:null,$1T_0:null,createChildArray:function(){this.$7r_0()},$7r_0:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$6_0))this.$6_0=new CUI.List},get_id:function(){return this.$4_0},set_id:function(value){this.$4_0=value;return value},get_$2_0:function(){return this.$2w_0},set_$2_0:function($p0){this.$2w_0=$p0;return $p0},get_root:function(){return this.$0_0},get_parent:function(){return this.$M_0},set_parent:function(value){this.$M_0=value;return value},$15_0:function(){},$61_0:function(){return false},$60_0:function(){return false},$7z_0:function(){},$81_0:function(){},$80_0:function($p0){return false},$AA_0:function($p0){var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();if($v_0.$4_0===$p0)return $v_0}return null},getChild:function(id){return this.$AA_0(id)},getChildByTitle:function(title){var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();if($v_0.get_title()===title)return $v_0}return null},addChild:function(child){this.$3D_0(child,true)},$3D_0:function($p0,$p1){this.$9T_0($p0,-1,$p1)},addChildAtIndex:function(child,index){this.$9T_0(child,index,true)},$9T_0:function($p0,$p1,$p2){$p2&&this.ensureCorrectChildType($p0);if(!CUI.ScriptUtility.isNullOrUndefined($p0.$M_0))throw Error.create("This child cannot be added because it has already been added \n to another Component in the hierarchy.  \n You must first call child.Parent.RemoveChild(child)");if($p1===-1)this.$6_0.add($p0);else this.$6_0.insert($p1,$p0);$p0.$M_0=this;this.$y_0()},removeChild:function(id){var $v_0=this.$AA_0(id);if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("The child with id: "+id+" is not as child of this Component");this.$6_0.remove($v_0);$v_0.$M_0=null;this.$y_0()},removeChildren:function(){var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();if($v_0)$v_0.$M_0=null}this.$6_0.clear();this.$y_0()},ensureCorrectChildType:function(child){return},initRootMember:function(root){if(!CUI.ScriptUtility.isNullOrUndefined(this.$0_0))throw Error.create("Root member has already been set for this Component.");this.$0_0=root},get_visible:function(){return this.$5x_0},set_visible:function(value){this.set_$6M_0(value);return value},get_$6M_0:function(){return this.get_visible()},set_$6M_0:function($p0){var $v_0=this.$5x_0;this.$5x_0=$p0;$v_0!==this.$5x_0&&this.$y_0();return $p0},get_enabled:function(){return this.$1Q_0},set_enabled:function(value){if(this.$1Q_0===value&&this.$5S_0)return value;if(!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&!this.$M_0.get_enabled()&&value)throw Error.create("This Component with id: "+this.$4_0+" cannot be Enabled because its parent is Disabled");this.$1Q_0=value;this.$5S_0=true;var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();$v_0.set_enabled(value)}this.onEnabledChanged(value);return value},onEnabledChanged:function(enabled){},$F8_0:function($p0){var $v_0=this.$1Q_0!==$p0;this.$1Q_0=$p0;if(!CUI.ScriptUtility.isNullOrUndefined(this.$6_0)){var $$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();$v_1.$F8_0($p0)}}$v_0&&this.onEnabledChanged($p0)},get_title:function(){return this.$1T_0},set_title:function(value){this.$1T_0=value;this.$y_0();return value},get_description:function(){return this.$6X_0},set_description:function(value){this.$6X_0=value;this.$y_0();return value},_lastWidthUpdate:0,_lastHeightUpdate:0,get_$CM_0:function(){return this._componentHeight},_lastTopUpdate:0,get_$9g_0:function(){return this._componentTopPosition},_lastLeftUpdate:0,valueIsDirty:function(lastUpdate){if(CUI.Ribbon.isInstanceOfType(this.$0_0)){var $v_0=this.$0_0;return lastUpdate<$v_0.get_$Dy_2()}return false},$8a_0:function($p0){this.$h_0=$p0;if(CUI.ScriptUtility.isNullOrUndefined(this.$6_0))return;var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();$v_0.$8a_0($p0)}},$y_0:function(){if(this.$h_0||this.$4f_0)return;this.$h_0=true;!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$y_0()},$4f_0:false,$1i_0:function(){this.$h_0=false},$2U_0:function(){this.$h_0&&this.$1i_0()},$3z_0:function($p0){this.$5y_0();this.$R_0();this.$h_0=false;if($p0)if(!CUI.ScriptUtility.isNullOrUndefined(this.$6_0)){var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();$v_0.$3z_0($p0)}}},$5y_0:function(){var $v_0=$get(this.$4_0);if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.set_$2_0($v_0);else throw Error.create("Attempting to attach to Id: "+this.$4_0+" but this id is not present in the DOM")},$R_0:function(){},$1g_0:function(){if(!this.$2w_0){this.$2w_0=CUI.Utility.$3(this.get_domElementTagName());this.$2w_0.className=this.get_cssClass();this.$2w_0.id=this.$4_0}},get_domElementTagName:function(){return "span"},get_cssClass:function(){return ""},get_visibleInDOM:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$M_0))return false;return this.$M_0.get_visibleInDOM()},$8e_0:function(){if(!this.get_visible())return false;var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();if($v_0.$8e_0())return true}return false},ensureDOMElementAndEmpty:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this.$1g_0();else this.set_$2_0(CUI.Utility.removeChildNodes(this.get_$2_0()))},appendChildrenToElement:function(elm){var $v_0=document.createDocumentFragment(),$$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();$v_1.$1g_0();$v_0.appendChild($v_1.get_$2_0());$v_1.$2U_0()}elm.appendChild($v_0)},raiseCommandEvent:function(commandId,type,properties){var $v_0=this.$0_0.$CU_1(commandId,type,this,properties);this.$B0_0($v_0)},$B0_0:function($p0){this.$2p_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$B0_0($p0);this.$Ao_0($p0)},$2p_0:function($p0){return true},$Ao_0:function($p0){},getTextValue:function(){return null},receiveFocus:function(){},onMenuClosed:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$6_0))return;var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();$v_0.onMenuClosed()}},$3X_0:null,$5H_0:null,$5I_0:null,$8Z_0:function($p0,$p1,$p2){this.$3X_0=$p0;this.$5H_0=$p1;this.$5I_0=$p2},$6W_0:false,doDelayedInit:function(){if(this.$6W_0)return;if(CUI.ScriptUtility.isNullOrUndefined(this.$3X_0))throw Error.create("No delayedinit handler present in this component: "+this.$4_0);this.$6W_0=true;this.$3X_0(this,this.$5H_0,this.$5I_0)},$8L_0:function($p0){if($p0){this.$3X_0=null;this.$5H_0=null;this.$5I_0=null;this.$y_0()}this.$6W_0=false},get_needsDelayIniting:function(){return !CUI.ScriptUtility.isNullOrUndefined(this.$3X_0)},$49_0:function(){var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();$v_0.$49_0()}},$4j_0:null,get_$46_0:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$4j_0)){this.$4j_0=new Date;this.$4j_0.setTime(0)}return this.$4j_0},set_$46_0:function($p0){this.$4j_0=$p0;return $p0},get_$B3_0:function(){return this.get_$46_0().getTime()<this.$0_0.get_$46_0().getTime()},$Av_0:function(){this.get_$B3_0()&&this.$49_0()},dispose:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.$6_0)){var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();$v_0.dispose()}this.$6_0=null}this.$M_0=null;this.$0_0=null;this.$5H_0=null;this.$3X_0=null;this.$5I_0=null;this.$2w_0=null}};CUI.ContextMenu=function($p0,$p1,$p2,$p3,$p4){CUI.ContextMenu.initializeBase(this,[$p0,$p1,$p2,$p3,$p4])};CUI.ContextMenu.prototype={$1i_0:function(){this.get_needsDelayIniting()&&this.doDelayedInit();this.ensureDOMElementAndEmpty();if(CUI.ScriptUtility.isNullOrUndefined(this.$P_1)){this.$P_1=CUI.Utility.$3("div");this.$P_1.className="ms-cui-contextmenu-inner"}this.get_$2_0().appendChild(this.$P_1);this.appendChildrenToElement(this.$P_1);CUI.Menu.prototype.$1i_0.call(this)},get_cssClass:function(){return "ms-cui-contextmenu"}};CUI.ContextMenuDock=function($p0,$p1){CUI.ContextMenuDock.initializeBase(this,[$p0,$p1,"",""])};CUI.ContextMenuDock.prototype={$1i_0:function(){this.ensureDOMElementAndEmpty();this.appendChildrenToElement(this.get_$2_0());CUI.Component.prototype.$1i_0.call(this)},ensureCorrectChildType:function($p0){if(!CUI.ControlComponent.isInstanceOfType($p0))throw Error.create("Only children of type Control can be added to Strips.")},get_visibleInDOM:function(){return true}};CUI.ContextMenuLauncher=function($p0,$p1,$p2,$p3){CUI.ContextMenuLauncher.initializeBase(this,[$p0,$p1,$p2,$p3])};CUI.ContextMenuLauncher.prototype={$5Y_2:null,$5t_2:null,$9R_2:0,$9S_2:0,dispose:function(){this.$5t_2=null;CUI.MenuLauncher.prototype.dispose.call(this)},$Aa_2:function($p0,$p1){this.$5t_2=$p1;this.$5Y_2=this.getMenuPosition($p0,null);this.launchMenu(null);this.$B_1.$7z_0();return true},launchContextMenuAt:function($p0,$p1,$p2){this.$9R_2=$p1;this.$9S_2=$p2;this.$5t_2=$p0;this.launchMenu(null);this.$B_1.$7z_0();return true},positionMenu:function($p0,$p1){if(this.$5Y_2){this.$B_1.get_$2_0().style.top=this.$5Y_2.y+"px";this.$B_1.get_$2_0().style.left=this.$5Y_2.x+"px";this.$B_1.get_$2_0().style.position="absolute"}else{$p0.style.top="0px";$p0.style.left="0px";var $v_0=this.getAllElementDimensions($p0,this.$5t_2);$v_0["launcherLeft"]=this.$9R_2;$v_0["launcherTop"]=this.$9S_2;$v_0["launcherWidth"]=0;$v_0["launcherHeight"]=0;this.$0_0.$8b_1($p0,$v_0,false)}},getMenuPosition:function($p0,$p1){var $v_0=new Sys.UI.Bounds(0,0,0,0);if(!$p0)$p0=window.event;$v_0.y=$p0.clientY;$v_0.x=$p0.clientX;return $v_0}};CUI.ContextMenuRootProperties=function(){CUI.ContextMenuRootProperties.initializeBase(this)};CUI.ContextMenuRootProperties.prototype={CommandMenuOpen:null,CommandMenuClose:null};CUI.ContextMenuRoot=function(id,properties){this.$5F_2={};CUI.ContextMenuRoot.initializeBase(this,[id,properties])};CUI.ContextMenuRoot.prototype={refresh:function(){this.$1i_0();CUI.Root.prototype.$1i_0.call(this)},$1i_0:function(){CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&this.$1g_0();this.set_$2_0(CUI.Utility.removeChildNodes(this.get_$2_0()));this.appendChildrenToElement(this.get_$2_0());this.$h_0=false},get_rootType:function(){return "ContextMenu"},get_$19_1:function(){if(!CUI.Root.prototype.get_$19_1.call(this)){var $v_0=new CUI.BuildOptions;$v_0.lazyMenuInit=false;CUI.Root.prototype.set_$19_1.call(this,new CUI.Builder($v_0,null,null));CUI.Root.prototype.get_$19_1.call(this).$0_0=this}return CUI.Root.prototype.get_$19_1.call(this)},set_$19_1:function($p0){CUI.Root.prototype.set_$19_1.call(this,$p0);return $p0},get_contextMenuRootProperties:function(){return this.$5_1},ensureCorrectChildType:function(child){if(!CUI.ContextMenuDock.isInstanceOfType(child))throw Error.create("Only children of type ContextMenuDock can be added to a ContextMenuRoot")},createContextMenu:function(props,id,title,description,maxWidth){var $v_0=new CUI.ContextMenu(this,id,title,description,null);if(!props)props=new CUI.Controls.ContextMenuControlProperties;props.CommandMenuOpen=this.get_contextMenuRootProperties().CommandMenuOpen;props.CommandMenuClose=this.get_contextMenuRootProperties().CommandMenuClose;var $v_1=new CUI.Controls.ContextMenuControl(this,id+"Launcher",props,$v_0);this.$5F_2[id]=$v_1;var $v_2=new CUI.ContextMenuDock(this,"dock"+id);$v_2.addChild($v_1.createComponentForDisplayMode("Menu"));this.addChild($v_2);this.refresh()},showContextMenu:function(id,triggeringEvent,focusedElement){var $v_0=this.$5F_2[id];if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create('The context menu "'+id+'" does not exist');$v_0.$Aa_2(triggeringEvent,focusedElement)},showContextMenuAt:function(id,elmHadFocus,x,y){var $v_0=this.$5F_2[id];if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create('The context menu "'+id+'" does not exist');$v_0.launchContextMenuAt(elmHadFocus,x,y)}};CUI.ControlProperties=function(){};CUI.ControlProperties.prototype={Command:null,Id:null,TemplateAlias:null,ToolTipDescription:null,ToolTipHelpKeyWord:null,ToolTipImage32by32:null,ToolTipImage32by32Class:null,ToolTipImage32by32Top:null,ToolTipImage32by32Left:null,ToolTipSelectedItemTitle:null,ToolTipShortcutKey:null,ToolTipTitle:null,LabelCss:null};CUI.Control=function($p0,$p1,$p2){this.$$d_onDblClick=Function.createDelegate(this,this.onDblClick);this.$$d_onHelpKeyPress=Function.createDelegate(this,this.onHelpKeyPress);this.$$d_$Y_0=Function.createDelegate(this,this.$Y_0);this.$$d_launchToolTip=Function.createDelegate(this,this.launchToolTip);this.$0_0=$p0;this.$4_0=$p1;this.$5_0=$p2;this.$l_0=[];this.$4M_0=",";this.$2s_0={};$p0.$Ew_1(this)};CUI.Control.createStandardControlDOMElement=function($p0,$p1,$p2,$p3,$p4,$p5){var $v_0=$p3;return CUI.Control.createStandardControlDOMElementCore($p0,$p1,$p2,$v_0.Id,$v_0.Image32by32,$v_0.Image32by32Class,$v_0.Image32by32Top,$v_0.Image32by32Left,$v_0.Image16by16,$v_0.Image16by16Class,$v_0.Image16by16Top,$v_0.Image16by16Left,$v_0.LabelText,$v_0.LabelCss,$v_0.Alt,$v_0.Description,$v_0.ToolTipTitle,$p4,$p5)};CUI.Control.createStandardControlDOMElementCore=function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16,$p17,$p18){if(CUI.ScriptUtility.isNullOrUndefined($p12))$p12="";var $v_0=false,$v_1=true,$v_2=CUI.Utility.$4z(),$v_3=null;if($p2==="Large")$v_3="ms-cui-ctl-large";else if($p2==="Medium")$v_3="ms-cui-ctl-medium";else if($p2==="Menu16"||$p2==="Menu"){$v_3="ms-cui-ctl-menu";$v_0=true}else if($p2==="Menu32"){$v_3="ms-cui-ctl-menu ms-cui-ctl-menu32";$v_0=true}else $v_3="ms-cui-ctl";CUI.Utility.ensureCSSClassOnElement($v_2,$v_3);$p2==="Menu"&&CUI.Utility.ensureCSSClassOnElement($v_2,"ms-cui-textmenuitem");!CUI.ScriptUtility.isNullOrUndefined($p16)&&$v_2.setAttribute("aria-describedby",$p3+"_ToolTip");$v_2.setAttribute("mscui:controltype",$p0.get_$9h_0());var $v_4=CUI.Utility.$3("img"),$v_5=null,$v_6=null,$v_7=null,$v_8=null,$v_9=0;$v_4.alt="";$p14=CUI.ScriptUtility.isNullOrEmptyString($p14)?$p12:$p14;$v_2.setAttribute("role",$p0.get_$3E_0());CUI.Controls.FlyoutAnchor.isInstanceOfType($p0)&&$v_2.setAttribute("aria-haspopup","true");if(CUI.ScriptUtility.isNullOrEmptyString($p16)){$v_2.title=$p14;$v_4.alt=$p14;$v_1=false}if($p2==="Large"||$p2==="Menu32"){$v_5=$p4;$v_6=$p5;$v_7=$p6;$v_8=$p7;$v_9=4}else{$v_5=$p8;$v_6=$p9;$v_7=$p10;$v_8=$p11;$v_9=3}var $v_A=CUI.Utility.$k(2,$v_9,$v_5,$v_6,$v_4,true,false,$v_7,$v_8),$v_B=CUI.Utility.$3("span");$v_B.className=$p2==="Large"?"ms-cui-ctl-largeIconContainer":"ms-cui-ctl-iconContainer";$v_B.appendChild($v_A);var $v_C=null,$v_D=null;if($v_1)$v_D=CUI.Utility.$2o($p14);if($p2!=="Small"||$p18){$v_C=CUI.Utility.$3("span");if($p2!=="Small"){if($p2==="Large"){CUI.Utility.ensureCSSClassOnElement($v_C,"ms-cui-ctl-largelabel");$v_C.innerHTML=CUI.Utility.$A3($p12,$p18)}else{var $v_I=$p12;if($p18)$v_I=$v_I+" ";CUI.Utility.ensureCSSClassOnElement($v_C,"ms-cui-ctl-mediumlabel");CUI.UIUtility.setInnerText($v_C,$v_I)}if(!CUI.ScriptUtility.isNullOrEmptyString($p13))$v_C.style.cssText=$p13}else{CUI.Utility.ensureCSSClassOnElement($v_C,"ms-cui-ctl-smalllabel");CUI.UIUtility.setInnerText($v_C," ")}}else if($v_1)$v_C=CUI.Utility.$2o($p14);var $v_E=null;if($p18){var $v_J=CUI.Utility.$3("img");$v_J.alt="";if(CUI.ScriptUtility.isNullOrEmptyString($p16))$v_J.alt=$p14;$v_E=CUI.Utility.$k(2,1,$p1.$5_1.ImageDownArrow,$p1.$5_1.ImageDownArrowClass,$v_J,true,false,$p1.$5_1.ImageDownArrowTop,$p1.$5_1.ImageDownArrowLeft)}var $v_F=null,$v_G=null,$v_H=null;if($p2==="Menu32"){$v_F=CUI.Utility.$3("span");$v_F.className="ms-cui-ctl-menulabel";CUI.Utility.ensureCSSClassOnElement($v_C,"ms-cui-btn-title");$v_F.appendChild($v_C);if(!CUI.ScriptUtility.isNullOrUndefined($p15)){$v_G=CUI.Utility.$3("span");CUI.Utility.ensureCSSClassOnElement($v_G,"ms-cui-btn-menu-description");CUI.Utility.$2q($v_G,$p15);$v_G.style.display="block";$v_F.appendChild($v_G)}$v_H=CUI.Utility.$3("span");$v_H.className="ms-cui-ctl-menu32clear";$v_H.innerHTML="&nbsp;"}$v_2.appendChild($v_B);if(!CUI.ScriptUtility.isNullOrUndefined($v_C)){if(!CUI.ScriptUtility.isNullOrUndefined($v_F)){$v_2.appendChild($v_F);$v_2.appendChild($v_H)}else{$v_2.appendChild($v_C);$p2==="Small"&&$p18&&$v_1&&$v_2.appendChild($v_D)}!CUI.ScriptUtility.isNullOrUndefined($v_E)&&$v_C.appendChild($v_E)}if($v_0){var $v_K=CUI.Utility.$9l();$v_2.appendChild($v_K)}return $v_2};CUI.Control.createTwoAnchorControlDOMElementCore=function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15){var $v_0=true;if(CUI.ScriptUtility.isNullOrUndefined($p12))$p12="";var $v_1=CUI.Utility.$3("span");if($p2==="Large")$v_1.className="ms-cui-ctl-large";else if($p2==="Medium")$v_1.className="ms-cui-ctl ms-cui-ctl-medium";else $v_1.className="ms-cui-ctl ms-cui-ctl-small";!CUI.ScriptUtility.isNullOrUndefined($p14)&&$v_1.setAttribute("aria-describedby",$p3+"_ToolTip");$v_1.setAttribute("mscui:controltype",$p0.get_$9h_0());var $v_2=CUI.Utility.$4z(),$v_3=CUI.Utility.$4z();$v_2.className="ms-cui-ctl-a1";$v_3.className="ms-cui-ctl-a2";$p13=CUI.ScriptUtility.isNullOrEmptyString($p13)?$p12:$p13;$v_2.setAttribute("role",$p0.get_$3E_0());$v_3.setAttribute("role",$p0.get_$3E_0());$v_3.setAttribute("aria-haspopup","true");var $v_4=CUI.Utility.$3("span");$v_4.className="ms-cui-ctl-a1Internal";var $v_5=CUI.Utility.$3("img"),$v_6=null,$v_7=null,$v_8=null,$v_9=null,$v_A=0;$v_5.alt="";if(CUI.ScriptUtility.isNullOrEmptyString($p14)){$v_2.title=$p13;$v_3.title=$p13;$v_5.alt=$p13;$v_0=false}if($p2==="Large"||$p2==="Menu32"){$v_6=$p4;$v_7=$p5;$v_8=$p6;$v_9=$p7;$v_A=4}else{$v_6=$p8;$v_7=$p9;$v_8=$p10;$v_9=$p11;$v_A=3}var $v_B=CUI.Utility.$k(2,$v_A,$v_6,$v_7,$v_5,true,false,$v_8,$v_9),$v_C=null,$v_D=null;if($v_0){$v_C=CUI.Utility.$2o($p13);$v_D=CUI.Utility.$2o($p13)}var $v_E=null;if($p2!=="Small"||$p15){$v_E=CUI.Utility.$3("span");if($p2!=="Small")if($p2==="Large"){CUI.Utility.ensureCSSClassOnElement($v_E,"ms-cui-ctl-largelabel");$v_E.innerHTML=CUI.Utility.$A3($p12,$p15)}else if($p2==="Medium"){CUI.Utility.ensureCSSClassOnElement($v_E,"ms-cui-ctl-mediumlabel");CUI.UIUtility.setInnerText($v_E,$p12)}}var $v_F=null;if($p15){var $v_G=CUI.Utility.$3("img");if(CUI.ScriptUtility.isNullOrEmptyString($p14))$v_G.alt=$p13;$v_F=CUI.Utility.$k(2,1,$p1.$5_1.ImageDownArrow,$p1.$5_1.ImageDownArrowClass,$v_G,true,false,$p1.$5_1.ImageDownArrowTop,$p1.$5_1.ImageDownArrowLeft)}$v_1.appendChild($v_2);$v_1.appendChild($v_3);$v_2.appendChild($v_4);$v_4.appendChild($v_B);if(!CUI.ScriptUtility.isNullOrUndefined($v_E)){if($p2==="Large"){$v_3.appendChild($v_E);$v_0&&$v_2.appendChild($v_C)}else{$v_4.appendChild($v_E);$v_0&&$v_3.appendChild($v_D)}$p2==="Small"&&$v_0&&$v_2.appendChild($v_C)}if(!CUI.ScriptUtility.isNullOrUndefined($v_F))if($p2==="Large")$v_E.appendChild($v_F);else $v_3.appendChild($v_F);return $v_1};CUI.Control.prototype={$0_0:null,$4_0:null,$l_0:null,$5_0:null,$4M_0:null,$2s_0:null,$1U_0:null,$5u_0:false,$7d_0:null,$7c_0:null,$1Q_0:false,$5S_0:false,get_controlProperties:function(){return this.$5_0},$7Z_0:null,get_stateProperties:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$7Z_0))this.$7Z_0={};return this.$7Z_0},$6S_0:null,get_commandProperties:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$6S_0))this.$6S_0={};return this.$6S_0},get_templateAlias:function(){return this.$5_0.TemplateAlias},get_$9h_0:function(){return "Control"},get_$3E_0:function(){return "button"},ensureValidDisplayMode:function($p0){if(this.$4M_0.indexOf(","+$p0+",")!==-1)return;throw Error.create("The display mode with name: "+$p0+" is not valid for this control with id: "+this.$4_0)},refreshDOMElements:function(){this.onStateChanged();!this.get_enabled()&&this.onEnabledChanged(false)},onStateChanged:function(){},$6U_0:null,getDOMElementForDisplayMode:function($p0){this.ensureValidDisplayMode($p0);var $v_0=this.$2s_0[$p0];if(!CUI.ScriptUtility.isNullOrUndefined($v_0))return $v_0;this.$6U_0=$p0;$v_0=this.createDOMElementForDisplayMode($p0);this.$6U_0=null;if(CUI.ScriptUtility.isNullOrEmptyString($v_0.id))$v_0.id=this.$4_0+"-"+$p0;this.storeElementForDisplayMode($v_0,$p0);this.refreshDOMElements();return $v_0},storeElementForDisplayMode:function($p0,$p1){this.$2s_0[$p1]=$p0},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);!CUI.ScriptUtility.isNullOrUndefined($v_0)&&this.storeElementForDisplayMode($v_0,$p0)},$Bm_0:function($p0){},createComponentForDisplayMode:function($p0){var $v_0=this.createComponentForDisplayModeInternal($p0);Array.add(this.$l_0,$v_0);return $v_0},get_components:function(){return this.$l_0},createComponentForDisplayModeInternal:function($p0){var $v_0=this.$0_0.$CW_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);return $v_0},dispose:function(){this.releaseEventHandlers();this.$0_0=null;this.$l_0=null;this.$4M_0=null;this.$5_0=null;var $$dict_0=this.$2s_0;for(var $$key_1 in $$dict_0){var $v_0={key:$$key_1,value:$$dict_0[$$key_1]};delete this.$2s_0[$v_0.key]}this.$2s_0=null;!CUI.ScriptUtility.isNullOrUndefined(this.$1U_0)&&this.$1U_0.dispose()},releaseEventHandlers:function(){var $$dict_0=this.$2s_0;for(var $$key_1 in $$dict_0){var $v_0={key:$$key_1,value:$$dict_0[$$key_1]};CUI.Utility.$8R($v_0.value)}},get_id:function(){return this.$4_0},get_root:function(){return this.$0_0},addDisplayMode:function($p0){if(this.$4M_0.indexOf(","+$p0+",")!==-1)return;this.$4M_0+=$p0+","},ensureCorrectChildType:function($p0){if(!CUI.ToolTip.isInstanceOfType($p0))throw Error.create("Child Components may not be added to this type of ControlComponent.")},get_displayedComponent:function(){for(var $v_0=this.$l_0.length,$v_1=0;$v_1<$v_0;$v_1++){var $v_2=this.$l_0[$v_1];if($v_2.get_visibleInDOM())return $v_2}return null},$2p_0:function($p0){return true},$Ao_0:function($p0){},onMenuClosed:function(){},onClick:function($p0){$p0.preventDefault()},onDblClick:function($p0){$p0.preventDefault();if(!this.get_enabled())return;Sys.Browser.agent===Sys.Browser.InternetExplorer&&this.onClick($p0)},onBeginFocus:function(){window.clearInterval(this.$0_0.$2k_1);if(!CUI.ScriptUtility.isNullOrUndefined(this.$0_0.$3B_1))if(this.$0_0.$3B_1.$4_0===this.$4_0){this.launchToolTip();return}else{this.$0_0.$2m_1();this.$0_0.$2k_1=window.setTimeout(this.$$d_launchToolTip,500)}else this.$0_0.$2k_1=window.setTimeout(this.$$d_launchToolTip,500)},onEndFocus:function(){window.clearInterval(this.$0_0.$2k_1);if(this.$5u_0)this.$0_0.$2k_1=window.setTimeout(this.$$d_$Y_0,100)},onToolTipOpenned:function(){this.$7d_0=this.$$d_onHelpKeyPress;this.$7c_0=this.$1U_0.$$d_$E4_1;$addHandler(document,"keydown",this.$7d_0);$addHandler(document,"click",this.$7c_0)},onToolTipClosed:function(){$removeHandler(document,"keydown",this.$7d_0);$removeHandler(document,"click",this.$7c_0)},onHelpKeyPress:function($p0){!CUI.ScriptUtility.isNullOrUndefined(this.$1U_0)&&this.$1U_0.$Ak_1($p0)},launchToolTip:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$0_0))return;window.clearInterval(this.$0_0.$2k_1);if(this.$5u_0)return;!CUI.ScriptUtility.isNullOrUndefined(this.$0_0.$3B_1)&&this.$0_0.$3B_1.$4_0!==this.$4_0&&this.$0_0.$2m_1();if(CUI.ScriptUtility.isNullOrUndefined(this.$5_0.ToolTipTitle))return;this.$1U_0=new CUI.ToolTip(this.$0_0,this.$4_0+"_ToolTip",this.$5_0.ToolTipTitle,this.$5_0.ToolTipDescription,this.$5_0);if(!this.get_enabled()){var $v_1=new CUI.DisabledCommandInfoProperties;$v_1.Icon=this.$0_0.$5_1.ToolTipDisabledCommandImage16by16;$v_1.IconClass=this.$0_0.$5_1.ToolTipDisabledCommandImage16by16Class;$v_1.IconTop=this.$0_0.$5_1.ToolTipDisabledCommandImage16by16Top;$v_1.IconLeft=this.$0_0.$5_1.ToolTipDisabledCommandImage16by16Left;$v_1.Title=this.$0_0.$5_1.ToolTipDisabledCommandTitle;$v_1.Description=this.$0_0.$5_1.ToolTipDisabledCommandDescription;$v_1.HelpKeyWord=this.$0_0.$5_1.ToolTipDisabledCommandHelpKey;this.$1U_0.$1C_1=$v_1}var $v_0=this.get_displayedComponent();$v_0.$7r_0();$v_0.addChild(this.$1U_0);this.$1U_0.$Ci_1();this.$5u_0=true;this.$0_0.$3B_1=this;this.onToolTipOpenned()},$Y_0:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$0_0)&&window.clearInterval(this.$0_0.$2k_1);if(!CUI.ScriptUtility.isNullOrUndefined(this.$1U_0)){this.$1U_0.$AP_1();this.$5u_0=false;this.onToolTipClosed();CUI.UIUtility.removeNode(this.$1U_0.get_$2_0());this.$1U_0=null}},get_enabled:function(){return this.$1Q_0},set_enabled:function($p0){if(this.$1Q_0===$p0&&this.$5S_0)return $p0;this.$1Q_0=$p0;this.$5S_0=true;this.onEnabledChanged($p0);return $p0},get_enabledInternal:function(){return this.$1Q_0},set_enabledInternal:function($p0){this.$1Q_0=$p0;return $p0},$F7_0:function($p0){this.$1Q_0=$p0;this.onEnabledChanged($p0)},$Ef_0:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$5_0.Command)&&this.pollForStateAndUpdateInternal(this.$5_0.Command,null,null,false)},pollForStateAndUpdateInternal:function($p0,$p1,$p2,$p3){var $v_0=(this.$0_0.$Au_1($p0,$p1,$p2,$p3)&1)>0;this.set_enabled($v_0);return $v_0},getTextValue:function(){return ""},receiveFocus:function(){},$60_0:function(){return this.$A4_0()},$61_0:function(){return this.$A4_0()},$A4_0:function(){var $v_0=this.get_displayedComponent();if(!CUI.MenuItem.isInstanceOfType($v_0))return false;if(!$v_0.get_$1H_2()){this.receiveFocus();return true}return false},$CI_0:function(){},$63_0:function(){var $v_0=this.get_displayedComponent();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return null;return $v_0.get_$2_0()},$8d_0:function(){return false}};CUI.ControlComponent=function($p0,$p1,$p2,$p3){CUI.ControlComponent.initializeBase(this,[$p0,$p1,$p2,""]);this.$N_1=$p3};CUI.ControlComponent.prototype={$N_1:null,get_displayMode:function(){return this.get_title()},createChildArray:function(){},$1i_0:function(){this.$h_0=false},$5y_0:function(){this.$N_1.$Bl_0(this.get_displayMode())},$R_0:function(){this.$N_1.$Bm_0(this.get_displayMode())},get_$2_0:function(){return this.$N_1.getDOMElementForDisplayMode(this.get_title())},set_$2_0:function($p0){throw Error.create("Cannot set the DOM Element of ControlComponents.  They get their DOM Elements from the Control.");return $p0},get_componentElement:function(){return CUI.Component.prototype.get_$2_0.call(this)},get_enabled:function(){return this.$N_1.get_enabled()},set_enabled:function($p0){this.$N_1.set_enabled($p0);return $p0},get_$CM_0:function(){if((this._componentHeight===-1||this.valueIsDirty(this._lastHeightUpdate))&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this._componentHeight=this.get_$2_0().offsetHeight;return this._componentHeight},get_$9g_0:function(){if((this._componentTopPosition===-1||this.valueIsDirty(this._lastTopUpdate))&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this._componentTopPosition=CUI.UIUtility.calculateOffsetTop(this.get_$2_0());return this._componentTopPosition},$F8_0:function($p0){this.$N_1.$F7_0($p0)},$4y_1:function($p0){return this.$N_1.createComponentForDisplayMode(this.get_displayMode())},onEnabledChanged:function($p0){this.$N_1.onEnabledChanged($p0)},ensureCorrectChildType:function($p0){this.$N_1.ensureCorrectChildType($p0)},$2p_0:function($p0){return this.$N_1.$2p_0($p0)},$Ao_0:function($p0){this.$N_1.$Ao_0($p0)},get_textValue:function(){return this.$N_1.getTextValue()},$49_0:function(){this.$N_1.$Ef_0()},receiveFocus:function(){this.$N_1.receiveFocus()},onMenuClosed:function(){this.$N_1.onMenuClosed()},$8e_0:function(){return this.$N_1.$8d_0()},dispose:function(){this.$N_1.dispose();this.$N_1=null;CUI.Component.prototype.dispose.call(this)}};CUI.DataQueryResult=function(){};CUI.DataQueryResult.prototype={success:false,id:null,queryData:null,contextData:null};CUI.DataQuery=function(){};CUI.DataQuery.prototype={dataUrl:null,version:null,lcid:null,id:null,queryType:0,handler:null,data:null};CUI.DataSource=function(dataUrl,version,lcid){this.$$d_onDataReturned=Function.createDelegate(this,this.onDataReturned);this.$5G_0=dataUrl;this.$5w_0=version;this.$5b_0=lcid;this.$9B_0={}};CUI.DataSource.prototype={$5G_0:null,$9B_0:null,$5w_0:null,$5b_0:null,dispose:function(){this.$5G_0=null;this.$5w_0=null;this.$5b_0=null;this.$9B_0=null},get_dataUrl:function(){return this.$5G_0},get_version:function(){return this.$5w_0},get_lcid:function(){return this.$5b_0},runQuery:function(query){var $v_0=this.$5w_0;if(!CUI.ScriptUtility.isNullOrUndefined(query.version))$v_0=query.version;var $v_1=this.$5b_0;if(!CUI.ScriptUtility.isNullOrUndefined(query.lcid))$v_1=query.lcid;var $v_2=this.$5G_0;if(!CUI.ScriptUtility.isNullOrUndefined(query.dataUrl))$v_2=query.dataUrl;var $v_3,$v_4=null;if($v_2.indexOf("?")===-1)$v_3=$v_2+"?ver=";else $v_3=$v_2+"&ver=";$v_3=$v_3+$v_0+"&id="+query.id+"&lcid="+$v_1+"&qt=";switch(query.queryType){case 1:$v_4="all";break;case 4:$v_4="ribbontab";break;case 3:$v_4="ribbonshallow";break;case 5:$v_4="root";break;case 2:$v_4="ribbonvisibletabdeep";break}$v_3+=$v_4;CUI.PMetrics.perfMark(7109);var $v_5=new Sys.Net.WebRequest;$v_5.set_httpVerb("GET");$v_5.set_url($v_3);var $v_6=new CUI.QueryRecord;$v_6.id=query.id;$v_6.queryType=query.queryType;$v_6.data=query.data;$v_6.handler=query.handler;$v_5.set_userContext($v_6);$v_5.add_completed(this.$$d_onDataReturned);$v_5.invoke()},onDataReturned:function(executor){CUI.PMetrics.perfMark(7110);var $v_0=executor.get_webRequest().get_userContext(),$v_1=new CUI.DataQueryResult;$v_1.contextData=$v_0.data;$v_1.id=$v_0.id;if(executor.get_responseAvailable()){$v_1.success=true;$v_1.queryData=executor.get_object();$v_0.handler($v_1)}else{$v_1.success=false;$v_0.handler($v_1)}}};CUI.Gallery=function($p0,$p1,$p2,$p3,$p4){this.$7_1=-1;CUI.Gallery.initializeBase(this,[$p0,$p1,$p2,$p3]);this.$3N_1=$p4;this.$4x_1=parseInt(this.$3N_1.Width);this.$5L_1=CUI.Gallery.$9i(this.$3N_1.ElementDimensions)};CUI.Gallery.$9i=function($p0){switch($p0){case "Size16by16":return 1;case "Size32by32":return 2;case "Size48by48":return 3;case "Size64by48":return 4;case "Size72by96":return 5;case "Size96by72":return 6;case "Size96by96":return 7;case "Size128by128":return 8;case "Size190by30":return 9;case "Size190by40":return 10;case "Size190by50":return 11;case "Size190by60":return 12;default:throw Error.argument("s","The parameter s is not a valid GalleryElementDimension")}};CUI.Gallery.prototype={$3N_1:null,$5L_1:0,$4x_1:0,$7R_1:null,get_domElementTagName:function(){return "table"},get_cssClass:function(){return "ms-cui-gallery"},$1i_0:function(){this.ensureDOMElementAndEmpty();var $v_0=CUI.Utility.$3("tbody");this.get_$2_0().appendChild($v_0);this.appendChildrenToElement($v_0)},appendChildrenToElement:function($p0){for(var $v_0=Math.ceil(this.$6_0.$O_0/this.$4x_1),$v_1,$v_2,$v_3,$v_4=0,$v_5=0;$v_5<$v_0;$v_5++){$v_1=CUI.Utility.$3("tr");for(var $v_6=0;$v_6<this.$4x_1;$v_6++){$v_2=CUI.Utility.$3("td");$v_2.className="ms-cui-gallery-td ms-cui-gallery-element-"+CUI.GalleryElementDimensions.toString(this.$5L_1);if($v_4<this.$6_0.$O_0){$v_3=this.$6_0.get_item($v_4++);$v_3.$1g_0();$v_2.appendChild($v_3.get_$2_0());$v_3.$2U_0()}$v_1.appendChild($v_2)}$p0.appendChild($v_1)}},$7N_1:false,$2p_0:function($p0){if(this.$7N_1)return true;if($p0.$I_1===3){var $v_0=$p0.$37_1;if(!CUI.ISelectableControl.isInstanceOfType($v_0.$N_1))return CUI.Component.prototype.$2p_0.call(this,$p0);var $v_1=$v_0.$N_1;!CUI.ScriptUtility.isNullOrUndefined(this.$7R_1)&&this.$7R_1.deselect();this.$7R_1=$v_1}if($p0.$I_1===3||$p0.$I_1===7||$p0.$I_1===8){var $v_2;switch($p0.$I_1){case 3:$v_2=this.$3N_1.Command;break;case 7:$v_2=this.$3N_1.CommandPreview;break;case 8:$v_2=this.$3N_1.CommandRevert;break;default:$v_2=this.$3N_1.Command;break}this.$7N_1=true;this.raiseCommandEvent($v_2,$p0.$I_1,$p0.$34_1);this.$7N_1=false;CUI.Component.prototype.$2p_0.call(this,$p0);return false}return CUI.Component.prototype.$2p_0.call(this,$p0)},$15_0:function(){if(!this.$6_0.$O_0)return;this.$7_1=0;var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();$v_0.$15_0()}},$7z_0:function(){if(!this.$6_0.$O_0)return;this.$7_1>-1&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=0;this.$6_0.get_item(this.$7_1).$7z_0()},$81_0:function(){var $v_0=this.$6_0.$O_0;if(!$v_0)return;this.$7_1>-1&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_0-1;this.$6_0.get_item(this.$7_1).$81_0()},$80_0:function($p0){if(!this.$6_0.$O_0)return false;var $v_0=0,$$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.$80_0($p0)){this.$7_1>-1&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_0;return true}$v_0++}return false},$61_0:function(){if(this.$7_1===-1)this.$7_1=this.$6_0.$O_0-1;var $v_0=this.$7_1,$v_1=this.$6_0.getEnumeratorAtPos($v_0);while($v_1.movePrevious()){if($v_1.get_current().$61_0()){if($v_0!==this.$7_1){this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_0}return true}$v_0--}this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=-1;return false},$60_0:function(){if(this.$7_1===-1)this.$7_1=0;var $v_0=this.$7_1,$v_1=this.$6_0.getEnumeratorAtPos($v_0);while($v_1.moveNext()){if($v_1.get_current().$60_0()){if($v_0!==this.$7_1){this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_0}return true}$v_0++}this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=-1;return false},ensureCorrectChildType:function($p0){if(!CUI.ControlComponent.isInstanceOfType($p0))throw Error.create("Galleries can only have children controls of type GalleryButton");var $v_0=$p0;if(!CUI.Controls.GalleryButton.isInstanceOfType($v_0.$N_1))throw Error.create("Galleries can only have children of type GalleryButton")},get_elementDimensions:function(){return this.$5L_1},set_elementDimensions:function($p0){this.$5L_1=$p0;return $p0},get_width:function(){return this.$4x_1},set_width:function($p0){this.$4x_1=$p0;return $p0}};CUI.Jewel=function($p0,$p1){CUI.Jewel.initializeBase(this,[$p0,$p1])};CUI.Jewel.prototype={$98_2:null,refresh:function(){this.$1i_0();CUI.Root.prototype.refresh.call(this)},$1i_0:function(){CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&this.$1g_0();this.set_$2_0(CUI.Utility.removeChildNodes(this.get_$2_0()));this.appendChildrenToElement(this.get_$2_0());this.$h_0=false},ensureCorrectChildType:function(child){if(!CUI.ControlComponent.isInstanceOfType(child))throw Error.create('The child "'+child.$4_0+'" is not a ControlComponent');if(!CUI.Controls.JewelMenuLauncher.isInstanceOfType(child.$N_1))throw Error.create("Only children of type JewelMenuLauncher can be added to a Jewel")},get_cssClass:function(){return "ms-cui-jewel "+CUI.Root.prototype.get_cssClass.call(this)},get_rootType:function(){return "Jewel"},get_visibleInDOM:function(){return true},get_$Dv_2:function(){return this.get_$19_1()},set_$Dv_2:function($p0){this.set_$19_1($p0);return $p0},$DM_2:function(){this.$98_2.$DO_2()}};CUI.JewelBuildContext=function(){CUI.JewelBuildContext.initializeBase(this)};CUI.JewelBuildContext.prototype={jewel:null,jewelId:null};CUI.JewelBuildOptions=function(){CUI.JewelBuildOptions.initializeBase(this)};CUI.JewelBuilder=function(options,elmPlaceholder,rootBuildClient){this.$$d_$Ap_1=Function.createDelegate(this,this.$Ap_1);CUI.JewelBuilder.initializeBase(this,[options,elmPlaceholder,rootBuildClient]);if(CUI.ScriptUtility.isNullOrUndefined(elmPlaceholder))throw Error.create("Jewel placeholder DOM element is null or undefined.")};CUI.JewelBuilder.prototype={get_jewel:function(){return this.$0_0},set_jewel:function(value){this.$0_0=value;return value},buildJewel:function(jewelId){if(this.$2f_0)return false;if(this.isIdTrimmed(jewelId))return true;var $v_0=new CUI.JewelBuildContext;$v_0.jewelId=jewelId;this.$2f_0=true;var $v_1=new CUI.DataQuery;$v_1.id=$v_0.jewelId;$v_1.queryType=5;$v_1.handler=this.$$d_$Ap_1;$v_1.data=$v_0;this.$v_0.runQuery($v_1);return true},$Bz_1:function($p0,$p1){var $v_0=new CUI.DataQueryResult;$v_0.success=true;$v_0.queryData=$p0;$v_0.contextData=$p1;this.$Ap_1($v_0)},$Ap_1:function($p0){var $v_0=$p0.contextData;$p0.queryData=this.applyDataExtensions($p0.queryData);var $v_1=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0.queryData,"Jewel");this.set_jewel(this.$C0_1($v_1,$v_0));this.get_jewel().set_$Dv_2(this);this.$1R_0.onComponentCreated(this.get_jewel(),this.get_jewel().$4_0);if(this.get_$Dw_1().attachToDOM)this.get_jewel().$3z_0(true);else{this.get_jewel().$1i_0();this._elmPlaceholder.appendChild(this.get_jewel().get_$2_0());CUI.Utility.ensureCSSClassOnElement(this._elmPlaceholder,"loaded")}this.$8N_0(this.get_jewel());this.$1R_0.onComponentBuilt(this.get_jewel(),this.get_jewel().$4_0)},$C0_1:function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p0))throw Error.create("No Jewel element was present in the data");var $v_0=new CUI.DataNodeWrapper($p0);this.set_jewel(new CUI.Jewel($v_0.get_attributes()["Id"],$v_0.get_attributes()));var $v_1=this.$C1_1($p0,$p1);this.get_jewel().addChild($v_1.createComponentForDisplayMode("Default"));this.get_jewel().$98_2=$v_1;return this.get_jewel()},$C1_1:function($p0,$p1){var $v_0=$p0.attrs,$v_1=CUI.DataNodeWrapper.getNodeChildren($p0),$v_2=null,$v_3=$p0.attrs;if(!CUI.Utility.$x($v_3.PopulateDynamically))$v_2=this.$3F_0($v_1[0],$p1,false);var $v_4=new CUI.Controls.JewelMenuLauncher(this.get_jewel(),$v_0.Id,$v_0,$v_2);return $v_4},get_$Dw_1:function(){return this.$u_0}};CUI.Menu=function($p0,$p1,$p2,$p3,$p4){this.$7_1=-1;CUI.Menu.initializeBase(this,[$p0,$p1,$p2,$p3]);this.$75_1=$p4};CUI.Menu.prototype={$P_1:null,$Ba_1:null,$BX_1:null,$3v_1:null,$75_1:null,$8k_1:25,$1i_0:function(){this.get_needsDelayIniting()&&this.doDelayedInit();this.ensureDOMElementAndEmpty();var $v_0=this.$0_0._textDirection,$v_1=this.get_$2_0(),$v_2=this.$P_1;if(!$v_0)$v_1.style.direction="ltr";else if($v_0===1){CUI.Utility.ensureCSSClassOnElement($v_1,"ms-cui-rtl");$v_1.style.direction="rtl"}if(CUI.ScriptUtility.isNullOrUndefined($v_2)){$v_2=CUI.Utility.$3("div");$v_2.className="ms-cui-smenu-inner"}$v_1.setAttribute("role","menu");$v_1.appendChild($v_2);if(!CUI.ScriptUtility.isNullOrEmptyString(this.$75_1))$v_1.style.maxWidth=this.$75_1;this.appendChildrenToElement($v_2);CUI.Component.prototype.$1i_0.call(this);$addHandler($v_1,"contextmenu",CUI.Utility.get_returnFalseHandler())},get_cssClass:function(){return "ms-cui-menu"},get_domElementTagName:function(){return "div"},ensureCorrectChildType:function($p0){if(!CUI.MenuSection.isInstanceOfType($p0))throw Error.create("Only MenuSection Components can be added to Menu Components.")},get_innerDiv:function(){return this.$P_1},set_innerDiv:function($p0){this.$P_1=$p0;return $p0},get_additionalWidth:function(){var $v_0=this.$8k_1;this.$8k_1=0;return $v_0},$5g_1:null,get_$At_1:function(){return this.$5g_1},set_$At_1:function($p0){$p0&&!CUI.ScriptUtility.isNullOrUndefined(this.$5g_1)&&this.$0_0.$2l_1(this.$5g_1);this.$5g_1=$p0;return $p0},get_$CM_0:function(){if(this._componentHeight===-1&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this._componentHeight=this.get_$2_0().offsetHeight;return this._componentHeight},get_$9g_0:function(){if(this._componentTopPosition===-1&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this._componentTopPosition=CUI.UIUtility.calculateOffsetTop(this.get_$2_0());return this._componentTopPosition},$Do_1:function(){this._componentWidth=-1;this._componentHeight=-1;this._componentTopPosition=-1;this._componentLeftPosition=-1},$49_0:function(){this.set_$46_0(new Date);CUI.Component.prototype.$49_0.call(this)},$15_0:function(){if(!this.$6_0.$O_0)return;this.$7_1=0;var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();$v_0.$15_0()}},$7z_0:function(){if(!this.$6_0.$O_0)return;this.$7_1=0;this.$6_0.get_item(0).$7z_0();this.$60_0()},$81_0:function(){var $v_0=this.$6_0.$O_0;if(!$v_0)return;this.$7_1=$v_0-1;this.$6_0.get_item(this.$7_1).$81_0();this.$61_0()},$80_0:function($p0){if(!this.$6_0.$O_0)return false;this.$7_1=0;var $v_0=0,$$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.$80_0($p0)){this.$7_1=$v_0;return true}$v_0++}return false},$61_0:function(){if(this.$7_1===-1)this.$7_1=this.$6_0.$O_0-1;var $v_0=this.$6_0.getEnumeratorAtPos(this.$7_1),$v_1=this.$7_1;while($v_0.movePrevious()){if($v_0.get_current().$61_0()){this.$7_1=$v_1;return true}$v_1--}this.$7_1=-1;return false},$60_0:function(){if(this.$7_1===-1)this.$7_1=0;var $v_0=this.$6_0.getEnumeratorAtPos(this.$7_1),$v_1=this.$7_1;while($v_0.moveNext()){if($v_0.get_current().$60_0()){this.$7_1=$v_1;return true}$v_1++}this.$7_1=-1;return false},$AF_1:function($p0){return this.$AG_1(this,$p0)},$AG_1:function($p0,$p1){var $v_0;if(CUI.ControlComponent.isInstanceOfType($p0)){var $v_2=$p0;if(CUI.ISelectableControl.isInstanceOfType($v_2.$N_1)){var $v_3=$v_2.$N_1;if($v_3.getMenuItemId()===$p1)return $v_3}}var $v_1=$p0.$6_0;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)){var $$enum_6=$v_1.getEnumerator();while($$enum_6.moveNext()){var $v_4=$$enum_6.get_current();$v_0=this.$AG_1($v_4,$p1);if($v_0)return $v_0}}return null},$Df_1:function(){var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current(),$$enum_2=$v_0.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.get_visible())return true}}return false},get_visibleInDOM:function(){return this.$73_1},$73_1:false,dispose:function(){CUI.Component.prototype.dispose.call(this);this.$P_1=null;this.$Ba_1=null;this.$BX_1=null;this.$3v_1=null;try{$removeHandler(this.get_$2_0(),"contextmenu",CUI.Utility.get_returnFalseHandler())}catch($$e_0){}}};CUI.MenuItem=function($p0,$p1,$p2,$p3){CUI.MenuItem.initializeBase(this,[$p0,$p1,$p2,$p3])};CUI.MenuItem.prototype={$91_2:false,get_$1H_2:function(){return this.$91_2},set_$1H_2:function($p0){this.$91_2=$p0;return $p0},$80_0:function($p0){if(CUI.ISelectableControl.isInstanceOfType(this.$N_1)){var $v_0=this.$N_1;if($v_0.getMenuItemId()===$p0)if(this.get_visible()&&this.get_enabled()){this.receiveFocus();this.set_$1H_2(true);return true}}return false},$61_0:function(){if(!this.get_visible())return false;this.set_$1H_2(this.$N_1.$61_0());return this.get_$1H_2()},$60_0:function(){if(!this.get_visible())return false;this.set_$1H_2(this.$N_1.$60_0());return this.get_$1H_2()},$15_0:function(){this.set_$1H_2(false)}};CUI.MenuLauncherControlProperties=function(){CUI.MenuLauncherControlProperties.initializeBase(this)};CUI.MenuLauncherControlProperties.prototype={CacheMenuVersions:null,CommandMenuOpen:null,CommandMenuClose:null,CommandValueId:null,PopulateDynamically:null,PopulateOnlyOnce:null,PopulateQueryCommand:null};CUI.BrowserUtility=function(){};CUI.BrowserUtility.$AZ=function(){return Sys.Browser.agent===Sys.Browser.Firefox||Sys.Browser.name.toLowerCase().indexOf("firefox")!==-1||navigator.userAgent.toLowerCase().indexOf("gecko")!==-1};CUI.BrowserUtility.$Dt=function(){return navigator.userAgent!=""&&navigator.userAgent!=null&&(navigator.userAgent.toLowerCase().search("ipad")>-1||navigator.userAgent.toLowerCase().search("ipod")>-1||navigator.userAgent.toLowerCase().search("iphone")>-1)};CUI.MenuLauncher=function($p0,$p1,$p2,$p3){this.$$d_$Ea_1=Function.createDelegate(this,this.$Ea_1);this.$$d_addAndPositionBackFrameInternal=Function.createDelegate(this,this.addAndPositionBackFrameInternal);this.$5i_1=-1;CUI.MenuLauncher.initializeBase(this,[$p0,$p1,$p2]);this.$B_1=$p3};CUI.MenuLauncher.dictToInt=function($p0,$p1){return $p0[$p1]};CUI.MenuLauncher.prototype={$j_1:false,_selectedControl:null,get_menuLaunched:function(){return this.$j_1},$B_1:null,$18_1:false,get_launchedByKeyboard:function(){return this.$18_1},set_launchedByKeyboard:function($p0){this.$18_1=$p0;return $p0},$2I_1:null,get_elmHadFocus:function(){return this.$2I_1},set_elmHadFocus:function($p0){this.$2I_1=$p0;return $p0},$3Z_1:null,get_$9Z_1:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$3Z_1))this.$3Z_1=CUI.Utility.$9m();return this.$3Z_1},launchMenu:function($p0,$p1){if(this.$j_1)return false;this.$2I_1=$p0;CUI.Utility.$x(this.get_$1_1().PopulateDynamically)&&this.pollForDynamicMenu(true,$p1);if(CUI.ScriptUtility.isNullOrUndefined(this.$B_1))return false;if(!CUI.ScriptUtility.isNullOrUndefined(this.$4o_1)){this.$4o_1();this.$4o_1=null}this.$B_1.$2U_0();if(!this.$B_1.$Df_1())return false;var $v_0=this.get_displayedComponent();$v_0.$7r_0();$v_0.$4f_0=true;$v_0.addChild(this.$B_1);$v_0.$4f_0=false;this.$B_1.$Av_0();this.$B_1.$Do_1();var $v_1=CUI.Ribbon.isInstanceOfType(this.$0_0),$v_2=null,$v_3=false;if($v_1){$v_2=this.$0_0;$v_3=$v_2.get_$58_2();$v_2.set_$58_2(false)}var $v_4=this.$B_1.get_$2_0();$v_4.style.visibility="hidden";$v_4.style.position="absolute";$v_4.style.top="0px";$v_4.style.left="0px";$v_4.style.zIndex=1001;document.body.appendChild($v_4);if((CUI.Utility.$3L()||CUI.Utility.get_$68())&&this.$0_0._textDirection===1){var $v_5=$v_4.offsetWidth+this.$B_1.get_additionalWidth();$v_5=$v_5>=18?$v_5-18:0;var $v_6=$v_5+"px",$v_7=this.$B_1.$6_0,$$enum_A=$v_7.getEnumerator();while($$enum_A.moveNext()){var $v_8=$$enum_A.get_current(),$v_9=$v_8.$6_0,$$enum_D=$v_9.getEnumerator();while($$enum_D.moveNext()){var $v_A=$$enum_D.get_current();if(CUI.MenuItem.isInstanceOfType($v_A))$v_A.get_$2_0().style.width=$v_6}}}this.positionMenu($v_4,$v_0.get_$2_0());Sys.Browser.agent===Sys.Browser.InternetExplorer&&this.addAndPositionBackFrame();this.$0_0.$Bo_1(this,this.$2I_1);this.$0_0.$Bg_1(this);$v_4.style.visibility="visible";this.$j_1=true;this.$B_1.$73_1=true;this.$DN_1();$v_1&&$v_2.set_$58_2($v_3);return true},$DN_1:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$B_1.$3v_1)&&!CUI.ScriptUtility.isNullOrUndefined(this._selectedControl)){var $v_0=this._selectedControl,$v_1=$v_0.get_displayedComponent();if(CUI.MenuItem.isInstanceOfType($v_1))this.$B_1.$3v_1=$v_1}if(this.$18_1)this.$B_1.$7z_0();else{var $v_2=this.$B_1.$3v_1;if(!CUI.ScriptUtility.isNullOrUndefined($v_2)&&!CUI.BrowserUtility.$Dt()){var $v_3=$v_2.$N_1;if(CUI.Controls.ToggleButton.isInstanceOfType($v_3)&&CUI.ISelectableControl.isInstanceOfType($v_3)){var $v_4=$v_3;!this.$B_1.$80_0($v_4.getMenuItemId())&&this.$B_1.$7z_0()}}}},addAndPositionBackFrame:function(){this.$5i_1!==-1&&window.clearTimeout(this.$5i_1);this.$5i_1=window.setTimeout(this.$$d_addAndPositionBackFrameInternal,50)},addAndPositionBackFrameInternal:function(){CUI.PMetrics.perfMark(7188);document.body.appendChild(this.get_$9Z_1());CUI.Utility.$Aw(this.get_$9Z_1(),this.$B_1.get_$2_0());CUI.PMetrics.perfMark(7189)},onModalBodyClick:function($p0){$p0.stopPropagation();this.$18_1=false;this.$0_0.$2l_1(this)},onModalBodyMouseOver:function($p0){},onModalBodyMouseOut:function($p0){},onModalContextMenu:function($p0){$p0.stopPropagation();!CUI.BrowserUtility.$AZ()&&$p0.preventDefault();this.$18_1=false;this.$0_0.$2l_1(this)},onModalKeyPress:function($p0){if($p0)if($p0.rawEvent){if($p0.rawEvent.keyCode===27){$p0.stopPropagation();this.$18_1=true;this.$0_0.$2l_1(this)}if($p0.rawEvent.keyCode===9)if($p0.shiftKey){!this.$B_1.$61_0()&&this.$B_1.$81_0();$p0.preventDefault()}else{!this.$B_1.$60_0()&&this.$B_1.$7z_0();$p0.preventDefault()}if($p0.rawEvent.keyCode===40){!this.$B_1.$60_0()&&this.$B_1.$7z_0();$p0.preventDefault();$p0.stopPropagation()}if($p0.rawEvent.keyCode===38){!this.$B_1.$61_0()&&this.$B_1.$81_0();$p0.preventDefault();$p0.stopPropagation()}if(CUI.Controls.FlyoutAnchor.isInstanceOfType(this)){if($p0.rawEvent.keyCode===39&&!this.$0_0._textDirection||$p0.rawEvent.keyCode===37&&this.$0_0._textDirection===1){!this.$B_1.$60_0()&&this.$B_1.$7z_0();$p0.preventDefault();$p0.stopPropagation()}if($p0.rawEvent.keyCode===37&&!this.$0_0._textDirection||$p0.rawEvent.keyCode===39&&this.$0_0._textDirection===1){!this.$B_1.$61_0()&&this.$B_1.$81_0();$p0.preventDefault();$p0.stopPropagation()}}}},positionMenu:function($p0,$p1){this.$0_0.$Ej_1($p0,$p1)},getAllElementDimensions:function($p0,$p1){return this.$0_0.$82_1($p0,$p1)},$41_1:function(){if(!this.$j_1)return;$clearHandlers(this.$B_1.get_$2_0());CUI.UIUtility.removeNode(this.$B_1.get_$2_0());!CUI.ScriptUtility.isNullOrUndefined(this.$3Z_1)&&CUI.UIUtility.removeNode(this.$3Z_1);this.$B_1.onMenuClosed();var $v_0=this.$B_1.$M_0;$v_0.$4f_0=true;$v_0.removeChild(this.$B_1.$4_0);$v_0.$4f_0=false;this.$j_1=false;this.$B_1.$73_1=false;this.$0_0.$Cn_1(this);!CUI.ScriptUtility.isNullOrUndefined(this.$2I_1)&&this.$18_1&&this.$2I_1.focus();this.$2I_1=null;this.$18_1=false;this.onLaunchedMenuClosed()},onMenuClosed:function(){},onLaunchedMenuClosed:function(){this.$B_1.$15_0()},ensureCorrectChildType:function($p0){if(!CUI.Menu.isInstanceOfType($p0)&&!CUI.ToolTip.isInstanceOfType($p0))throw Error.create("This Component can only have Menu and ToolTip Components as children.")},$2p_0:function($p0){if(this.$j_1&&$p0.$I_1!==4&&$p0.$I_1!==5&&$p0.$I_1!==6&&$p0.$I_1!==7&&$p0.$I_1!==8&&$p0.$I_1!==9&&$p0.$I_1!==10){if(!CUI.ScriptUtility.isNullOrUndefined($p0.get_sourceControl())){var $v_0=$p0.get_sourceControl().get_displayedComponent();this.$B_1.$3v_1=$v_0}this.$0_0.$2l_1(this)}return true},$9D_1:false,$4o_1:null,pollForDynamicMenu:function($p0,$p1){if(this.$9D_1&&CUI.Utility.$x(this.get_$1_1().PopulateOnlyOnce))return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().PopulateQueryCommand))return;var $v_0={},$v_1;if(CUI.Utility.$x(this.get_$1_1().CacheMenuVersions)){$v_1={};var $$dict_4=this.$3T_1;for(var $$key_5 in $$dict_4){var $v_3={key:$$key_5,value:$$dict_4[$$key_5]};$v_1[$v_3.key]=true}$v_0.CachedVersions=$v_1}var $v_2=this.$0_0.$54_1(this.get_$1_1().PopulateQueryCommand,this.get_$1_1().PopulateQueryCommand,$v_0);if($v_2){var $v_4=null,$v_5=null;if(!CUI.ScriptUtility.isNullOrUndefined($v_0.PopulationJSON))$v_5=$v_0.PopulationJSON;else if(!CUI.ScriptUtility.isNullOrUndefined($v_0.PopulationXML))$v_5=CUI.Builder.$CP($v_0.PopulationXML);if(!CUI.ScriptUtility.isNullOrUndefined($v_5)){$v_4=this.$0_0.get_$19_1().$3F_0($v_5,new CUI.BuildContext,false);if(!CUI.ScriptUtility.isNullOrUndefined($v_4)){this.$9D_1=true;if(CUI.Utility.$x(this.get_$1_1().CacheMenuVersions)&&!CUI.ScriptUtility.isNullOrUndefined($v_0.PopulationVersion))this.get_cachedMenuVersions()[$v_0.PopulationVersion]=$v_4}}else if(!CUI.ScriptUtility.isNullOrUndefined($v_0.PopulationVersion))$v_4=this.get_cachedMenuVersions()[$v_0.PopulationVersion];else if($p0&&-1!==$v_0.PollAgainInterval){this.$4o_1=$p1;window.setTimeout(this.$$d_$Ea_1,$v_0.PollAgainInterval);this.$B_1=null}if(!CUI.ScriptUtility.isNullOrUndefined($v_4)){this.$B_1=$v_4;this.onDynamicMenuPopulated()}}},$Ea_1:function(){this.launchMenu(this.$2I_1,this.$4o_1)},onDynamicMenuPopulated:function(){},get_$1_1:function(){return this.$5_0},$3T_1:null,get_cachedMenuVersions:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$3T_1))this.$3T_1={};return this.$3T_1},dispose:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$B_1)&&this.$B_1.dispose();if(!CUI.ScriptUtility.isNullOrUndefined(this.$3T_1)){var $$dict_0=this.$3T_1;for(var $$key_1 in $$dict_0){var $v_0={key:$$key_1,value:$$dict_0[$$key_1]},$v_1=$v_0.value;$v_1.dispose()}}this._selectedControl=null;this.$B_1=null;this.$3Z_1=null;this.$2I_1=null;CUI.Control.prototype.dispose.call(this)}};CUI.MenuSection=function($p0,$p1,$p2,$p3,$p4,$p5,$p6){this.$7_1=-1;CUI.MenuSection.initializeBase(this,[$p0,$p1,$p2,$p3]);this.$9I_1=$p4;this.$74_1=$p5;this.$6Y_1=$p6};CUI.MenuSection.prototype={$9I_1:false,$74_1:null,$6Y_1:null,$3h_1:null,$D_1:null,$2J_1:null,$1i_0:function(){this.ensureDOMElementAndEmpty();this.$3h_1=CUI.Utility.$3("div");this.$3h_1.className="ms-cui-menusection";this.get_$2_0().appendChild(this.$3h_1);if(!CUI.ScriptUtility.isNullOrUndefined(this.get_title())){this.$D_1=CUI.Utility.$3("div");CUI.UIUtility.setInnerText(this.$D_1,this.get_title());this.$D_1.className="ms-cui-menusection-title";this.$3h_1.appendChild(this.$D_1)}this.$2J_1=CUI.Utility.$3("ul");this.$2J_1.className="ms-cui-menusection-items";var $v_0;if(this.$6Y_1==="Menu32"){if(!this.$0_0._textDirection)$v_0="ms-cui-menusection-items32";else $v_0="ms-cui-menusection-items32rtl";var $v_1=this.$M_0;CUI.Menu.isInstanceOfType($v_1)&&CUI.Utility.ensureCSSClassOnElement($v_1.get_$2_0(),"ms-cui-menu32")}else if(this.$6Y_1==="Menu16")if(!this.$0_0._textDirection)$v_0="ms-cui-menusection-items16";else $v_0="ms-cui-menusection-items16rtl";else $v_0="";$v_0!==""&&CUI.Utility.ensureCSSClassOnElement(this.$2J_1,$v_0);if(this.$9I_1){this.$2J_1.style.overflowY="auto";this.$2J_1.style.position="relative"}if(!CUI.ScriptUtility.isNullOrEmptyString(this.$74_1))this.$2J_1.style.maxHeight=this.$74_1;this.$3h_1.appendChild(this.$2J_1);this.appendChildrenToElement(this.$2J_1)},get_domElementTagName:function(){return "div"},appendChildrenToElement:function($p0){var $v_0,$$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();$v_0=CUI.Utility.$3("li");$v_0.className="ms-cui-menusection-items";$v_1.$1g_0();$v_0.appendChild($v_1.get_$2_0());$p0.appendChild($v_0);$v_1.$2U_0()}},$15_0:function(){if(!this.$6_0.$O_0)return;this.$7_1=0;var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();$v_0.$15_0()}},$7z_0:function(){if(!this.$6_0.$O_0)return;this.$7_1>-1&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=0;this.$6_0.get_item(this.$7_1).$7z_0()},$81_0:function(){var $v_0=this.$6_0.$O_0;if(!$v_0)return;this.$7_1>-1&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_0-1;this.$6_0.get_item(this.$7_1).$81_0()},$80_0:function($p0){if(!this.$6_0.$O_0)return false;var $v_0=0,$$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.$80_0($p0)){this.$7_1>-1&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_0;return true}$v_0++}return false},$61_0:function(){var $v_0=this.$6_0.$O_0;if(this.$7_1===-1)this.$7_1=$v_0-1;var $v_1=this.$7_1,$v_2=this.$6_0.getEnumeratorAtPos($v_1);while($v_2.movePrevious()){if($v_2.get_current().$61_0()){if($v_1!==this.$7_1){this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_1}return true}$v_1--}$v_0>0&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=-1;return false},$60_0:function(){if(this.$7_1===-1)this.$7_1=0;var $v_0=this.$6_0.getEnumeratorAtPos(this.$7_1),$v_1=this.$7_1;while($v_0.moveNext()){if($v_0.get_current().$60_0()){if($v_1!==this.$7_1){!CUI.ScriptUtility.isNullOrUndefined(this.$6_0.get_item(this.$7_1))&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=$v_1}return true}$v_1++}this.$6_0.$O_0>0&&this.$6_0.get_item(this.$7_1).$15_0();this.$7_1=-1;return false},ensureCorrectChildType:function($p0){if(!CUI.MenuItem.isInstanceOfType($p0)&&!CUI.Gallery.isInstanceOfType($p0)&&!CUI.GroupPopup.isInstanceOfType($p0))throw Error.create("MenuSections can only have children of type MenuItem, Gallery or GroupPopup.")},$BM_1:function($p0){this.$1T_0=$p0;CUI.UIUtility.setInnerText(this.$D_1,$p0)},dispose:function(){CUI.Component.prototype.dispose.call(this);this.$2J_1=null;this.$D_1=null;this.$3h_1=null}};CUI.QAT=function($p0,$p1){CUI.QAT.initializeBase(this,[$p0,$p1])};CUI.QAT.prototype={refresh:function(){this.$1i_0();CUI.Root.prototype.refresh.call(this)},$1i_0:function(){CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&this.$1g_0();this.set_$2_0(CUI.Utility.removeChildNodes(this.get_$2_0()));this.appendChildrenToElement(this.get_$2_0());this.$h_0=false},ensureCorrectChildType:function(child){if(!CUI.ControlComponent.isInstanceOfType(child))throw Error.create("Only children of type ControlComponent can be added to a QAT")},get_cssClass:function(){return "ms-cui-QAT "+CUI.Root.prototype.get_cssClass.call(this)},get_rootType:function(){return "QAT"},get_visibleInDOM:function(){return true},get_$Es_2:function(){return this.get_$19_1()},set_$Es_2:function($p0){this.set_$19_1($p0);return $p0}};CUI.QATBuildContext=function(){CUI.QATBuildContext.initializeBase(this)};CUI.QATBuildContext.prototype={QAT:null,qatId:null};CUI.QATBuildOptions=function(){CUI.QATBuildOptions.initializeBase(this)};CUI.QATBuilder=function(options,elmPlaceholder,rootBuildClient){this.$$d_$ER_1=Function.createDelegate(this,this.$ER_1);CUI.QATBuilder.initializeBase(this,[options,elmPlaceholder,rootBuildClient]);if(CUI.ScriptUtility.isNullOrUndefined(elmPlaceholder))throw Error.create("QAT placeholder DOM element is null or undefined.")};CUI.QATBuilder.prototype={get_QAT:function(){return this.$0_0},set_QAT:function(value){this.$0_0=value;return value},buildQAT:function(qatId){if(this.$2f_0)return false;if(this.isIdTrimmed(qatId))return true;var $v_0=new CUI.QATBuildContext;$v_0.qatId=qatId;this.$2f_0=true;var $v_1=new CUI.DataQuery;$v_1.id=$v_0.qatId;$v_1.queryType=5;$v_1.handler=this.$$d_$ER_1;$v_1.data=$v_0;this.$v_0.runQuery($v_1);return true},$ER_1:function($p0){var $v_0=$p0.contextData;$p0.queryData=this.applyDataExtensions($p0.queryData);this.set_QAT(this.$C5_1(CUI.DataNodeWrapper.getFirstChildNodeWithName($p0.queryData,"QAT"),$v_0));this.get_QAT().set_$Es_2(this);this.$1R_0.onComponentCreated(this.get_QAT(),this.get_QAT().$4_0);if(this.get_$Et_1().attachToDOM)this.get_QAT().$3z_0(true);else{this.get_QAT().$1i_0();this._elmPlaceholder.appendChild(this.get_QAT().get_$2_0());CUI.Utility.ensureCSSClassOnElement(this._elmPlaceholder,"loaded")}this.$8N_0(this.get_QAT());this.$1R_0.onComponentBuilt(this.get_QAT(),this.get_QAT().$4_0)},$C5_1:function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p0))throw Error.create("No QAT element was present in the data");var $v_0=new CUI.DataNodeWrapper($p0);this.set_QAT(new CUI.QAT($v_0.get_attributes()["Id"],$v_0.get_attributes()));for(var $v_1=CUI.DataNodeWrapper.getNodeChildren(CUI.DataNodeWrapper.getFirstChildNodeWithName($v_0.$d_0,"Controls")),$v_2=0;$v_2<$v_1.length;$v_2++)if(!this.isNodeTrimmed($v_1[$v_2])){var $v_3=this.$1f_0($v_1[$v_2],$p1);this.get_QAT().addChild($v_3.createComponentForDisplayMode("Small"))}return this.get_QAT()},get_$Et_1:function(){return this.$u_0}};CUI.RibbonPeripheralSection=function(){};CUI.ContextualGroup=function($p0,$p1,$p2,$p3){this.$4_0=$p0;this.$1T_0=$p1;this.$3V_0=$p2;this.$z_0=$p3};CUI.ContextualGroup.$62=function($p0){switch($p0){case 1:return "db";case 2:return "lb";case 3:return "tl";case 4:return "or";case 5:return "gr";case 6:return "mg";case 7:return "yl";case 8:return "pp";default:return ""}};CUI.ContextualGroup.prototype={$4_0:null,$1T_0:null,$3V_0:0,$z_0:null,$2j_0:0,get_id:function(){return this.$4_0},get_count:function(){return this.$2j_0},get_title:function(){return this.$1T_0},get_color:function(){return this.$3V_0},get_command:function(){return this.$z_0},$1Z_0:null,$D_0:null,$22_0:null,get_$2_0:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$1Z_0)){this.$1Z_0=CUI.Utility.$3("li");if(!CUI.ScriptUtility.isNullOrUndefined(this.$4_0))this.$1Z_0.id=this.$4_0;this.$1Z_0.className="ms-cui-cg";var $v_0=CUI.ContextualGroup.$62(this.$3V_0);$v_0!==""&&CUI.Utility.ensureCSSClassOnElement(this.$1Z_0,"ms-cui-cg-"+$v_0);var $v_1=CUI.Utility.$3("div");$v_1.className="ms-cui-cg-i";$v_1.title=this.$1T_0;this.$1Z_0.appendChild($v_1);this.$D_0=CUI.Utility.$3("div");this.$D_0.className="ms-cui-cg-t";$v_1.appendChild(this.$D_0);var $v_2=CUI.Utility.$3("span");$v_2.className="ms-cui-cg-t-i";CUI.UIUtility.setInnerText($v_2,this.$1T_0);this.$D_0.appendChild($v_2);this.$22_0=CUI.Utility.$3("ul");this.$22_0.className="ms-cui-ct-ul";this.$1Z_0.appendChild(this.$22_0);this.$2j_0=0}return this.$1Z_0},$Bn_0:function(){var $v_0=$get(this.$4_0);if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){this.$1Z_0=$v_0;this.$D_0=this.$1Z_0.childNodes[0].childNodes[0];this.$22_0=this.$1Z_0.childNodes[1]}},$Bh_0:function($p0){this.$22_0.appendChild($p0);this.$2j_0++;if(this.$2j_0===1)CUI.Utility.ensureCSSClassOnElement(this.$22_0,"ms-cui-oneCtxTab");else this.$2j_0===2&&CUI.Utility.removeCSSClassFromElement(this.$22_0,"ms-cui-oneCtxTab")},$Cv_0:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$22_0)&&CUI.Utility.removeChildNodesSlow(this.$22_0);this.$2j_0=0},dispose:function(){this.$1Z_0=null;this.$D_0=null;this.$22_0=null;this.$2j_0=0}};CUI.DeclarativeTemplate=function($p0){this.$$d_$Cf_1=Function.createDelegate(this,this.$Cf_1);CUI.DeclarativeTemplate.initializeBase(this);this.$v_1=new CUI.DataNodeWrapper($p0)};CUI.DeclarativeTemplate.prototype={$v_1:null,createGroup:function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7){var $v_0=new CUI.DeclarativeTemplateBuildContext;$v_0.ribbon=$p0;$v_0.controls=$p6;$v_0.parameters=$p7;for(var $v_1=$p0.$CY_2($p1,$p2,$p3,$p4,$p5),$v_2=0;$v_2<this.$v_1.get_children().length;$v_2++){var $v_3=this.$Cb_1(this.$v_1.get_children()[$v_2],$v_1,$v_0);!CUI.ScriptUtility.isNullOrUndefined($v_3)&&$v_1.addChild($v_3)}return $v_1},$Cb_1:function($p0,$p1,$p2){var $v_0=$p0.attrs.Title;if($v_0==="Popup"){var $v_2=$p0.attrs.LayoutTitle;$p1.set_popupLayoutTitle($v_2);return null}var $v_1=$p2.ribbon.$9n_2($p1.$4_0+"-"+$v_0,$v_0);$v_1.$8Z_0(this.$$d_$Cf_1,$p0,$p2);return $v_1},$Cf_1:function($p0,$p1,$p2){var $v_0=$p0,$v_1=$p2;this.$DI_1($p1,$v_0,$v_1);$v_0.$8L_0(true);return $v_0},$DI_1:function($p0,$p1,$p2){for(var $v_0=$p0.children,$v_1=0,$v_2=0;$v_2<$v_0.length;$v_2++){var $v_3=$v_0[$v_2].name;if($v_3==="Section"){var $v_4=this.$Cc_1($v_0[$v_2],$p2,$p1,$v_1++);$p1.addChild($v_4)}else $v_1=this.$8B_1($v_0[$v_2],$p2,$p1,$v_1)}},$Cc_1:function($p0,$p1,$p2,$p3){var $v_0,$v_1=$p0.attrs.Type,$v_2=$p0.attrs.Alignment;switch($v_1){case "OneRow":$v_0=2;break;case "TwoRow":$v_0=3;break;case "ThreeRow":$v_0=4;break;case "Divider":$v_0=1;break;default:throw Error.create('Invalid Section attribute "Type" found in XML: '+$v_1)}var $v_3=1;if($v_2==="Middle")$v_3=2;var $v_4=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3,$v_0,$v_3);if($v_0!==1){this.$8D_1($v_4.getRow(1),$p0.children[0],$p1);($v_4.$I_2===3||$v_4.$I_2===4)&&this.$8D_1($v_4.getRow(2),$p0.children[1],$p1);$v_4.$I_2===4&&this.$8D_1($v_4.getRow(3),$p0.children[2],$p1)}return $v_4},$8D_1:function($p0,$p1,$p2){for(var $v_0=$p1.children,$v_1=0;$v_1<$v_0.length;$v_1++){var $v_2=$v_0[$v_1].name,$v_3=null;if($v_2==="ControlRef")$v_3=this.$9j_1($v_0[$v_1],$p2);else if($v_2==="OverflowArea")this.$8B_1($v_0[$v_1],$p2,$p0,$v_1);else $v_3=this.$Cd_1($v_0[$v_1],$p2,$p0,$v_1);!CUI.ScriptUtility.isNullOrUndefined($v_3)&&$p0.addChild($v_3)}},$Cd_1:function($p0,$p1,$p2,$p3){for(var $v_0=$p0.children,$v_1=$p1.ribbon.$9q_2($p2.$4_0+"-"+$p3),$v_2=0;$v_2<$v_0.length;$v_2++){var $v_3=CUI.DataNodeWrapper.getNodeName($v_0[$v_2]);if($v_3==="ControlRef"){var $v_4=this.$9j_1($v_0[$v_2],$p1);!CUI.ScriptUtility.isNullOrUndefined($v_4)&&$v_1.addChild($v_4)}else this.$8B_1($v_0[$v_2],$p1,$v_1,$v_2)}if(!$v_1.$6_0.$O_0)return null;return $v_1},$9j_1:function($p0,$p1){var $v_0=$p0.attrs,$v_1=$v_0["TemplateAlias"],$v_2=$v_0["DisplayMode"],$v_3=$p1.controls[$v_1],$v_4=null;if(!CUI.ScriptUtility.isNullOrUndefined($v_3)&&CUI.Control.isInstanceOfType($v_3))$v_4=$v_3.createComponentForDisplayMode($v_2);return $v_4},$8B_1:function($p0,$p1,$p2,$p3){var $v_0=CUI.DataNodeWrapper.getNodeAttributes($p0),$v_1=$v_0["TemplateAlias"],$v_2=CUI.DataNodeWrapper.getNodeName($p0),$v_3=$p1.controls[$v_1];if(CUI.ScriptUtility.isNullOrUndefined($v_3))return $p3;var $v_4=false,$v_5=false,$v_6=2;if($v_2==="OverflowSection"){$v_4=CUI.Utility.$x($v_0["DividerBefore"]);$v_5=CUI.Utility.$x($v_0["DividerAfter"]);if($v_4){var $v_9=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,1,1);$p2.addChild($v_9)}var $v_8=$v_0["Type"];switch($v_8){case "OneRow":$v_6=2;break;case "TwoRow":$v_6=3;break;case "ThreeRow":$v_6=4;break;default:throw Error.create('Invalid Section attribute "Type" found in XML: '+$v_8)}}var $v_7=$v_0["DisplayMode"];if(Array.isInstanceOfType($v_3))for(var $v_A=$v_3,$v_B=null,$v_C=0;$v_C<$v_A.length;$v_C++){var $v_D=$v_A[$v_C];if($v_2==="OverflowSection")if($v_6===2){if(CUI.ScriptUtility.isNullOrUndefined($v_B)){$v_B=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,2,1);$p2.addChild($v_B)}$v_B.getRow(1).addChild($v_D.createComponentForDisplayMode($v_7))}else if($v_6===4){if(CUI.ScriptUtility.isNullOrUndefined($v_B)){$v_B=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,4,1);$p2.addChild($v_B)}$v_B.getRow($v_C%3+1).addChild($v_D.createComponentForDisplayMode($v_7));if($v_C%3===2)$v_B=null}else{if(CUI.ScriptUtility.isNullOrUndefined($v_B)){$v_B=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,3,1);$p2.addChild($v_B)}$v_B.getRow($v_C%2+1).addChild($v_D.createComponentForDisplayMode($v_7));if($v_C%2===1)$v_B=null}else $p2.addChild($v_D.createComponentForDisplayMode($v_7))}else{var $v_E=$v_3;if($v_2==="OverflowSection"){var $v_F;if($v_6===2){$v_F=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,2,1);$v_F.getRow(1).addChild($v_E.createComponentForDisplayMode($v_7))}else if($v_6===4){$v_F=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,4,1);$v_F.getRow(1).addChild($v_E.createComponentForDisplayMode($v_7))}else{$v_F=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,3,1);$v_F.getRow(1).addChild($v_E.createComponentForDisplayMode($v_7))}$p2.addChild($v_F)}else $p2.addChild($v_E.createComponentForDisplayMode($v_7))}if($v_5){var $v_G=$p1.ribbon.$29_2($p2.$4_0+"-"+$p3++,1,1);$p2.addChild($v_G)}return $p3}};CUI.Group=function($p0,$p1,$p2,$p3,$p4,$p5){CUI.Group.initializeBase(this,[$p0,$p1,$p2,$p3]);this.$z_2=$p4;this.$5_2=$p5};CUI.Group.prototype={$W_2:null,$D_2:null,$2z_2:null,$V_2:null,$5_2:null,dispose:function(){CUI.Component.prototype.dispose.call(this);this.$W_2=null;this.$D_2=null;this.$2z_2=null;this.$5_2=null},$1i_0:function(){this.ensureDOMElementAndEmpty();if(CUI.ScriptUtility.isNullOrUndefined(this.$D_2)){this.$D_2=CUI.Utility.$3("span");this.$D_2.className="ms-cui-groupTitle"}else this.$D_2=CUI.Utility.removeChildNodes(this.$D_2);if(CUI.ScriptUtility.isNullOrUndefined(this.$W_2)){this.$W_2=CUI.Utility.$3("span");this.$W_2.className="ms-cui-groupBody"}else this.$W_2=CUI.Utility.removeChildNodes(this.$W_2);if(CUI.ScriptUtility.isNullOrUndefined(this.$2z_2)){this.$2z_2=CUI.Utility.$3("span");this.$2z_2.className="ms-cui-groupSeparator"}var $v_0=this.get_title();!CUI.ScriptUtility.isNullOrUndefined($v_0)&&CUI.UIUtility.setInnerText(this.$D_2,$v_0);this.$D_2.title=this.get_title();if(!CUI.ScriptUtility.isNullOrUndefined(this.$V_2)&&CUI.GroupPopupLayout.isInstanceOfType(this.$V_2)){this.$V_2.$1g_0();this.get_$2_0().appendChild(this.$V_2.get_$2_0());this.get_$2_0().appendChild(this.$2z_2);this.$V_2.$2U_0()}else{var $v_1=CUI.Utility.$3("span");$v_1.className="ms-cui-groupContainer";$v_1.appendChild(this.$W_2);$v_1.appendChild(this.$D_2);this.get_$2_0().appendChild($v_1);this.get_$2_0().appendChild(this.$2z_2);if(!CUI.ScriptUtility.isNullOrUndefined(this.$V_2)){this.$V_2.$1g_0();this.$W_2.appendChild(this.$V_2.get_$2_0());this.$V_2.$2U_0()}}CUI.Component.prototype.$1i_0.call(this)},$5y_0:function(){CUI.Component.prototype.$5y_0.call(this);if(!CUI.ScriptUtility.isNullOrUndefined(this.$V_2)&&!CUI.GroupPopupLayout.isInstanceOfType(this.$V_2)){var $v_0=this.get_$2_0().childNodes[0];this.$2z_2=this.get_$2_0().childNodes[1];this.$W_2=$v_0.childNodes[0];this.$D_2=$v_0.childNodes[1]}},$3z_0:function($p0){this.$5y_0();this.$R_0();this.$h_0=false;$p0&&!CUI.ScriptUtility.isNullOrUndefined(this.$V_2)&&this.$V_2.$3z_0(true)},$1g_0:function(){var $v_0=this.get_$2_0();CUI.Component.prototype.$1g_0.call(this)},get_cssClass:function(){return "ms-cui-group"},get_domElementTagName:function(){return "li"},unselectLayout:function(){this.selectLayout(null,null)},selectLayout:function($p0,$p1){var $v_0=null;if($p0!=="Popup")$v_0=CUI.ScriptUtility.isNullOrUndefined($p0)?null:this.getChildByTitle($p0);else{!CUI.ScriptUtility.isNullOrUndefined($p1)&&this.set_popupLayoutTitle($p1);this.$Cs_2();$v_0=this.$4u_2}if($v_0===this.$V_2||CUI.ScriptUtility.isNullOrUndefined($v_0)&&CUI.ScriptUtility.isNullOrUndefined(this.$V_2))return;this.$V_2=!CUI.ScriptUtility.isNullOrUndefined($v_0)?$v_0:null;if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){$v_0.$8a_0(true);$p0==="Popup"&&this.$5k_2.$8a_0(true)}this.$y_0()},get_selectedLayout:function(){return this.$V_2},ensureCorrectChildType:function($p0){if(!CUI.Layout.isInstanceOfType($p0)&&!CUI.GroupPopupLayout.isInstanceOfType($p0))throw Error.create("Only children of type Layout can be added to Groups");if(!CUI.ScriptUtility.isNullOrUndefined(this.getChildByTitle($p0.get_title())))throw Error.create("A Layout with title "+$p0.get_title()+" already exists in this Group.")},get_$8O_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$V_2)||CUI.ScriptUtility.isNullOrUndefined(this.$V_2.get_$2_0()))return false;return this.get_$2_0().offsetHeight<this.$V_2.get_$2_0().offsetHeight||this.get_$2_0().offsetWidth<this.$V_2.get_$2_0().offsetWidth},$z_2:null,get_command:function(){return this.$z_2},$7K_2:null,get_popupLayoutTitle:function(){return this.$7K_2},set_popupLayoutTitle:function($p0){if($p0==="Popup")throw Error.create("PopupLayoutTitle cannot be set to 'Popup'");var $v_0=CUI.ScriptUtility.isNullOrUndefined($p0)?null:this.getChildByTitle($p0);if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("This Group does not have a Layout with Title: "+$p0);if(this.$7K_2===$p0)return $p0;this.$7K_2=$p0;!CUI.ScriptUtility.isNullOrUndefined(this.$4t_2)&&this.$4t_2.set_layoutTitle($p0);return $p0},$4u_2:null,$3t_2:null,$4t_2:null,$5k_2:null,$7L_2:null,$Cs_2:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.$4u_2))return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_popupLayoutTitle()))throw Error.create("No PopupLayoutTitle has been set.");this.$4u_2=this.get_ribbon().$Ca_2(this.$4_0+"-Popup",this);this.$5k_2=this.get_ribbon().$9o_1(this.$4_0+"-popupMenu",null,null,null);this.$7L_2=this.get_ribbon().$9p_1(this.$4_0+"-popupMenuSection",null,null,false,null,null);var $v_0={};$v_0.LabelText=this.get_title();var $v_1=this.get_ribbon().get_ribbonProperties();if(!CUI.ScriptUtility.isNullOrUndefined(this.$5_2.Image32by32Popup)){$v_0.Image32by32=this.$5_2.Image32by32Popup;$v_0.Image32by32Class=this.$5_2.Image32by32PopupClass;$v_0.Image32by32Top=this.$5_2.Image32by32PopupTop;$v_0.Image32by32Left=this.$5_2.Image32by32PopupLeft}else{$v_0.Image32by32=$v_1.Image32by32GroupPopupDefault;$v_0.Image32by32Class=$v_1.Image32by32GroupPopupDefaultClass;$v_0.Image32by32Left=$v_1.Image32by32GroupPopupDefaultLeft;$v_0.Image32by32Top=$v_1.Image32by32GroupPopupDefaultTop}$v_0.Command=this.$z_2;this.$3t_2=new CUI.Controls.FlyoutAnchor(this.get_ribbon(),this.$4_0+"-PopupAnchor",$v_0,this.$5k_2);this.$3t_2.$6o_2=true;this.$3t_2.set_enabled(this.get_enabled());this.$4t_2=this.get_ribbon().$CZ_2(this.$4_0+"-popupMenuItem",this);this.$4u_2.addChild(this.$3t_2.createComponentForDisplayMode("Large"));this.$5k_2.addChild(this.$7L_2);this.$7L_2.addChild(this.$4t_2);this.$4t_2.set_layoutTitle(this.get_popupLayoutTitle());this.addChild(this.$4u_2)},$49_0:function(){this.set_enabled(CUI.ScriptUtility.isNullOrUndefined(this.$z_2)?true:this.get_ribbon().$54_1(this.$z_2,null,null));if(!this.get_enabled()||CUI.ScriptUtility.isNullOrUndefined(this.$V_2))return;this.$V_2.$49_0()},onEnabledChanged:function($p0){CUI.Component.prototype.onEnabledChanged.call(this,$p0);!CUI.ScriptUtility.isNullOrUndefined(this.$3t_2)&&this.$3t_2.set_enabled($p0)},$8e_0:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.$V_2)&&CUI.GroupPopupLayout.isInstanceOfType(this.$V_2)){this.$V_2.get_$2_0().getElementsByTagName("A")[0].focus();return true}return CUI.Component.prototype.$8e_0.call(this)}};CUI.GroupPopup=function($p0,$p1,$p2){this.$$d_$E6_1=Function.createDelegate(this,this.$E6_1);CUI.GroupPopup.initializeBase(this,[$p0,$p1,"",""]);this.$4d_1=$p2};CUI.GroupPopup.prototype={$4d_1:null,dispose:function(){this.$W_1=null;this.$2x_1=null;this.$D_1=null;CUI.Component.prototype.dispose.call(this)},$D_1:null,$W_1:null,$1i_0:function(){this.ensureDOMElementAndEmpty();if(CUI.ScriptUtility.isNullOrUndefined(this.$D_1)){this.$D_1=CUI.Utility.$3("div");this.$D_1.className="ms-cui-groupTitle"}else this.$D_1=CUI.Utility.removeChildNodes(this.$D_1);if(CUI.ScriptUtility.isNullOrUndefined(this.$W_1)){this.$W_1=CUI.Utility.$3("div");this.$W_1.className="ms-cui-groupBody"}else this.$W_1=CUI.Utility.removeChildNodes(this.$W_1);CUI.UIUtility.setInnerText(this.$D_1,this.$4d_1.get_title());this.get_$2_0().appendChild(this.$W_1);this.get_$2_0().appendChild(this.$D_1);var $v_0=this.$4d_1.getChildByTitle(this.$4k_1);if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("Cannot find Layout with title: "+this.$4k_1+" for this GroupPopup to use from the Group with id: "+this.$4d_1.$4_0);var $v_1=$v_0.$4y_2(true);this.removeChildren();this.addChild($v_1);this.appendChildrenToElement(this.$W_1);CUI.Component.prototype.$1i_0.call(this)},$4k_1:null,get_layoutTitle:function(){return this.$4k_1},set_layoutTitle:function($p0){if(this.$4k_1===$p0)return $p0;this.$4k_1=$p0;this.$y_0();return $p0},get_cssClass:function(){return "ms-cui-groupPopup"},$4J_1:null,$2p_0:function($p0){if($p0.$I_1===4){var $v_0=$p0.get_sourceControl();if(this.$4J_1)return CUI.Component.prototype.$2p_0.call(this,$p0);this.$4J_1=$v_0;this.$FG_1()}else if($p0.$I_1===10){this.$Di_1();this.$4J_1=null}return CUI.Component.prototype.$2p_0.call(this,$p0)},$2x_1:null,$5U_1:false,$FG_1:function(){if(this.$5U_1)return;if(!this.$2x_1){this.$2x_1=CUI.Utility.$9l();$addHandler(this.$2x_1,"click",this.$$d_$E6_1);this.get_$2_0().appendChild(this.$2x_1)}this.$2x_1.style.display="";this.$5U_1=true},$Di_1:function(){if(!this.$5U_1)return;this.$2x_1.style.display="none";this.$5U_1=false},$E6_1:function($p0){this.$4J_1&&this.$4J_1.$41_1()}};CUI.GroupPopupLayout=function($p0,$p1,$p2){CUI.GroupPopupLayout.initializeBase(this,[$p0,$p1,"Popup"]);this.$4d_3=$p2};CUI.GroupPopupLayout.prototype={$4d_3:null,$1i_0:function(){CUI.Layout.prototype.$1i_0.call(this)},get_cssClass:function(){return null},ensureCorrectChildType:function($p0){if(!CUI.ControlComponent.isInstanceOfType($p0))throw Error.create("Only ControlComponents can be added to GroupPopupLayout.");if(this.$6_0.$O_0>0)throw Error.create("GroupPopupLayouts can only have one child")}};CUI.Layout=function($p0,$p1,$p2){CUI.Layout.initializeBase(this,[$p0,$p1,$p2,""])};CUI.Layout.prototype={$1i_0:function(){this.get_needsDelayIniting()&&this.doDelayedInit();this.ensureDOMElementAndEmpty();this.appendChildrenToElement(this.get_$2_0());CUI.Component.prototype.$1i_0.call(this)},$5y_0:function(){this.get_needsDelayIniting()&&this.doDelayedInit();this.set_$2_0($get(this.$M_0.$4_0+"-"+this.get_title()))},ensureCorrectChildType:function($p0){if(!CUI.Section.isInstanceOfType($p0))throw Error.create("Only children of Section can be added to a Layout")},get_cssClass:function(){return "ms-cui-layout"},$4y_2:function($p0){this.get_needsDelayIniting()&&this.doDelayedInit();var $v_0=this.get_ribbon().$9n_2("clonedLayout-"+this.get_ribbon().$2A_1(),this.get_title());if(!$p0)return $v_0;var $$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current(),$v_2=$v_1.$4y_2($p0);$v_0.addChild($v_2)}return $v_0},get_visibleInDOM:function(){if(CUI.Group.isInstanceOfType(this.$M_0)){var $v_0=this.$M_0;return $v_0.$V_2===this}else if(CUI.GroupPopup.isInstanceOfType(this.$M_0))return true;else return false}};CUI.RibbonEventCommandProperties=function(){CUI.RibbonEventCommandProperties.initializeBase(this)};CUI.RibbonEventCommandProperties.prototype={Minimized:false,Maximized:false};CUI.CommandContextSwitchCommandProperties=function(){};CUI.CommandContextSwitchCommandProperties.prototype={OldContextId:null,OldContextCommand:null,NewContextId:null,NewContextCommand:null,ChangedByUser:false};CUI.Ribbon=function($p0,$p1){this.$$d_$EC_2=Function.createDelegate(this,this.$EC_2);this.$$d_$EU_2=Function.createDelegate(this,this.$EU_2);this.$$d_$ED_2=Function.createDelegate(this,this.$ED_2);this.$$d_$Ed_2=Function.createDelegate(this,this.$Ed_2);this.$70_2=new Date(0);this.$7f_2=CUI.Utility.$3I();this.$7e_2=CUI.Utility.$43();CUI.Ribbon.initializeBase(this,[$p0,$p1]);this.$12_2={};this.$96_2=$p1.ShortcutKeyJumpToRibbon_Ctrl+$p1.ShortcutKeyJumpToRibbon_Alt+$p1.ShortcutKeyJumpToRibbon_Shift+$p1.ShortcutKeyJumpToRibbon_AccessKey;this.$95_2=$p1.ShortcutKeyJumpToFirstControl_Ctrl+$p1.ShortcutKeyJumpToFirstControl_Alt+$p1.ShortcutKeyJumpToFirstControl_Shift+$p1.ShortcutKeyJumpToFirstControl_AccessKey;this.$33_2=this.$AL_2()};CUI.Ribbon.prototype={$A_2:null,$35_2:null,$1m_2:null,$b_2:null,$c_2:null,$w_2:null,$8x_2:null,$o_2:null,$2y_2:null,$m_2:null,$2c_2:null,$9C_2:null,$1n_2:null,$1o_2:null,$q_2:null,$r_2:null,$4r_2:false,$2d_2:null,$4g_2:null,$95_2:null,$96_2:null,$4p_2:null,$7g_2:false,$5e_2:null,$5f_2:null,$5d_2:null,$6h_2:false,$79_2:null,get_storedFocus:function(){return this.$2d_2},set_storedFocus:function(value){this.$2d_2=value;return value},$8i_2:function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))return false;else if(!CUI.ScriptUtility.isNullOrUndefined($p0.id)&&$p0.id==="Ribbon")return false;else if($p0.tagName==="BODY")return true;else return this.$8i_2($p0.parentNode)},refresh:function(){this.$1i_0();CUI.Root.prototype.refresh.call(this);this.$3O_2()},$1i_0:function(){CUI.Root.prototype.$1i_0.call(this);this.$1g_0();this.$Da_2();var $v_0=null,$v_1=null,$v_2=null,$v_3=null,$v_4=null;CUI.Utility.removeChildNodesSlow(this.$w_2);var $$dict_5=this.$12_2;for(var $$key_6 in $$dict_5){var $v_B={key:$$key_6,value:$$dict_5[$$key_6]},$v_C=$v_B.value;$v_C.$Cv_0()}var $v_5=0,$v_6=new CUI.List,$$enum_B=this.$6_0.getEnumerator();while($$enum_B.moveNext()){var $v_D=$$enum_B.get_current();if($v_D.get_visible()){$v_6.add($v_D);$v_5++}}var $v_7=0,$v_8=$v_6.$O_0,$v_9=!(CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbonProperties().ATTabPositionText)||CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbonProperties().ATContextualTabText)),$$enum_G=$v_6.getEnumerator();while($$enum_G.moveNext()){var $v_E=$$enum_G.get_current();$v_E.$7u_2();if(CUI.ScriptUtility.isNullOrUndefined($v_1)){$v_1=$v_E;this.$4g_2=$v_1.$4_0}$v_E.$F1_2();if($v_E.$1B_2){if(!$v_3||$v_E.$11_2!==$v_3){if($v_E.$11_2!==$v_3)!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_2.$1B_2&&CUI.Utility.ensureCSSClassOnElement($v_2.$D_2,"ms-cui-ct-last");$v_3=$v_E.$11_2;$v_4=this.$12_2[$v_E.$11_2];CUI.Utility.removeCSSClassFromElement($v_4.get_$2_0(),"ms-cui-cg-s");this.$8Y_2(0);this.$w_2.appendChild($v_4.get_$2_0());CUI.Utility.ensureCSSClassOnElement($v_E.$D_2,"ms-cui-ct-first")}$v_4.$Bh_0($v_E.$D_2)}else{if($v_3){CUI.Utility.ensureCSSClassOnElement($v_2.$D_2,"ms-cui-ct-last");$v_3=null;$v_4=null}if($v_9){$v_7++;$v_E.$BF_2(this.get_ribbonProperties().ATTabPositionText,null,null,$v_7,$v_8)}this.$w_2.appendChild($v_E.$D_2)}if($v_E===this.$A_2)$v_0=$v_E;$v_2=$v_E}if($v_3){CUI.Utility.ensureCSSClassOnElement($v_2.$D_2,"ms-cui-ct-last");$v_2=null;$v_3=null;$v_4=null}var $v_A=1;if($v_9)for(var $v_F=0;$v_F<$v_5;$v_F++){var $v_G=$v_6.get_item($v_F);if($v_G.$1B_2){if($v_G.$11_2!==$v_3){$v_3=$v_G.$11_2;$v_4=this.$12_2[$v_G.$11_2];$v_A=1}$v_G.$9u_2();$v_G.$BF_2(this.get_ribbonProperties().ATTabPositionText,this.get_ribbonProperties().ATContextualTabText,$v_4.$1T_0,$v_A,$v_4.$2j_0);$v_A++}}if(!CUI.ScriptUtility.isNullOrUndefined($v_0))if($v_0.$1B_2){var $v_H=this.$83_2($v_0.$11_2);CUI.Utility.ensureCSSClassOnElement($v_H.get_$2_0(),"ms-cui-cg-s");this.$8Y_2($v_H.$3V_0)}if(CUI.ScriptUtility.isNullOrUndefined($v_0)&&!this.$24_2){$v_0=!CUI.ScriptUtility.isNullOrUndefined(this.$72_2)?this.$72_2:$v_1;this.$6A_2($v_0)}if(this.$24_2)$v_0=null;this.$FN_2();if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){$v_0.get_$B3_0()&&CUI.Utility.disableElement(this.$m_2);var $v_I=this.$m_2.className.indexOf("ms-cui-disabled")!==-1;this.$m_2.className=$v_0.$DR_2()+($v_I?" ms-cui-disabled":"")}this.$R_0();this.$h_0=false;if(this.$76_2&&!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonProperties().RootEventCommand)){var $v_J=new CUI.RibbonEventCommandProperties;$v_J.RootId=this.$4_0;$v_J.RootType="Ribbon";$v_J.Minimized=this.get_minimized();$v_J.Maximized=!this.get_minimized();this.raiseCommandEvent(this.get_ribbonProperties().RootEventCommand,11,$v_J);this.$76_2=false}},$3z_0:function($p0){this.$5y_0();this.$R_0();this.$h_0=false;var $v_0=this.$6_0;if($p0)if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){var $$enum_2=$v_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if(!$v_1.get_visible())continue;if(!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&this.$A_2===$v_1)this.$A_2.$3z_0($p0);else{$v_1.$9X_2();$v_1.$9Y_2()}}}if(!CUI.ScriptUtility.isNullOrUndefined(this.$12_2)){var $$dict_4=this.$12_2;for(var $$key_5 in $$dict_4){var $v_2={key:$$key_5,value:$$dict_4[$$key_5]};$v_2.value.$Bn_0()}}},$5y_0:function(){CUI.Component.prototype.$5y_0.call(this);var $v_0=this.get_$2_0().childNodes;this.$8x_2=$get("cui-"+this.$4_0+"-scrollCurtain");this.$2c_2=$v_0[0];this.$1m_2=$v_0[1];this.$b_2=this.$1m_2.childNodes[0];this.$c_2=this.$1m_2.childNodes[1];this.$o_2=this.$c_2.childNodes[0];if($v_0.length>2)this.$m_2=$v_0[2];this.$2y_2=CUI.Utility.$64(this.$b_2,"ms-cui-qat-container");this.$w_2=CUI.Utility.$64(this.$c_2,"ms-cui-tts");if(CUI.ScriptUtility.isNullOrUndefined(this.$w_2))this.$w_2=CUI.Utility.$64(this.$c_2,"ms-cui-tts-scale-1");if(CUI.ScriptUtility.isNullOrUndefined(this.$w_2))this.$w_2=CUI.Utility.$64(this.$c_2,"ms-cui-tts-scale-2")},$R_0:function(){this.$4p_2=this.$$d_$Ed_2;this.set_$58_2(true);this.$5e_2=this.$$d_$ED_2;this.$5f_2=this.$$d_$EU_2;this.$5d_2=this.$$d_$EC_2;if(!this.$6h_2){$addHandler(this.get_$2_0(),"keydown",this.$5f_2);$addHandler(document,"keydown",this.$5e_2);$addHandler(this.get_$2_0(),"keydown",this.$5d_2);this.$6h_2=true}CUI.Component.prototype.$R_0.call(this)},get_$58_2:function(){return this.$7g_2},set_$58_2:function($p0){if($p0===this.$7g_2)return $p0;if($p0)$addHandler(window,"resize",this.$4p_2);else try{$removeHandler(window,"resize",this.$4p_2)}catch($$e_1){}this.$7g_2=$p0;return $p0},$ED_2:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0)&&!CUI.ScriptUtility.isNullOrUndefined($p0.rawEvent)){var $v_0=$p0.rawEvent.keyCode,$v_1=$p0.ctrlKey?"t":"f";$v_1+=$p0.altKey?"t":"f";$v_1+=$p0.shiftKey?"t":"f";try{$v_1+=String.fromCharCode(_processKeyCodes($v_0))}catch($$e_3){return}var $v_2=$p0.target;if($v_1===this.$95_2){this.$9f_2();this.jumpToLastFocused($v_2)}else if($v_1===this.$96_2){this.$9f_2();this.jumpToRibbonTab($v_2)}}},$9f_2:function(){if(!CUI.ScriptUtility.isNullOrUndefined(document.selection)&&document.selection.type==="Control"){for(var $v_0=document.selection.createRange(),$v_1=$v_0.length;$v_1>0;$v_1--)$v_0.remove($v_1-1);$v_0.select()}},jumpToLastFocused:function(currentElement){this.$1q_1&&this.$0_0.$40_1();if(this.$8i_2(currentElement))this.$2d_2=currentElement;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$p_1())){try{this.setFocus()}catch($$e_1){}return}this.setFocusOnRibbon()},jumpToRibbonTab:function(currentElement){if(this.$8i_2(currentElement))this.$2d_2=currentElement;this.$1q_1&&this.$0_0.$40_1();if(!CUI.ScriptUtility.isNullOrEmptyString(this.$4g_2)){var $v_0=$get(this.$4g_2+"-title");!CUI.ScriptUtility.isNullOrUndefined($v_0)&&$v_0.firstChild.focus()}},setFocusOnTabTitle:function(){if(!CUI.ScriptUtility.isNullOrEmptyString(this.$4g_2)){var $v_0=$get(this.$4g_2+"-title");!CUI.ScriptUtility.isNullOrUndefined($v_0)&&$v_0.firstChild.focus()}},$EC_2:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0)&&!CUI.ScriptUtility.isNullOrUndefined($p0.rawEvent)){var $v_0=$p0.rawEvent.keyCode;if(($p0.ctrlKey||$p0.shiftKey)&&($v_0===39&&!this.$0_0._textDirection)||$v_0===37&&this.$0_0._textDirection===1){$p0.preventDefault();$p0.stopPropagation();this.$A_2.$Af_2(true)}else if(($p0.ctrlKey||$p0.shiftKey)&&($v_0===37&&!this.$0_0._textDirection)||$v_0===39&&this.$0_0._textDirection===1){$p0.preventDefault();$p0.stopPropagation();this.$A_2.$Af_2(false)}}},setFocusOnRibbon:function(){if(this.$24_2)this.setFocusOnTabTitle();else this.$A_2.$BJ_2()},setFocusOnCurrentTab:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.$A_2))this.$A_2.$FA_2();else this.setFocusOnRibbon()},setFocus:function(){(this.$24_2||!CUI.Root.prototype.setFocus.call(this))&&this.setFocusOnTabTitle();return true},$EU_2:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0)&&!CUI.ScriptUtility.isNullOrUndefined($p0.rawEvent)&&!this.$1q_1)if($p0.rawEvent.keyCode===27&&!CUI.ScriptUtility.isNullOrUndefined(this.$2d_2)){$p0.stopPropagation();$p0.preventDefault();try{this.$2d_2.focus()}catch($$e_1){}this.$2d_2=null}},$12_2:null,addContextualGroup:function(id,title,color,command){var $v_0=this.$12_2[id];if(!CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("A contextual group with id: "+id+" has already been added to this ribbon.");$v_0=new CUI.ContextualGroup(id,title,color,command);this.$12_2[id]=$v_0},get_contextualGroupIds:function(){var $v_0=[],$$dict_1=this.$12_2;for(var $$key_2 in $$dict_1){var $v_1={key:$$key_2,value:$$dict_1[$$key_2]};Array.add($v_0,$v_1.key)}return $v_0},removeContextualGroup:function(id){var $v_0=this.$12_2[id];if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){var $$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.$1B_2&&$v_1.$11_2===id)throw Error.create("You cannot remove a contextual group when there are Tabs that refer to it.")}delete this.$12_2[id]}},showContextualGroup:function(id){this.$8h_2(id,true)},hideContextualGroup:function(id){this.$8h_2(id,false)},$8h_2:function($p0,$p1){var $v_0=this.$12_2[$p0];if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("This ribbon does not contain a contextual group with id: "+$p0);var $v_1=false,$$enum_4=this.$6_0.getEnumerator();while($$enum_4.moveNext()){var $v_2=$$enum_4.get_current();if($v_2.$11_2===$p0){if($v_2.get_visible()!==$p1)$v_1=true;$v_2.set_$6M_0($p1)}}$v_1&&this.$y_0()},$83_2:function($p0){return this.$12_2[$p0]},addChildAtIndex:function(child,index){this.ensureCorrectChildType(child);var $v_0=child;if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("child must not be null or undefined.");if($v_0.$1B_2){var $v_1=this.$12_2[$v_0.$11_2];if(CUI.ScriptUtility.isNullOrUndefined($v_1))throw Error.create("A contextual tab with contextual group id: "+$v_0.$11_2+" cannot be added because  the ribbon does not have a contextual group with this id.")}CUI.Component.prototype.addChildAtIndex.call(this,child,index)},ensureCorrectChildType:function(child){if(!CUI.Tab.isInstanceOfType(child))throw Error.create("Only children of type Tab can be added to a Ribbon")},get_cssClass:function(){return "ms-cui-ribbon"},get_rootType:function(){return "Ribbon"},$9v_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$o_2)){this.$o_2=CUI.Utility.$3("div");this.$o_2.id="jewelcontainer";this.$o_2.className="ms-cui-jewel-container";this.$o_2.style.display="none";this.$c_2.appendChild(this.$o_2)}},$Ct_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$2y_2)){this.$2y_2=CUI.Utility.$3("span");this.$2y_2.className="ms-cui-qat-container";this.$b_2.appendChild(this.$2y_2)}},$9b_2:function($p0,$p1,$p2){var $v_0=new CUI.QATBuildOptions;$v_0.attachToDOM=$p1;$v_0.trimmedIds=this.get_$2V_2().$u_0.trimmedIds;var $v_1=new CUI.QATBuilder($v_0,this.$2y_2,this.get_$2V_2().$1R_0);$v_1.$v_0=$p2;if(!$v_1.buildQAT($p0))throw Error.create("QAT could not be built");this._qat=$v_1.get_QAT();this.$b_2.style.display="block"},$9a_2:function($p0,$p1,$p2){this.$o_2.style.display="block";var $v_0=new CUI.JewelBuildOptions;$v_0.attachToDOM=$p1;$v_0.trimmedIds=this.get_$2V_2().$u_0.trimmedIds;var $v_1=new CUI.JewelBuilder($v_0,this.$o_2,this.get_$2V_2().$1R_0);$v_1.$v_0=$p2;if(!$v_1.buildJewel($p0))throw Error.create("Jewel could not be built");this._jewel=$v_1.get_jewel();this.$3n_2&&this.$3n_2.dispose();this.$3n_2=$v_1},_qat:null,get_QAT:function(){return this._qat},set_QAT:function(value){this._qat=value;return value},$3n_2:null,_jewel:null,get_jewel:function(){return this._jewel},set_jewel:function(value){this._jewel=value;return value},$Ce_2:function($p0,$p1,$p2,$p3,$p4){return new CUI.Tab(this,$p0,$p1,$p2,$p3,false,null,$p4)},$CV_2:function($p0,$p1,$p2,$p3,$p4,$p5){return new CUI.Tab(this,$p0,$p1,$p2,$p3,true,$p4,$p5)},$CY_2:function($p0,$p1,$p2,$p3,$p4){return new CUI.Group(this,$p0,$p2,$p3,$p4,$p1)},$CZ_2:function($p0,$p1){return new CUI.GroupPopup(this,$p0,$p1)},$Ca_2:function($p0,$p1){return new CUI.GroupPopupLayout(this,$p0,$p1)},$9n_2:function($p0,$p1){return new CUI.Layout(this,$p0,$p1)},$29_2:function($p0,$p1,$p2){return new CUI.Section(this,$p0,$p1,$p2)},$9q_2:function($p0){return new CUI.Strip(this,$p0)},$72_2:null,$FN_2:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&this.$A_2.$1g_0();if(!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&!this.$A_2.$1B_2)this.$72_2=this.$A_2;if(CUI.ScriptUtility.isNullOrUndefined(this.$A_2)||!this.$A_2.$6_0.$O_0)!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&!CUI.ScriptUtility.isNullOrUndefined(this.$m_2)&&this.get_$2_0().lastChild===this.$m_2&&this.get_$2_0().removeChild(this.$m_2);else!CUI.ScriptUtility.isNullOrUndefined(this.$m_2)&&this.get_$2_0().appendChild(this.$m_2);if(CUI.ScriptUtility.isNullOrUndefined(this.$A_2))return;var $v_0=this.$A_2.$h_0;this.$A_2.$2U_0();if(this.$A_2.$6_0.$O_0>0&&!CUI.ScriptUtility.isNullOrUndefined(this.$m_2)){var $v_1=false;if(this.$m_2.hasChildNodes()){$v_1=this.$m_2.firstChild===this.$A_2.get_$2_0();!$v_1&&this.$m_2.removeChild(this.$m_2.firstChild)}!$v_1&&this.$m_2.appendChild(this.$A_2.get_$2_0())}if(!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonProperties().TabSwitchCommand)&&this.$35_2!==this.$A_2){var $v_2=new CUI.CommandContextSwitchCommandProperties;if(!CUI.ScriptUtility.isNullOrUndefined(this.$35_2)&&this.$35_2!==this.$A_2){$v_2.OldContextId=this.$35_2.$4_0;$v_2.OldContextCommand=this.$35_2.$z_2}else{$v_2.OldContextId=null;$v_2.OldContextCommand=null}if(!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)){$v_2.NewContextId=this.$A_2.$4_0;$v_2.NewContextCommand=this.$A_2.$z_2;$v_2.ChangedByUser=this.$A_2.$5n_2}this.raiseCommandEvent(this.get_ribbonProperties().TabSwitchCommand,2,$v_2);this.$FO_2(this.$A_2)}if(!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)){this.$A_2.$5n_2=false;this.$A_2.$18_2&&this.$A_2.$BJ_2()}},$6A_2:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0)){this.$y_0();$p0.$8g_2(true,false);!$p0.$1B_2&&this.$8Y_2(0);!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&this.$A_2!==$p0&&this.$A_2.$8g_2(false,false);this.$A_2=$p0;this.set_$47_2(false)}this.set_$p_1(null)},$FO_2:function($p0){this.$35_2=$p0},selectTabById:function(tabId){var $v_0=this.getChild(tabId);if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){if($v_0.get_selected()&&$v_0.get_visible())return true;$v_0.$1B_2&&!$v_0.get_visible()&&this.showContextualGroup($v_0.$11_2);if($v_0.get_visible()){$v_0.set_selected(true);return true}}return false},selectTabByCommand:function(tabCommand){if(this.get_selectedTabCommand()===tabCommand)return true;var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();if($v_0.$z_2===tabCommand)return this.selectTabById($v_0.$4_0)}return false},$8Y_2:function($p0){var $v_0=CUI.ContextualGroup.$62($p0);if($v_0===""){CUI.Utility.removeCSSClassFromElement(this.$c_2,this.$3W_2);this.$3W_2=null}else{!this.$3W_2&&CUI.Utility.removeCSSClassFromElement(this.$c_2,this.$3W_2);this.$3W_2="ms-cui-ct-topBar-"+$v_0;CUI.Utility.ensureCSSClassOnElement(this.$c_2,this.$3W_2)}},$3W_2:null,get_selectedTabCommand:function(){return this.$A_2?this.$A_2.$z_2:null},get_selectedTabId:function(){return this.$A_2?this.$A_2.$4_0:null},$AK_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$A_2))return 0;return this.$m_2.offsetHeight-this.$A_2.get_$2_0().offsetHeight},$65_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$A_2))return 0;return this.$m_2.offsetWidth-this.$A_2.$DT_2()},$89_2:function(){return this.get_$2_0().offsetWidth},$AH_2:function(){return 100},$AP_2:function(){this.$9C_2=this.get_$2_0().style.display;this.get_$2_0().style.display="none";return},$FF_2:function(){this.get_$2_0().style.display=this.$9C_2;if(this.$89_2()<this.$AH_2()){this.get_$2_0().style.display="none";return}},$AL_2:function(){return CUI.Utility.$3I().toString()+CUI.Utility.$43().toString()},$F3_2:function($p0){var $v_0=20;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))return false;if(!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&!this.$A_2.$9G_2){var $v_6=null;if(this.get_useDataCookie())$v_6=this.getDataCookieValue(this.$A_2.$4_0);var $v_7=this.$33_2;if(!CUI.ScriptUtility.isNullOrUndefined($v_6)&&$v_6.startsWith($v_7)){var $v_8=$v_6.split("|");if(!CUI.ScriptUtility.isNullOrUndefined($v_8)&&$v_8.length===4){var $v_9=parseInt($v_8[1]),$v_A=parseInt($v_8[2]),$v_B=$v_8[3];$v_0=$v_A>$v_0?$v_A:$v_0;if(!isNaN($v_9)&&$v_9>=0)if($v_9>=0&&$v_9<this.$A_2.get_scaling().$1t_0.length){this.$A_2.scaleIndex($v_9);this.$A_2.$9G_2=true;this.$1i_0();if($v_B===this.get_$19_1().get_ribbonBuildOptions().scalingHint){this.$A_2.$71_2=this.$33_2;return true}}}}}if(CUI.ScriptUtility.isNullOrUndefined(this.$A_2))return false;this.$A_2.$h_0&&this.$1i_0();if($p0&&this.$89_2()>0)if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))if(this.get_$2_0().style.display!=="none"&&this.$89_2()<this.$AH_2())this.$AP_2();else this.get_$2_0().style.display==="none"&&this.$FF_2();var $v_1=0,$v_2=false;while((this.$65_2()<0||this.$AK_2()<0||this.$A_2.get_$8O_2())&&$v_1<25){if(!this.$A_2.scaleDown()){$v_2=true;break}this.$1i_0();$v_1++}if($v_2);var $v_3=0,$v_4=0;if($v_1<=0)while(this.$65_2()>$v_0&&$v_3<25){if(!this.$A_2.scaleUp())break;this.$1i_0();$v_3++;if(this.$65_2()<=0||this.$AK_2()<0||this.$A_2.get_$8O_2()){this.$A_2.scaleDown();this.$1i_0();$v_4++;break}}this.get_useDataCookie()&&this.$A_2.$1J_2>=-1&&this.$FJ_2();this.$A_2.$71_2=this.$33_2;this.$8V_2();var $v_5=$v_1>0||$v_3-$v_4>0;if($v_5)!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonProperties().ScaleCommand)&&this.raiseCommandEvent(this.get_ribbonProperties().ScaleCommand,1,null);return $v_5},$FE_2:function(){return this.$0_0._textDirection===1&&(CUI.Utility.$3L()||CUI.Utility.get_$68())},$FB_2:function(){var $v_0=this.$9d_2(this.$w_2);this.$w_2.style.width=$v_0+"px";this.$w_2.setAttribute("_widthAdded",true)},$9d_2:function($p0){for(var $v_0=0,$v_1=$p0.children,$v_2=$v_1.length,$v_3=0;$v_3<$v_2;$v_3++){var $v_4=$v_1[$v_3];if(!CUI.ScriptUtility.isNullOrUndefined($v_4)&&$v_4.nodeName==="LI"&&$v_4.offsetWidth>0){var $v_5=$v_4.childNodes[1];if(!CUI.ScriptUtility.isNullOrUndefined($v_5)&&$v_5.nodeName==="UL"){var $v_6=this.$9d_2($v_5);$v_5.style.width=$v_6+"px";$v_0=$v_0+$v_6+4}else $v_0=$v_0+$v_4.offsetWidth+2}}return $v_0},$8V_2:function(){this.$FE_2()&&this.$FB_2();if(!CUI.ScriptUtility.isNullOrUndefined(window._ribbonScaleHeader))try{window._ribbonScaleHeader(this.$1m_2,this.$0_0._textDirection===1)}catch($v_0){if($v_0.number!==-2146827843)throw $v_0}},$3O_2:function(){if(this.$24_2){this.$8V_2();return false}var $v_0=this.$F3_2(false);this.$70_2=new Date;return $v_0},$F2_2:function($p0){!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&this.$A_2.$B5_2($p0)},$BW_2:true,get_$Dy_2:function(){return this.$70_2.getTime()},$FJ_2:function(){this.storeDataCookie(this.$A_2.$4_0,CUI.Utility.$3I().toString()+CUI.Utility.$43().toString()+"|"+this.$A_2.$1J_2.toString()+"|"+this.$65_2().toString()+"|"+this.get_$19_1().get_ribbonBuildOptions().scalingHint.toString())},$24_2:false,$Bb_2:false,$76_2:false,get_minimized:function(){return this.$24_2},set_minimized:function(value){if(this.$24_2!==value){this.set_$47_2(value);!value&&this.get_$55_1()&&this.pollForStateAndUpdate()}return value},$99_2:false,get_$47_2:function(){return this.$24_2},set_$47_2:function($p0){if(this.$24_2!==$p0||!this.$99_2){this.$y_0();this.$Bb_2=!$p0;this.$76_2=true;this.$24_2=$p0;this.$99_2=true;if($p0&&!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)){this.$A_2.$8g_2(false,false);this.$A_2=null}}return $p0},$49_0:function(){this.set_$46_0(new Date);this.$3Q_1=false;var $v_0={},$$dict_1=this.$12_2;for(var $$key_2 in $$dict_1){var $v_1={key:$$key_2,value:$$dict_1[$$key_2]},$v_2=$v_1.value,$v_3=false;if(!CUI.ScriptUtility.isNullOrUndefined($v_2.$z_0))$v_3=this.get_rootUser().isRootCommandEnabled($v_2.$z_0,this);if($v_3)$v_0[$v_1.key]=true;this.$8h_2($v_1.key,$v_3)}this._qat&&this._qat.pollForStateAndUpdate();this._jewel&&this._jewel.pollForStateAndUpdate();if(this.$h_0){this.$1i_0();this.$8V_2()}!CUI.ScriptUtility.isNullOrUndefined(this.$A_2)&&this.$A_2.$49_0();if(this.$3Q_1){this.$3O_2();this.$3Q_1=false}this.ensureGlobalDisablingRemoved()},$2p_0:function($p0){if($p0.$I_1!==11){$p0.get_commandInfo().RootLocation=$p0.$I_1===2?"UpperRibbon":"LowerRibbon";if($p0.$I_1===2){var $v_0=$p0.$34_1;$p0.get_commandInfo().TabId=$v_0.NewContextId}}return CUI.Root.prototype.$2p_0.call(this,$p0)},get_jewelElement:function(){return this.$o_2},set_jewelElement:function(value){this.$o_2=value;return value},$6k_2:false,$33_2:null,$Ed_2:function($p0){if(this.get_$9s_1())return;var $v_0=this.$AL_2();if(this.$33_2===$v_0)return;this.$33_2=$v_0;if(!this.$6k_2&&this.$BW_2&&this.$FR_2()){this.$F0_2();this.$6k_2=true;this._componentWidth=this._componentHeight=-1;this.$40_1();this.$2m_1();var $v_1=this.$3O_2();$v_1&&this.pollForStateAndUpdate();this.$6k_2=false}},$FR_2:function(){return this.$7f_2!==CUI.Utility.$3I()||this.$7e_2!==CUI.Utility.$43()},$F0_2:function(){this.$7f_2=CUI.Utility.$3I();this.$7e_2=CUI.Utility.$43()},get_ribbonProperties:function(){return this.$5_1},get_$2V_2:function(){return this.get_$19_1()},set_$2V_2:function($p0){this.set_$19_1($p0);return $p0},get_domElementTagName:function(){return "div"},$1g_0:function(){CUI.Root.prototype.$1g_0.call(this);this.get_$2_0().setAttribute("aria-describedby","ribboninstructions");this.get_$2_0().setAttribute("role","toolbar");this.$Cx_2();this.$Cy_2();this.$Ct_2();this.$9v_2();this.$Cu_2();this.$Cr_2();this.$9v_2()},$Cy_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$b_2)){this.$b_2=CUI.Utility.$3("div");this.$b_2.className="ms-cui-topBar1";this.$b_2.style.display="none";this.$1m_2.appendChild(this.$b_2)}if(CUI.ScriptUtility.isNullOrUndefined(this.$c_2)){this.$c_2=CUI.Utility.$3("div");this.$c_2.className="ms-cui-topBar2";this.$1m_2.appendChild(this.$c_2)}},$Cx_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$2c_2)){this.$2c_2=CUI.Utility.$3("span");this.$2c_2.className="ms-cui-hidden";this.$2c_2.id="ribboninstruction";CUI.Utility.$2q(this.$2c_2,this.$5_1.NavigationHelpText)}if(CUI.ScriptUtility.isNullOrUndefined(this.$1m_2)){this.$1m_2=CUI.Utility.$3("div");this.$1m_2.className="ms-cui-ribbonTopBars";this.get_$2_0().appendChild(this.$2c_2);this.get_$2_0().appendChild(this.$1m_2)}},$Cu_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$m_2)){this.$m_2=CUI.Utility.$3("div");CUI.Utility.disableElement(this.$m_2)}},$Cr_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$q_2))this.$q_2=$get(this.$2X_1+"-QATRowCenter");if(CUI.ScriptUtility.isNullOrUndefined(this.$r_2))this.$r_2=$get(this.$2X_1+"-QATRowRight");if(CUI.ScriptUtility.isNullOrUndefined(this.$1n_2))this.$1n_2=$get(this.$2X_1+"-TabRowLeft");if(CUI.ScriptUtility.isNullOrUndefined(this.$1o_2))this.$1o_2=$get(this.$2X_1+"-TabRowRight")},$Da_2:function(){if(!this.$4r_2&&!CUI.ScriptUtility.isNullOrUndefined(this.$q_2)&&this.$q_2.parentNode!==this.$b_2){this.$q_2.parentNode&&this.$q_2.parentNode.removeChild(this.$q_2);this.$b_2.appendChild(this.$q_2);this.$q_2.style.display="inline-block";this.$b_2.style.display="block";CUI.Utility.$2C(this.$q_2,true,false)}if(!this.$4r_2&&!CUI.ScriptUtility.isNullOrUndefined(this.$r_2)&&this.$r_2.parentNode!==this.$b_2){this.$r_2.parentNode&&this.$r_2.parentNode.removeChild(this.$r_2);this.$b_2.appendChild(this.$r_2);this.$r_2.style.display="inline-block";this.$b_2.style.display="block";CUI.Utility.$2C(this.$r_2,true,false)}if(!this.$4r_2&&!CUI.ScriptUtility.isNullOrUndefined(this.$1n_2)&&this.$1n_2.parentNode!==this.$c_2){this.$1n_2.parentNode&&this.$1n_2.parentNode.removeChild(this.$1n_2);this.$c_2.appendChild(this.$1n_2);this.$1n_2.style.display="block";CUI.Utility.$2C(this.$1n_2,true,false)}if(CUI.ScriptUtility.isNullOrUndefined(this.$w_2)){this.$w_2=CUI.Utility.$3("ul");this.$w_2.setAttribute("role","tablist");this.$w_2.className="ms-cui-tts";this.$c_2.appendChild(this.$w_2)}if(!this.$4r_2&&!CUI.ScriptUtility.isNullOrUndefined(this.$1o_2)&&this.$1o_2.parentNode!==this.$c_2){this.$1o_2.parentNode&&this.$1o_2.parentNode.removeChild(this.$1o_2);this.$c_2.appendChild(this.$1o_2);this.$1o_2.style.display="block";CUI.Utility.$2C(this.$1o_2,true,false)}this.$4r_2=true},ensureGlobalDisablingRemoved:function(){CUI.Utility.enableElement(this.$w_2);this.$9w_2();this._jewel&&this._jewel.set_enabled(true);this._qat&&this._qat.pollForStateAndUpdate()},$9w_2:function(){CUI.Utility.enableElement(this.$m_2)},get_rootUser:function(){return CUI.Root.prototype.get_rootUser.call(this)},set_rootUser:function(value){CUI.Root.prototype.set_rootUser.call(this,value);!CUI.ScriptUtility.isNullOrUndefined(this._qat)&&this._qat.set_rootUser(value);!CUI.ScriptUtility.isNullOrUndefined(this._jewel)&&this._jewel.set_rootUser(value);return value},dispose:function(){this.set_$9s_1(true);var $v_0=this.$0_0;if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){var $v_1=$v_0.$2k_1;!CUI.ScriptUtility.isNullOrUndefined($v_1)&&window.clearTimeout($v_1);$v_0.$2m_1()}if(!CUI.ScriptUtility.isNullOrUndefined(this.$4p_2)){this.set_$58_2(false);this.$4p_2=null}if(this.$79_2){$removeHandler(this.get_$2_0(),"contextmenu",this.$79_2);this.$79_2=null}if(this.$6h_2){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())){$removeHandler(this.get_$2_0(),"keydown",this.$5f_2);this.$5f_2=null;$removeHandler(this.get_$2_0(),"keydown",this.$5d_2);this.$5d_2=null}$removeHandler(document,"keydown",this.$5e_2);this.$5e_2=null}CUI.Root.prototype.dispose.call(this);this.$35_2=null;this.$A_2=null;this.$1m_2=null;this.$w_2=null;this.$o_2=null;this.$m_2=null;this.$1n_2=null;this.$1o_2=null;this.$2y_2=null;this.$q_2=null;this.$r_2=null;this.$b_2=null;this.$c_2=null;this.$2c_2=null;this.$8x_2=null;this.$2d_2=null;var $$dict_2=this.$12_2;for(var $$key_3 in $$dict_2){var $v_2={key:$$key_3,value:$$dict_2[$$key_3]},$v_3=$v_2.value;$v_3.dispose()}this.$12_2=null;if(this.$3n_2){this.$3n_2.dispose();this.$3n_2=null}}};CUI.RibbonCommand=function(){};CUI.RibbonCommand.$AI=function($p0){var $v_0=window._v_rg_spbutton;if($v_0){var $v_1=$v_0[$p0];if($v_1){var $v_2=$get($v_1);return $v_2}}return null};CUI.RibbonCommand.serverButton=function(srcId,menuItemId){var $v_0=CUI.RibbonCommand.$AI(srcId);if($v_0){var $v_1=$v_0;if(CUI.BrowserUtility.$AZ())if($v_0.tagName!=="A")CUI.NativeUtility.ffClick($v_0);else window.location.href=$v_1.href;else $v_0.click()}};CUI.RibbonCommand.serverQueryButton=function(srcId){var $v_0=CUI.RibbonCommand.$AI(srcId);return !!$v_0};CUI.RibbonCommand.serverControlLabel=function(ribbonCommand){var $v_0=window._v_rg_spbutton;if($v_0){var $v_1=$v_0[ribbonCommand];if($v_1){var $v_2=$get($v_1);return $v_2.value}}return null};CUI.RibbonBuildContext=function(){CUI.RibbonBuildContext.initializeBase(this)};CUI.RibbonBuildContext.prototype={clone:function(){var $v_0=new CUI.RibbonBuildContext;$v_0.initializedTab=this.initializedTab;$v_0.initialScalingIndex=this.initialScalingIndex;$v_0.initialTabId=this.initialTabId;$v_0.ribbon=this.ribbon;return $v_0},initializedTab:null,initialTabId:null,initialScalingIndex:0,ribbon:null};CUI.RibbonBuildOptions=function(){this.initialScalingIndex=-1;CUI.RibbonBuildOptions.initializeBase(this)};CUI.RibbonBuildOptions.prototype={lazyTabInit:false,shallowTabs:false,showQATId:null,showJewelId:null,minimized:false,shownTabs:null,shownContextualGroups:null,initiallyVisibleContextualGroups:null,normalizedContextualGroups:null,trimEmptyGroups:false,initialTabSelectedByUser:false,launchedByKeyboard:false,scalingHint:"0"};CUI.RibbonBuilder=function(options,elmPlaceholder,rootBuildClient){this.$$d_$ES_1=Function.createDelegate(this,this.$ES_1);this.$$d_$Ch_1=Function.createDelegate(this,this.$Ch_1);this.$$d_$Aq_1=Function.createDelegate(this,this.$Aq_1);CUI.RibbonBuilder.initializeBase(this,[options,elmPlaceholder,rootBuildClient]);if(CUI.ScriptUtility.isNullOrUndefined(elmPlaceholder))throw Error.create("Ribbon placeholder DOM element is null or undefined.")};CUI.RibbonBuilder.prototype={get_ribbon:function(){return this.$0_0},set_ribbon:function(value){this.$0_0=value;return value},get_ribbonBuildOptions:function(){return this.$u_0},buildRibbonAndInitialTab:function(initialTabId){if(CUI.ScriptUtility.isNullOrUndefined(initialTabId))throw Error.create("Initial tab for ribbon is null or undefined");if(this.$2f_0)return false;var $v_0=new CUI.RibbonBuildContext;$v_0.initialTabId=initialTabId;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().attachToDOM)&&this.get_ribbonBuildOptions().attachToDOM)$v_0.initialScalingIndex=this.get_ribbonBuildOptions().initialScalingIndex;this.$2f_0=true;var $v_1=new CUI.DataQuery;$v_1.id=$v_0.initialTabId;$v_1.queryType=2;$v_1.handler=this.$$d_$Aq_1;$v_1.data=$v_0;this.$v_0.runQuery($v_1);return true},buildRibbonFromData:function(dataNode,initialTabId){var $v_0=new CUI.RibbonBuildContext;$v_0.initialTabId=initialTabId;var $v_1=new CUI.DataQueryResult;$v_1.success=true;$v_1.queryData=dataNode;$v_1.contextData=$v_0;this.$Aq_1($v_1)},$Aq_1:function($p0){var $v_0=$p0.contextData;$p0.queryData=this.applyDataExtensions($p0.queryData);CUI.Utility.ensureCSSClassOnElement(this._elmPlaceholder,"loaded");var $v_1=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0.queryData,"Templates");!CUI.ScriptUtility.isNullOrUndefined($v_1)&&CUI.TemplateManager.get_instance().loadTemplates($v_1);this.set_ribbon(this.$C6_1($p0.queryData,$v_0));this.get_ribbon().set_$2V_2(this);this.$1R_0.onComponentCreated(this.get_ribbon(),this.get_ribbon().$4_0);if(this.get_ribbonBuildOptions().minimized)this.get_ribbon().set_$47_2(true);else{this.get_ribbon().set_$47_2(false);var $v_3=this.get_ribbon().getChild($v_0.initialTabId);if(!CUI.ScriptUtility.isNullOrUndefined($v_3)){$v_3.$5n_2=this.get_ribbonBuildOptions().initialTabSelectedByUser;this.get_ribbon().$6A_2($v_3)}}this.get_ribbon().$2X_1=this.get_ribbonBuildOptions().clientID;var $v_2=!this.get_ribbonBuildOptions().minimized&&this.get_ribbonBuildOptions().attachToDOM;if($v_2){!this.$u_0.minimized&&this.get_ribbon().$F2_2($v_0.initialScalingIndex-1);this.get_ribbon().$3z_0(true);!CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbonBuildOptions().showQATId)&&this.get_ribbon().$9b_2(this.get_ribbonBuildOptions().showQATId,true,this.$v_0);!CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbonBuildOptions().showJewelId)&&this.get_ribbon().$9a_2(this.get_ribbonBuildOptions().showJewelId,true,this.$v_0)}else{this.get_ribbon().$1g_0();!CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbonBuildOptions().showQATId)&&this.get_ribbon().$9b_2(this.get_ribbonBuildOptions().showQATId,false,this.$v_0);!CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbonBuildOptions().showJewelId)&&this.get_ribbon().$9a_2(this.get_ribbonBuildOptions().showJewelId,false,this.$v_0);CUI.Utility.removeChildNodesSlow(this._elmPlaceholder);this._elmPlaceholder.appendChild(this.get_ribbon().get_$2_0())}this.get_ribbon().$3O_2();this.$8N_0(this.get_ribbon());this.$1R_0.onComponentBuilt(this.get_ribbon(),this.get_ribbon().$4_0);this.get_ribbonBuildOptions().launchedByKeyboard&&this.get_ribbon().setFocusOnRibbon();CUI.PMetrics.perfMark(7104)},$ES_1:function($p0){var $v_0=$p0.contextData;if($p0.success){var $v_1=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0.queryData,"Ribbon"),$v_2=CUI.DataNodeWrapper.getFirstChildNodeWithName($v_1,"Tabs"),$v_3=null;if(CUI.ScriptUtility.isNullOrUndefined($v_2)||!CUI.DataNodeWrapper.getNodeChildren($v_2).length)for(var $v_6=CUI.DataNodeWrapper.getFirstChildNodeWithName($v_1,"ContextualTabs"),$v_7=CUI.DataNodeWrapper.getNodeChildren($v_6),$v_8=0;$v_8<$v_7.length;$v_8++){var $v_9=$v_7[$v_8];$v_3=CUI.DataNodeWrapper.getNodeChildren($v_9);if($v_3.length>0)break}else $v_3=CUI.DataNodeWrapper.getNodeChildren($v_2);var $v_4=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0.queryData,"Templates");$v_4=this.applyDataExtensions($v_4);CUI.TemplateManager.get_instance().loadTemplates($v_4);var $v_5=this.applyDataExtensions($v_3[0]);this.$7x_1($v_0.initializedTab,$v_5,$v_0);$v_0.initializedTab.get_ribbon().$6A_2($v_0.initializedTab);$v_0.initializedTab.$8L_0(true)}CUI.PMetrics.perfMark(7106)},$C6_1:function($p0,$p1){var $v_0=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0,"Ribbon");if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("No ribbon element was present in the data");var $v_1=new CUI.DataNodeWrapper($v_0);this.set_ribbon(new CUI.Ribbon($v_1.get_attributes()["Id"],$v_1.get_attributes()));this.get_ribbon().set_useDataCookie(true);var $v_2=CUI.DataNodeWrapper.getNodeChildren(CUI.DataNodeWrapper.getFirstChildNodeWithName($v_1.$d_0,"Tabs"));this.$9V_1($v_2,null,$p1);var $v_3=CUI.DataNodeWrapper.getFirstChildNodeWithName($v_1.$d_0,"ContextualTabs");if(!CUI.ScriptUtility.isNullOrUndefined($v_3))for(var $v_4=CUI.DataNodeWrapper.getNodeChildren($v_3),$v_5=!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().shownContextualGroups),$v_6=0;$v_6<$v_4.length;$v_6++){if($v_5){var $v_7=CUI.DataNodeWrapper.getNodeAttributes($v_4[$v_6])["Id"];if(!CUI.ScriptUtility.isNullOrUndefined($v_7))if(CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().shownContextualGroups[$v_7]))continue}this.$Bf_1($v_4[$v_6],$p1)}return this.get_ribbon()},$Bf_1:function($p0,$p1){var $v_0=CUI.DataNodeWrapper.getNodeAttributes($p0),$v_1=0,$v_2=$v_0["Id"],$v_3=!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().normalizedContextualGroups)&&!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().normalizedContextualGroups[$v_2])&&this.get_ribbonBuildOptions().normalizedContextualGroups[$v_2];if(!$v_3){switch($v_0["Color"]){case "DarkBlue":$v_1=1;break;case "LightBlue":$v_1=2;break;case "Magenta":$v_1=6;break;case "Green":$v_1=5;break;case "Orange":$v_1=4;break;case "Purple":$v_1=8;break;case "Teal":$v_1=3;break;case "Yellow":$v_1=7;break;default:$v_1=0;break}this.get_ribbon().addContextualGroup($v_2,$v_0["Title"],$v_1,$v_0["Command"])}var $v_4=CUI.DataNodeWrapper.getNodeChildren($p0);if(!$v_3)for(var $v_5=0;$v_5<$v_4.length;$v_5++){var $v_6=CUI.DataNodeWrapper.getNodeAttribute($v_4[$v_5],"Id");if($v_6===$p1.initialTabId){if(CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().initiallyVisibleContextualGroups))this.get_ribbonBuildOptions().initiallyVisibleContextualGroups={};this.get_ribbonBuildOptions().initiallyVisibleContextualGroups[$v_2]=true;break}}this.$9V_1($v_4,$v_3?null:$v_0["Id"],$p1)},$9V_1:function($p0,$p1,$p2){for(var $v_0=!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().shownTabs),$v_1=0;$v_1<$p0.length;$v_1++){if($v_0){var $v_3=CUI.DataNodeWrapper.getNodeAttributes($p0[$v_1])["Id"];if(!CUI.ScriptUtility.isNullOrUndefined($v_3))if(CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().shownTabs[$v_3]))continue}var $v_2=this.$CA_1($p0[$v_1],$p2,$p1);this.get_ribbon().addChild($v_2)}},$CA_1:function($p0,$p1,$p2){var $v_0=new CUI.DataNodeWrapper($p0),$v_1;if(CUI.ScriptUtility.isNullOrUndefined($p2))$v_1=this.get_ribbon().$Ce_2($v_0.get_attributes()["Id"],$v_0.get_attributes()["Title"],$v_0.get_attributes()["Description"],$v_0.get_attributes()["Command"],$v_0.get_attributes()["CssClass"]);else{$v_1=this.get_ribbon().$CV_2($v_0.get_attributes()["Id"],$v_0.get_attributes()["Title"],$v_0.get_attributes()["Description"],$v_0.get_attributes()["Command"],$p2,$v_0.get_attributes()["CssClass"]);!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbonBuildOptions().initiallyVisibleContextualGroups)&&this.get_ribbonBuildOptions().initiallyVisibleContextualGroups[$p2]&&$v_1.set_$6M_0(true)}if(!$v_0.get_children().length)$v_1.$8Z_0(this.$$d_$Ch_1,$v_0.$d_0,$p1.clone());else this.$7x_1($v_1,$p0,$p1);return $v_1},$7x_1:function($p0,$p1,$p2){for(var $v_0=CUI.DataNodeWrapper.getFirstChildNodeWithName($p1,"Groups"),$v_1=CUI.DataNodeWrapper.getNodeChildren($v_0),$v_2={},$v_7=0;$v_7<$v_1.length;$v_7++){if(this.isNodeTrimmed($v_1[$v_7]))continue;var $v_8=this.$Bx_1($v_1[$v_7],$p2);if(!CUI.ScriptUtility.isNullOrUndefined($v_8))$p0.addChild($v_8);else{var $v_9=CUI.DataNodeWrapper.getNodeAttribute($v_1[$v_7],"Id");if(!CUI.ScriptUtility.isNullOrUndefined($v_9))$v_2[$v_9]=$v_9}}for(var $v_3=CUI.DataNodeWrapper.getFirstChildNodeWithName($p1,"Scaling"),$v_4=CUI.DataNodeWrapper.getNodeChildren($v_3),$v_5=null,$v_6=false,$v_A=0;$v_A<$v_4.length;$v_A++){var $v_B=CUI.DataNodeWrapper.getNodeName($v_4[$v_A]),$v_C=CUI.DataNodeWrapper.getNodeAttributes($v_4[$v_A]),$v_D=$v_C["GroupId"];if($v_B==="MaxSize"){if(this.isIdTrimmed($v_D)||!CUI.ScriptUtility.isNullOrUndefined($v_2[$v_D]))continue;$p0.get_scaling().setGroupMaxSize($v_D,$v_C["Size"])}else if($v_B==="Scale"){if(this.isIdTrimmed($v_D)||!CUI.ScriptUtility.isNullOrUndefined($v_2[$v_D]))continue;$p0.get_scaling().addScalingStep(new CUI.ScalingStep($v_D,$v_C["Size"],$v_C["PopupSize"],$v_5,$v_6));$v_5=null;$v_6=false}else if($v_B==="LowScaleWarning"){$v_5=$v_C["Message"];$v_6=true}else throw Error.create("Was expecting a node with name MaxSize or Scale.")}$p0.scaleMax()},$Ch_1:function($p0,$p1,$p2){var $v_0=$p2,$v_1=$p0,$v_2=new CUI.DataNodeWrapper($p1);$v_0.initializedTab=$p0;if(!$v_2.get_hasChildren()){var $v_3=new CUI.DataQuery;$v_3.id=$v_0.initializedTab.$4_0;$v_3.queryType=4;$v_3.handler=this.$$d_$ES_1;$v_3.data=$v_0;this.$v_0.runQuery($v_3);return null}this.$7x_1($v_1,$p1,$v_0);$v_1.$8L_0(true);this.get_ribbon().refresh();return $v_1},$Bx_1:function($p0,$p1){var $v_0=new CUI.DataNodeWrapper($p0),$v_1=$v_0.get_attributes()["Template"],$v_2=CUI.TemplateManager.get_instance().getTemplate($v_1);if(CUI.ScriptUtility.isNullOrUndefined($v_2))throw Error.create("A template with name: "+$v_1+" could not be loaded.");for(var $v_3={},$v_4=null,$v_8=0;$v_8<$v_0.get_children().length;$v_8++)if($v_0.get_children()[$v_8].name==="Controls"){$v_4=$v_0.get_children()[$v_8];break}if(CUI.ScriptUtility.isNullOrUndefined($v_4))throw Error.create("No Controls node found in this Group tag.");for(var $v_5=CUI.DataNodeWrapper.getNodeChildren($v_4),$v_6=true,$v_9=0;$v_9<$v_5.length;$v_9++){if(this.isNodeTrimmed($v_5[$v_9]))continue;$v_6=false;var $v_A=this.$1f_0($v_5[$v_9],$p1),$v_B=$v_3[$v_A.get_templateAlias()];if(CUI.ScriptUtility.isNullOrUndefined($v_B))$v_3[$v_A.get_templateAlias()]=$v_A;else if(Array.isInstanceOfType($v_B))Array.add($v_B,$v_A);else{var $v_C=[];Array.add($v_C,$v_B);Array.add($v_C,$v_A);$v_3[$v_A.get_templateAlias()]=$v_C}}if(this.get_ribbonBuildOptions().trimEmptyGroups&&$v_6)return null;var $v_7=$v_2.createGroup(this.get_ribbon(),$v_0.get_attributes()["Id"],$v_0.get_attributes(),$v_0.get_attributes()["Title"],$v_0.get_attributes()["Description"],$v_0.get_attributes()["Command"],$v_3,null);return $v_7}};CUI.RibbonComponent=function($p0,$p1,$p2,$p3){CUI.RibbonComponent.initializeBase(this,[$p0,$p1,$p2,$p3])};CUI.RibbonComponent.prototype={get_ribbon:function(){return this.$0_0}};CUI.Row=function($p0,$p1){CUI.Row.initializeBase(this,[$p0,$p1,"",""])};CUI.Row.prototype={$1i_0:function(){this.ensureDOMElementAndEmpty();CUI.Component.prototype.appendChildrenToElement.call(this,this.get_$2_0());CUI.Component.prototype.$1i_0.call(this)},$5y_0:function(){this.set_$2_0($get(this.$M_0.$4_0+"-"+this.$M_0.$6_0.indexOf(this)))},ensureCorrectChildType:function($p0){if(!CUI.Strip.isInstanceOfType($p0)&&!CUI.ControlComponent.isInstanceOfType($p0))throw Error.create("Only children of type Strip and ControlComponent can be added to Row Components.")},get_domElementTagName:function(){return "span"},get_cssClass:function(){var $v_0=this.$M_0.$I_2;if($v_0===2)return "ms-cui-row-onerow";else return "ms-cui-row"}};CUI.ScalingStep=function($p0,$p1,$p2,$p3,$p4){if(CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined($p1))throw Error.create("groupId, layoutName and message cannot be undefined or null");this.$2N_0=$p0;this.$5Z_0=$p1;this.$7M_0=$p2;this.$9H_0=$p3;this.$9Q_0=$p4};CUI.ScalingStep.prototype={$2N_0:null,$5Z_0:null,$7M_0:null,$9H_0:null,$9Q_0:false,$1s_0:null,$BI_0:function($p0){this.$1s_0=$p0},get_groupId:function(){return this.$2N_0},get_layoutName:function(){return this.$5Z_0},get_popupSize:function(){return this.$7M_0},get_scaleWarningMessage:function(){return this.$9H_0},get_hasScaleWarning:function(){return this.$9Q_0},get_previousLayoutName:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$1s_0))return null;for(var $v_0=this.$1s_0.getGroupMaxSize(this.$2N_0),$v_1=this.$1s_0.$1t_0,$v_2=0;$v_2<$v_1.length;$v_2++){var $v_3=$v_1[$v_2];if($v_3===this)break;if($v_3.$2N_0===this.$2N_0)$v_0=$v_3.$5Z_0}return $v_0}};CUI.Scaling=function(){this.$4m_0={};this.$1t_0=[]};CUI.Scaling.prototype={$4m_0:null,$1t_0:null,setGroupMaxSize:function($p0,$p1){this.$4m_0[$p0]=$p1;this.$h_0=true},removeGroupMaxSize:function($p0){delete this.$4m_0[$p0];this.$h_0=true},getGroupMaxSize:function($p0){return this.$4m_0[$p0]},addScalingStep:function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))throw Error.create("step must be definined and not null");if(CUI.ScriptUtility.isNullOrUndefined(this.$4m_0[$p0.$2N_0]))throw Error.create("You must set the GroupMaxSize of Group: "+$p0.$2N_0+" before you add ScalingSteps for it");this.addScalingStepAtIndex($p0,this.$1t_0.length)},addScalingStepAtIndex:function($p0,$p1){if(Array.contains(this.$1t_0,$p0))throw Error.create("This ScalingInfo already contains this ScaleStep");Array.insert(this.$1t_0,$p1,$p0);$p0.$BI_0(this);this.$h_0=true},removeScalingStep:function($p0){Array.remove(this.$1t_0,$p0);$p0.$BI_0(null);this.$h_0=true},get_steps:function(){return Array.clone(this.$1t_0)},get_stepsInternal:function(){return this.$1t_0},$h_0:true};CUI.Section=function($p0,$p1,$p2,$p3){CUI.Section.initializeBase(this,[$p0,$p1,"",""]);this.$I_2=$p2;this.$1N_2=$p3;switch($p2){case 4:this.$3D_0(new CUI.Row($p0,$p1+"-0"),false);this.$3D_0(new CUI.Row($p0,$p1+"-1"),false);this.$3D_0(new CUI.Row($p0,$p1+"-2"),false);break;case 3:this.$3D_0(new CUI.Row($p0,$p1+"-0"),false);this.$3D_0(new CUI.Row($p0,$p1+"-1"),false);break;case 2:this.$3D_0(new CUI.Row($p0,$p1+"-0"),false);break;case 1:break;default:throw Error.create("Invalid SectionType")}};CUI.Section.prototype={$I_2:0,$1N_2:0,$1i_0:function(){this.ensureDOMElementAndEmpty();this.appendChildrenToElement(this.get_$2_0());this.$1g_0();if(this.$I_2!==1){var $v_0=this.$6_0;this.$7h_2($v_0,1);(this.$I_2===3||this.$I_2===4)&&this.$7h_2($v_0,2);this.$I_2===4&&this.$7h_2($v_0,3)}this.$h_0=false},$5y_0:function(){this.set_$2_0($get(this.$M_0.$4_0+"-"+this.$M_0.$6_0.indexOf(this).toString()))},$7h_2:function($p0,$p1){var $v_0=$p0.get_item($p1-1);$v_0.$1g_0();if(this.$I_2===3)$v_0.get_$2_0().className="ms-cui-row-tworow";this.get_$2_0().appendChild($v_0.get_$2_0());$v_0.$2U_0()},get_cssClass:function(){if(this.$1N_2===2)return "ms-cui-section-alignmiddle";else return "ms-cui-section"},get_type:function(){return this.$I_2},get_alignment:function(){return this.$1N_2},removeChild:function($p0){throw Error.create("Cannot directly add and remove children from Section Components")},addChildAtIndex:function($p0,$p1){throw Error.create("Cannot directly add and remove children from Section Components")},getRow:function($p0){switch(this.$I_2){case 4:if($p0<1||$p0>3)throw Error.create("This Section type only has Row numbers 1, 2 and 3.");break;case 3:if($p0<1||$p0>2)throw Error.create("This Section type only has Row numbers 1 and 2");break;case 2:if($p0!==1)throw Error.create("This Section type only has Row number 1.");break;default:throw Error.create("This Section type does not have any rows")}return this.$6_0.get_item($p0-1)},$1g_0:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))return;if(this.$I_2===1){var $v_0=CUI.Utility.$3("span");$v_0.className="ms-cui-section-divider";this.set_$2_0($v_0);return}CUI.Component.prototype.$1g_0.call(this)},ensureCorrectChildType:function($p0){var $v_0=this.$6_0.$O_0;if(this.$I_2===2&&$v_0>0||this.$I_2===3&&$v_0>1||this.$I_2===4&&$v_0>2)throw Error.create("No more children can be added to a Section of this type.");if(this.$I_2===1)throw Error.create("Cannot add child components to Divider Section types.");if(!CUI.Row.isInstanceOfType($p0))throw Error.create("Only children of type Row can be added to Section Components.")},$4y_2:function($p0){var $v_0=this.get_ribbon().$29_2("clonedSection-"+this.get_ribbon().$2A_1(),this.$I_2,this.$1N_2);if(!$p0)return $v_0;var $v_1=0,$$enum_3=this.$6_0.getEnumerator();while($$enum_3.moveNext()){var $v_2=$$enum_3.get_current(),$$enum_5=$v_2.$6_0.getEnumerator();while($$enum_5.moveNext()){var $v_3=$$enum_5.get_current(),$v_4=null;if(CUI.ControlComponent.isInstanceOfType($v_3)){var $v_5=$v_3;$v_4=$v_5.$4y_1($p0)}else if(CUI.Strip.isInstanceOfType($v_3))$v_4=$v_3.$4y_2($p0);$v_0.getRow($v_1+1).addChild($v_4)}$v_1++}return $v_0},get_domElementTagName:function(){return "span"}};CUI.Strip=function($p0,$p1){CUI.Strip.initializeBase(this,[$p0,$p1,"",""])};CUI.Strip.prototype={$1i_0:function(){this.ensureDOMElementAndEmpty();this.appendChildrenToElement(this.get_$2_0());CUI.Component.prototype.$1i_0.call(this)},$5y_0:function(){this.set_$2_0($get(this.$M_0.$4_0+"-"+this.$M_0.$6_0.indexOf(this)))},ensureCorrectChildType:function($p0){if(!CUI.ControlComponent.isInstanceOfType($p0))throw Error.create("Only children of type Control can be added to Strips.")},get_cssClass:function(){return "ms-cui-strip"},$4y_2:function($p0){var $v_0=this.get_ribbon().$9q_2("clonedStrip-"+this.get_ribbon().$2A_1());if(!$p0)return $v_0;var $$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();$v_0.addChild($v_1.$4y_1($p0))}return $v_0}};CUI.Tab=function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7){this.$$d_$BR_2=Function.createDelegate(this,this.$BR_2);this.$$d_$EZ_2=Function.createDelegate(this,this.$EZ_2);this.$$d_$As_2=Function.createDelegate(this,this.$As_2);this.$$d_$EY_2=Function.createDelegate(this,this.$EY_2);CUI.Tab.initializeBase(this,[$p0,$p1,$p2,$p3]);this.$1J_2=-1;this.$1s_2=new CUI.Scaling;this.$1B_2=$p5;this.$11_2=$p6;this.$z_2=$p4;this.$8p_2=CUI.ScriptUtility.isNullOrUndefined($p7)?"":$p7;$p5&&this.set_$6M_0(false)};CUI.Tab.prototype={$5m_2:false,$D_2:null,$s_2:null,$3f_2:null,$2Z_2:null,$1J_2:0,$8p_2:null,$1B_2:false,$11_2:null,$1i_0:function(){this.ensureDOMElementAndEmpty();this.$7u_2();this.appendChildrenToElement(this.get_$2_0());CUI.Component.prototype.$1i_0.call(this)},$9X_2:function(){this.$D_2=$get(this.$4_0+"-title");this.$s_2=this.$D_2.childNodes[0];this.$3f_2=this.$s_2.childNodes[0];this.$2Z_2=this.$s_2.childNodes[1]},$9Y_2:function(){$addHandler(this.$s_2,"dblclick",this.$$d_$EY_2);$addHandler(this.$s_2,"click",this.$$d_$As_2);$addHandler(this.$s_2,"keypress",this.$$d_$EZ_2)},$5y_0:function(){CUI.Component.prototype.$5y_0.call(this);this.$9X_2()},$R_0:function(){CUI.Component.prototype.$R_0.call(this);this.$9Y_2()},$1g_0:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))return;CUI.Component.prototype.$1g_0.call(this);this.get_$2_0().setAttribute("role","tabpanel");this.get_$2_0().setAttribute("aria-labelledby",this.$4_0+"-title")},get_domElementTagName:function(){return "ul"},$Cw_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$D_2))this.$D_2=CUI.Utility.$3("li")},$9u_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$2Z_2))this.$2Z_2=CUI.Utility.$3("span")},$7u_2:function(){var $v_0=" ";if(CUI.ScriptUtility.isNullOrUndefined(this.$s_2)){this.$Cw_2();this.$s_2=CUI.Utility.$3("a");CUI.Utility.$1v(this.$s_2);this.$s_2.className="ms-cui-tt-a";this.$3f_2=CUI.Utility.$3("span");this.$3f_2.className="ms-cui-tt-span";this.$D_2.appendChild(this.$s_2);this.$s_2.appendChild(this.$3f_2);this.$R_0()}else{$v_0+=this.$D_2.className.indexOf("ms-cui-ct-first")>-1?"ms-cui-ct-first ":"";$v_0+=this.$D_2.className.indexOf("ms-cui-ct-last")>-1?"ms-cui-ct-last":"";$v_0=$v_0.trimEnd()}this.$D_2.className=this.$AJ_2()+$v_0;this.$D_2.id=this.$4_0+"-title";this.$D_2.setAttribute("role","tab");this.$D_2.setAttribute("aria-selected",this.$5m_2);CUI.UIUtility.setInnerText(this.$3f_2,this.get_title());this.$D_2.title=this.get_title();if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_description()))this.$s_2.setAttribute("title",this.get_description());else this.$s_2.setAttribute("title",this.get_title())},$BF_2:function($p0,$p1,$p2,$p3,$p4){CUI.ScriptUtility.isNullOrUndefined(this.$2Z_2)&&this.$9u_2();if(this.$1B_2)$p1=String.format($p1,$p2,$p3,$p4);else $p1=String.format($p0,$p3,$p4);CUI.UIUtility.setInnerText(this.$2Z_2,$p1);CUI.Utility.ensureCSSClassOnElement(this.$2Z_2,"ms-cui-hidden");this.$s_2.appendChild(this.$2Z_2)},$F1_2:function(){this.$D_2.className=this.$AJ_2()},get_cssClass:function(){return this.$DP_2()},get_selected:function(){return this.$5m_2},set_selected:function($p0){if(!this.get_visible())throw Error.create("Tabs must be visible and enabled in order to be selected.");if($p0){if(this.get_needsDelayIniting()){this.doDelayedInit();return $p0}this.get_ribbon().$6A_2(this);this.get_ribbon().set_$47_2(false);this.get_ribbon().$1i_0();this.$71_2!==this.get_ribbon().$33_2&&this.get_ribbon().$3O_2();this.$Av_0();this.$18_2=false}else throw Error.create("Selected cannot be set to false explicitly.\nSelecting another Tab will do this implicitly.");return $p0},$Ex_2:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbon().get_$2V_2())&&!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbon().get_$2V_2().get_ribbonBuildOptions())&&!CUI.ScriptUtility.isNullOrEmptyString(this.get_ribbon().get_$2V_2().get_ribbonBuildOptions().clientID)){var $v_0=$get(this.get_ribbon().get_$2V_2().get_ribbonBuildOptions().clientID+"_activeTabId");if($v_0)$v_0.value=this.$4_0}},$8g_2:function($p0,$p1){$p0&&this.$Ex_2();this.$5m_2=$p0;this.$y_0();$p1&&this.$7u_2()},$8L_0:function($p0){CUI.Component.prototype.$8L_0.call(this,$p0);this.get_ribbon().$3O_2();this.get_ribbon().pollForStateAndUpdate()},ensureCorrectChildType:function($p0){if(!CUI.Group.isInstanceOfType($p0))throw Error.create("Only children of type Group can be added to Tab Components")},$1s_2:null,get_scaling:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$1s_2))this.$1s_2=new CUI.Scaling;return this.$1s_2},get_currentScalingIndex:function(){return this.$1J_2},$71_2:null,scaleMax:function(){this.$8W_2();this.$y_0()},$8W_2:function(){var $$enum_0=this.$6_0.getEnumerator();while($$enum_0.moveNext()){var $v_0=$$enum_0.get_current();if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){var $v_1=this.$1s_2.getGroupMaxSize($v_0.$4_0);!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_0.selectLayout($v_1,null)}}this.$1J_2=-1},scaleIndex:function($p0){this.$B5_2($p0);this.$y_0()},$B5_2:function($p0){this.$8W_2();while($p0>this.$1J_2)if(!this.$B4_2())break},$F4_2:function(){if(this.$1J_2===-2){this.$8W_2();return true}if(this.$1J_2===-1)return false;var $v_0=this.$1s_2.$1t_0,$v_1=$v_0[this.$1J_2],$v_2=this.getChild($v_1.$2N_0);!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_2.selectLayout($v_1.get_previousLayoutName(),null);this.$1J_2--;return true},scaleUp:function(){var $v_0=this.$F4_2();$v_0&&this.$y_0();return $v_0},$B4_2:function(){if(this.$1J_2===-2){this.scaleMax();return true}var $v_0=this.$1s_2.$1t_0;if($v_0.length<=this.$1J_2+1)return false;this.$1J_2++;var $v_1=$v_0[this.$1J_2],$v_2=this.getChild($v_1.$2N_0);!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_2.selectLayout($v_1.$5Z_0,$v_1.$7M_0);return true},scaleDown:function(){var $v_0=this.$B4_2();$v_0&&this.$y_0();return $v_0},$9G_2:false,$DT_2:function(){for(var $v_0=0,$v_1=this.get_$2_0().childNodes,$v_2=0;$v_2<$v_1.length;$v_2++)$v_0+=$v_1[$v_2].offsetWidth;return $v_0},get_contextual:function(){return this.$1B_2},get_contextualGroupId:function(){return this.$11_2},$5n_2:false,$18_2:false,$EZ_2:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0)&&!CUI.ScriptUtility.isNullOrUndefined($p0.rawEvent)){var $v_0=$p0.rawEvent.keyCode;if($v_0===13){this.$18_2=true;$p0.stopPropagation();this.$As_2($p0)}}},$As_2:function($p0){CUI.PMetrics.perfMark(7105);$p0.preventDefault();this.$7V_2=true;if(this.get_selected())window.setTimeout(this.$$d_$BR_2,500);else this.$BR_2()},$7V_2:true,$BR_2:function(){if(!this.$7V_2)return;this.$5n_2=true;this.get_ribbon().$9t_1();this.set_selected(true);this.get_ribbon().$2m_1();this.get_ribbon().set_$p_1(null);CUI.PMetrics.perfMark(7107)},$Af_2:function($p0){var $v_0=document.activeElement,$v_1=this.$A1_2($v_0),$v_2=this.$6_0.$O_0,$v_3,$v_4=0,$$enum_6=this.$6_0.getEnumerator();while($$enum_6.moveNext()){var $v_6=$$enum_6.get_current();if($v_6.$4_0===$v_1)break;$v_4++}var $v_5;if($p0)$v_5=($v_4+1)%$v_2;else $v_5=$v_4-1;if($v_5<0)$v_5=$v_2+$v_5;while($v_5!==$v_4){$v_3=this.$6_0.get_item($v_5);if($v_3.$8e_0())return;if($p0)$v_5=($v_5+1)%$v_2;else $v_5=$v_5-1;if($v_5<0)$v_5=$v_2+$v_5}},$A1_2:function($p0){if($p0.nodeName==="LI")return $p0.id;else return this.$A1_2($p0.parentNode)},$BJ_2:function(){var $v_0=false,$$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_1=$$enum_1.get_current();if($v_1.$8e_0()){$v_0=true;return}}!$v_0&&this.$s_2.focus()},$FA_2:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$s_2)&&this.$s_2.focus()},$EY_2:function($p0){this.$7V_2=false;$p0.preventDefault();this.get_ribbon().set_$47_2(true);this.get_ribbon().$1i_0()},get_$8O_2:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0().lastChild)){var $v_0=CUI.Utility.$AC(this.get_$2_0().lastChild);if(this.$0_0._textDirection!==1&&CUI.Utility.$3I()<=$v_0.width+$v_0.x)return true}var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_1=$$enum_1.get_current();if($v_1.get_$8O_2())return true}return false},$AJ_2:function(){var $v_0="ms-cui-tt "+this.$8p_2;if(this.$5m_2)$v_0+=" ms-cui-tt-s";return $v_0},$DP_2:function(){var $v_0="ms-cui-tabBody";if(this.$1B_2)$v_0+=" ms-cui-tabBody-"+CUI.ContextualGroup.$62(this.get_ribbon().$83_2(this.$11_2).$3V_0);return $v_0},$DR_2:function(){var $v_0="ms-cui-tabContainer";if(this.$1B_2)$v_0+=" ms-cui-tabContainer-"+CUI.ContextualGroup.$62(this.get_ribbon().$83_2(this.$11_2).$3V_0);return $v_0},get_visible:function(){return CUI.Component.prototype.get_visible.call(this)},set_visible:function($p0){if(this.$1B_2)throw Error.create("Visibility of Contextual Tabs cannot be set explicitly.");CUI.Component.prototype.set_visible.call(this,$p0);return $p0},$z_2:null,get_command:function(){return this.$z_2},$2p_0:function($p0){$p0.get_commandInfo().TabId=this.$4_0;return CUI.Component.prototype.$2p_0.call(this,$p0)},$49_0:function(){var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.$z_2)?true:this.get_ribbon().$54_1(this.$z_2,null,null);this.set_enabled($v_0);if($v_0){this.set_$46_0(new Date);CUI.Component.prototype.$49_0.call(this)}this.get_ribbon().$9w_2()},dispose:function(){CUI.Component.prototype.dispose.call(this);CUI.Utility.$8R(this.$D_2);this.$2Z_2=null;this.$D_2=null;this.$s_2=null;this.$3f_2=null}};CUI.Template=function(){};CUI.TemplateManager=function(){this.$3w_0={}};CUI.TemplateManager.get_instance=function(){if(CUI.ScriptUtility.isNullOrUndefined(CUI.TemplateManager.$5X))CUI.TemplateManager.$5X=new CUI.TemplateManager;return CUI.TemplateManager.$5X};CUI.TemplateManager.prototype={$3w_0:null,addTemplate:function($p0,$p1){this.$3w_0[$p1]=$p0},removeTemplate:function($p0){this.$3w_0[$p0]=null},getTemplate:function($p0){return this.$3w_0[$p0]},loadTemplates:function($p0){for(var $v_0=new CUI.DataNodeWrapper($p0),$v_1=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0,"RibbonTemplates"),$v_2=CUI.DataNodeWrapper.getNodeChildren($v_1),$v_3=0;$v_3<$v_2.length;$v_3++)this.$Dz_0($v_2[$v_3])},$Dz_0:function($p0){var $v_0=new CUI.DataNodeWrapper($p0),$v_1=$v_0.get_attributes()["Id"],$v_2=$v_0.get_attributes()["Classname"];if(!CUI.ScriptUtility.isNullOrUndefined(this.$3w_0[$v_1]))return;if(CUI.ScriptUtility.isNullOrUndefined($v_2))this.$3w_0[$v_1]=new CUI.DeclarativeTemplate($p0)}};CUI.RootUser=function(){};CUI.RootProperties=function(){};CUI.RootProperties.prototype={RootEventCommand:null,ImageDownArrow:null,ImageDownArrowClass:null,ImageDownArrowTop:null,ImageDownArrowLeft:null,ImageSideArrow:null,ImageSideArrowClass:null,ImageSideArrowTop:null,ImageSideArrowLeft:null,ImageUpArrow:null,ImageUpArrowClass:null,ImageUpArrowTop:null,ImageUpArrowLeft:null,TextDirection:null,ToolTipFooterText:null,ToolTipFooterImage16by16:null,ToolTipFooterImage16by16Class:null,ToolTipFooterImage16by16Top:null,ToolTipFooterImage16by16Left:null,ToolTipDisabledCommandImage16by16:null,ToolTipDisabledCommandImage16by16Class:null,ToolTipDisabledCommandImage16by16Top:null,ToolTipDisabledCommandImage16by16Left:null,ToolTipDisabledCommandDescription:null,ToolTipDisabledCommandTitle:null,ToolTipDisabledCommandHelpKey:null,ToolTipHelpCommand:null,ToolTipSelectedItemTitlePrefix:null};CUI.RootEventCommandProperties=function(){};CUI.RootEventCommandProperties.prototype={RootId:null,RootType:null};CUI.Root=function($p0,$p1){this.$$d_$EI_1=Function.createDelegate(this,this.$EI_1);this.$$d_$EL_1=Function.createDelegate(this,this.$EL_1);this.$$d_$EM_1=Function.createDelegate(this,this.$EM_1);this.$$d_$EK_1=Function.createDelegate(this,this.$EK_1);this.$$d_onWindowScroll=Function.createDelegate(this,this.onWindowScroll);this.$$d_$8M_1=Function.createDelegate(this,this.$8M_1);this.$$d_$EJ_1=Function.createDelegate(this,this.$EJ_1);this.$2h_1=-1;this.$3s_1=-1;CUI.Root.initializeBase(this,[null,$p0,null,null]);this.initRootMember(this);this.$5_1=$p1;this.$l_1={};this.$8o_1={};this.$8m_1=0;this.$9N_1=0;if(!CUI.ScriptUtility.isNullOrUndefined($p1.TextDirection))this._textDirection=$p1.TextDirection.toLowerCase()==="rtl"?1:0;this.$7G_1=this.$$d_$EJ_1;this.$2R_1=this.$$d_$8M_1;$addHandler(document,"keydown",this.$7G_1);$addHandler(window,"unload",this.$2R_1)};CUI.Root.$1K=function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p0))return 0;return $p0[$p1]};CUI.Root.prototype={$l_1:null,$8o_1:null,$8m_1:0,$9N_1:0,$9F_1:false,$6z_1:null,$97_1:null,_textDirection:0,$2X_1:null,$92_1:true,get_initializing:function(){return this.$92_1},get_$p_1:function(){return this.$6z_1},set_$p_1:function($p0){if(!this.$1q_1)this.$6z_1=$p0;return $p0},get_$45_1:function(){return this.$97_1},set_$45_1:function($p0){if(!this.$1q_1){this.$97_1=$p0;this.$6z_1=$p0}return $p0},$9t_1:function(){!CUI.ScriptUtility.isNullOrUndefined(this.get_$p_1())&&this.get_$p_1().$CI_0()},$Ew_1:function($p0){this.$8o_1[$p0.$4_0]=$p0},$1i_0:function(){CUI.Component.prototype.$1i_0.call(this);this.$92_1=false;if(!this.$9F_1){this.$7J_1=this.$$d_onWindowScroll;$addHandler(window,"scroll",this.$7J_1);this.$9F_1=true}},$1g_0:function(){CUI.Component.prototype.$1g_0.call(this);this._textDirection===1&&CUI.Utility.ensureCSSClassOnElement(this.get_$2_0(),"ms-cui-rtl")},setFocus:function(){var $v_0=this.get_$p_1();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;return $v_0.$8d_0()},restoreFocus:function(){var $v_0=this.get_$45_1();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;return $v_0.$8d_0()},$BV_1:false,refresh:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$26_1)&&this.$26_1.onRootRefreshed(this)},attach:function(){this.$3z_0(true)},$3Q_1:false,get_needScaling:function(){return this.$3Q_1},set_needScaling:function(value){this.$3Q_1=value;return value},$26_1:null,get_rootUser:function(){return this.$26_1},set_rootUser:function(value){this.$26_1=value;return value},$3R_1:null,get_$19_1:function(){return this.$3R_1},set_$19_1:function($p0){this.$3R_1=$p0;return $p0},get_$55_1:function(){return !CUI.ScriptUtility.isNullOrUndefined(this.$26_1)},$54_1:function($p0,$p1,$p2){return (this.$Au_1($p0,$p1,$p2,false)&1)>0},$Au_1:function($p0,$p1,$p2,$p3){var $v_0=0,$v_1=this.$26_1.isRootCommandEnabled($p0,this);if($v_1)$v_0=1;if(CUI.ScriptUtility.isNullOrUndefined($p1)||!$p3&&!$v_1)return $v_0;if(this.$26_1.executeRootCommand($p1,$p2,null,this))$v_0|=2;return $v_0},pollForStateAndUpdate:function(){this.$49_0()},$49_0:function(){this.set_$46_0(new Date);CUI.Component.prototype.$49_0.call(this);this.ensureGlobalDisablingRemoved()},ensureGlobalDisablingRemoved:function(){CUI.Utility.enableElement(this.get_$2_0())},get_element:function(){return this.get_$2_0()},get_cssClass:function(){return "ms-cui-disabled"},get_textDirection:function(){return this._textDirection},$2A_1:function(){return this.$9N_1++},$9p_1:function($p0,$p1,$p2,$p3,$p4,$p5){return new CUI.MenuSection(this,$p0,$p1,$p2,$p3,$p4,$p5)},$9o_1:function($p0,$p1,$p2,$p3){return new CUI.Menu(this,$p0,$p1,$p2,$p3)},$CX_1:function($p0,$p1,$p2,$p3){return new CUI.Gallery(this,$p0,$p1,$p2,$p3)},$CW_1:function($p0,$p1,$p2){return new CUI.ControlComponent(this,$p0,$p1,$p2)},$42_1:function($p0,$p1,$p2){return new CUI.MenuItem(this,$p0,$p1,$p2)},$CU_1:function($p0,$p1,$p2,$p3){return new CUI.CommandEventArgs($p0,$p1,$p2,$p3)},$7w_1:function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0.$4_1))return;$p0.$7U_1=this.$DU_1();var $v_0=$p0.get_commandInfo();$v_0.CommandId=$p0.$4_1;$v_0.RootId=this.$4_0;$v_0.RootType=this.get_rootType();!CUI.ScriptUtility.isNullOrUndefined(this.$26_1)&&this.$26_1.executeRootCommand($p0.$4_1,$p0.$34_1,$v_0,this)},$2p_0:function($p0){this.$7w_1($p0);return true},get_rootType:function(){return "Root"},$DU_1:function(){return this.$8m_1++},$X_1:null,$Bg_1:function($p0){if(CUI.ScriptUtility.isNullOrUndefined(this.$X_1))this.$X_1=[];Array.add(this.$X_1,$p0)},$6P_1:false,$2l_1:function($p0){if(CUI.ScriptUtility.isNullOrUndefined(this.$X_1))return;this.$6P_1=true;var $v_0=Array.indexOf(this.$X_1,$p0);if($v_0>-1)for(var $v_1=this.$X_1.length-1;$v_1>=$v_0;$v_1--){this.$X_1[$v_1].$41_1();Array.removeAt(this.$X_1,$v_1)}else $p0.$41_1();this.$6P_1=false},$40_1:function(){if(this.$6P_1||CUI.ScriptUtility.isNullOrUndefined(this.$X_1))return;for(var $v_0=this.$X_1.length-1;$v_0>=0;$v_0--){this.$X_1[$v_0].$41_1();Array.removeAt(this.$X_1,$v_0)}},$3B_1:null,$2m_1:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$3B_1))return;this.$3B_1.$Y_0()},$2k_1:0,$3A_1:null,get_$6K_1:function(){if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&CUI.ScriptUtility.isNullOrUndefined(this.$3A_1)){this.$3A_1=CUI.Utility.$9m();this.$3A_1.className="ms-cui-tooltip-backFrame";this.$3A_1.style.visibility="hidden";document.body.appendChild(this.$3A_1)}return this.$3A_1},$1q_1:false,$1E_1:null,$2Q_1:null,$1k_1:null,$Bo_1:function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined(this.$2Q_1))this.$2Q_1=[];Array.add(this.$2Q_1,$p0);this.$1k_1=$p0;if(this.$1q_1)return false;var $v_0=this.get_$Ae_1();$v_0.style.visibility="hidden";document.body.appendChild($v_0);$v_0.style.visibility="visible";this.$1q_1=true;return true},$Cn_1:function($p0){if($p0!==this.$1k_1)return;if(!this.$1q_1)throw Error.create("Cannot end modal mode because the Ribbon is not in Modal Mode");Array.removeAt(this.$2Q_1,this.$2Q_1.length-1);this.$1k_1=null;if(this.$2Q_1.length>0)this.$1k_1=this.$2Q_1[this.$2Q_1.length-1];CUI.ScriptUtility.isNullOrUndefined(this.$1k_1)&&this.$Cp_1()},$Cp_1:function(){if(!this.$1q_1)return;if(!this.$2Q_1.length){document.body.removeChild(this.get_$Ae_1());this.$1q_1=false;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){$clearHandlers(this.$1E_1);this.$1E_1=null}}},get_$Ae_1:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$1E_1)){this.$1E_1=CUI.Utility.$3("div");if(Sys.Browser.agent===Sys.Browser.InternetExplorer)this.$1E_1.className="ms-cui-modalDiv-ie";else this.$1E_1.className="ms-cui-modalDiv-ff";CUI.Utility.$2C(this.$1E_1,true,false);$addHandler(this.$1E_1,"click",this.$$d_$EK_1);$addHandler(this.$1E_1,"mouseover",this.$$d_$EM_1);$addHandler(this.$1E_1,"mouseout",this.$$d_$EL_1);$addHandler(this.$1E_1,"contextmenu",this.$$d_$EI_1)}return this.$1E_1},$7G_1:null,$2R_1:null,$7J_1:null,$EI_1:function($p0){this.$1k_1.onModalContextMenu($p0)},$EK_1:function($p0){this.$1k_1.onModalBodyClick($p0)},$EM_1:function($p0){this.$1k_1.onModalBodyMouseOver($p0)},$EL_1:function($p0){!CUI.ScriptUtility.isNullOrUndefined(this.$1k_1)&&this.$1k_1.onModalBodyMouseOut($p0)},$EJ_1:function($p0){if(!this.$1q_1)return;this.$1k_1.onModalKeyPress($p0)},onWindowScroll:function(evt){this.$40_1();this.$2m_1()},$DL_1:function(){this.$9t_1()},$8M_1:function($p0){this.dispose()},dispose:function(){this.$6Z_1=true;!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&this.$BV_1&&$removeHandler(this.get_$2_0(),"contextmenu",CUI.Utility.get_returnFalseHandler());try{$removeHandler(document,"keydown",this.$7G_1)}catch($$e_0){}try{$removeHandler(window,"scroll",this.$7J_1)}catch($$e_1){}$removeHandler(window,"unload",this.$2R_1);!CUI.ScriptUtility.isNullOrUndefined(this.$1E_1)&&$clearHandlers(this.$1E_1);this.$1E_1=null;this.$26_1=null;this.$3R_1=null;this.$5_1=null;this.$3A_1=null;CUI.Component.prototype.dispose.call(this)},$6Z_1:false,get_$9s_1:function(){return this.$6Z_1},set_$9s_1:function($p0){this.$6Z_1=$p0;return $p0},get_$CM_0:function(){if(this._componentHeight===-1&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this._componentHeight=this.get_$2_0().offsetHeight;return this._componentHeight},get_$9g_0:function(){if(this._componentTopPosition===-1&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0()))this._componentTopPosition=CUI.UIUtility.calculateOffsetTop(this.get_$2_0());return this._componentTopPosition},$5E_1:"",get_cookieDataVersion:function(){return this.$5E_1},set_cookieDataVersion:function(value){this.$5E_1=value;return value},$9O_1:false,get_useDataCookie:function(){return this.$9O_1},set_useDataCookie:function(value){this.$9O_1=false;return value},storeDataCookie:function(name,value){var $v_0=new Date;$v_0.setTime($v_0.getTime()+6.048e8);document.cookie=name+"="+this.$5E_1+value+"; expires="+$v_0.toDateString()+"; path=/"},getDataCookieValue:function(name){name=this.$5E_1+name;for(var $v_0=document.cookie.split(";"),$v_1=0;$v_1<$v_0.length;$v_1++){var $v_2=$v_0[$v_1].trimStart();if($v_2.startsWith(name))if($v_2.startsWith(name+"="))return $v_2.substring(name.length+1,$v_2.length)}return null},$5_1:null,$30_1:false,$Ej_1:function($p0,$p1){this.$BS_1($p0,$p1,false)},$Ek_1:function($p0,$p1){this.$BS_1($p0,$p1,true)},$BS_1:function($p0,$p1,$p2){if(CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined($p1))return;$p0.style.top="0px";$p0.style.left="0px";var $v_0=this.$82_1($p0,$p1);this.$8b_1($p0,$v_0,$p2)},$8b_1:function($p0,$p1,$p2){var $v_0=false;if(CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined($p1))return;var $v_1,$v_2,$v_3=CUI.Root.$1K($p1,"launcherLeft"),$v_4=CUI.Root.$1K($p1,"launcherTop"),$v_5=CUI.Root.$1K($p1,"launcherWidth"),$v_6=CUI.Root.$1K($p1,"launcherHeight"),$v_7=CUI.Root.$1K($p1,"flyOutWidth"),$v_8=CUI.Root.$1K($p1,"flyOutHeight"),$v_9=CUI.Root.$1K($p1,"flyOutRealHeight"),$v_A=CUI.Root.$1K($p1,"viewportWidth"),$v_B=CUI.Root.$1K($p1,"viewportHeight"),$v_C=CUI.Root.$1K($p1,"viewableLeft"),$v_D=CUI.Root.$1K($p1,"viewableTop"),$v_E=!this.$0_0._textDirection,$v_F=false,$v_G=false,$v_H=$p0.getAttribute("mscui:scrollable"),$v_I=!CUI.ScriptUtility.isNullOrUndefined($v_H)&&$v_H==="true";if($p2){if($v_E){$v_1=$v_3+$v_5;$v_1+=2}else $v_1=$v_3-$v_7;$v_2=$v_4}else{if($v_E)$v_1=$v_3;else $v_1=$v_3+$v_5-$v_7;$v_2=$v_4+$v_6;var $v_J=$v_5>=2?$v_5-2:$v_5;if($v_J>$v_7)$v_7=$v_J;$p0.style.minWidth=$v_J+"px"}if(this.$30_1){$v_2+=$v_D;$v_1+=$v_C}$p0.style.top=$v_2+"px";$p0.style.left=$v_1+"px";if($v_7<=$v_A)if($v_1+$v_7>$v_C+$v_A){if($p2&&$v_E&&$v_3-$v_7>$v_C)$v_1=$v_3-$v_7;else{$v_1=$v_C+$v_A-$v_7-5;$v_F=true}$v_0=true}else if($v_1<$v_C){if($p2&&!$v_E&&$v_3+$v_5+$v_7<$v_C+$v_A)$v_1=$v_3+$v_5;else{$v_1=$v_C+5;$v_G=true}$v_0=true}else $v_0=false;else if($v_E){$v_1=$v_C;$v_0=true}else{$v_1=$v_C+$v_A-$v_7;$v_0=true}if($v_0){$p0.style.left=$v_1+"px";$v_0=false}if($v_2+$v_9>$v_D+$v_B){var $v_K=$v_2,$v_L=$v_D+$v_B-$v_2;$v_2=$v_4-$v_9;if(this.$30_1)$v_2+=$v_D;var $v_M=$v_4;if(!this.$30_1)$v_M-=$v_D;$v_0=true;if($v_M<$v_9){var $v_N=$v_7+22;if($v_M<$v_L){$v_2=$v_K;$p0.style.maxHeight=$v_L-5+"px";if(!$v_I){$p0.style.overflowY="scroll";$p0.style.width=$v_N+"px"}if($v_F&&$v_E){$v_1-=27;$p0.style.left=$v_1+"px"}else if($v_G&&!$v_E){$v_1+=27;$p0.style.left=$v_1+"px"}$v_0=false}else{$p0.style.maxHeight=$v_M-5+"px";if(!$v_I){$p0.style.overflowY="scroll";$p0.style.width=$v_N+"px"}if($v_F&&$v_E){$v_1-=27;$p0.style.left=$v_1+"px"}else if($v_G&&!$v_E){$v_1+=27;$p0.style.left=$v_1+"px"}}!$v_I&&$p0.setAttribute("mscui:scrollable","true")}else if($v_I){$p0.style.maxHeight="none";$p0.style.overflowY="visible";$p0.style.width="auto";$p0.setAttribute("mscui:scrollable","false")}}else{if($v_I){$p0.style.maxHeight="none";$p0.style.overflowY="visible";$p0.style.width="auto";$p0.setAttribute("mscui:scrollable","false")}$v_0=false}if($v_0){$p0.style.top=$v_2+"px";$v_0=false}},$82_1:function($p0,$p1){var $v_0={};if(CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined($p1))return $v_0;$v_0["launcherWidth"]=$p1.offsetWidth;$v_0["launcherHeight"]=$p1.offsetHeight;var $v_1=$p1.offsetTop,$v_2=$p1.offsetLeft;if(!CUI.ScriptUtility.isNullOrUndefined($p1.offsetParent))for(var $v_3=$p1.offsetParent;!CUI.ScriptUtility.isNullOrUndefined($v_3);$v_3=$v_3.offsetParent){$v_1+=$v_3.offsetTop;$v_2+=$v_3.offsetLeft}else{$v_1=$p1.offsetTop;$v_2=$p1.offsetLeft}if(!CUI.ScriptUtility.isNullOrUndefined($p1.parentNode)){for(var $v_4=0,$v_5=0,$v_6=$p1.parentNode;!CUI.ScriptUtility.isNullOrUndefined($v_6);$v_6=$v_6.parentNode){if($v_6.scrollTop>0)$v_4+=$v_6.scrollTop;if($v_6.scrollLeft>0)if($v_6===document.documentElement&&(CUI.Utility.$3L()||CUI.Utility.get_$68())&&this.$0_0._textDirection===1)$v_5+=document.body.scrollLeft;else $v_5+=$v_6.scrollLeft}if($v_1>=$v_4)$v_1-=$v_4;if($v_2>=$v_5)$v_2-=$v_5}$v_0["launcherTop"]=$v_1;$v_0["launcherLeft"]=$v_2;if($p0){$v_0["flyOutWidth"]=$p0.offsetWidth;$v_0["flyOutHeight"]=$p0.offsetHeight;$v_0["flyOutRealHeight"]=$p0.scrollHeight;$v_0["viewportWidth"]=CUI.Utility.$3I();$v_0["viewportHeight"]=CUI.Utility.$43();if(CUI.ScriptUtility.isNullOrUndefined($v_0["viewportWidth"])){$v_0["viewportWidth"]=document.documentElement.clientWidth;$v_0["viewportHeight"]=document.documentElement.clientHeight}if(CUI.ScriptUtility.isNullOrUndefined($v_0["viewportWidth"])){$v_0["viewportWidth"]=document.body.clientWidth;$v_0["viewportHeight"]=document.body.clientHeight}$v_0["viewableTop"]=document.documentElement.scrollTop;$v_0["viewableLeft"]=document.documentElement.scrollLeft;if(CUI.ScriptUtility.isNullOrUndefined($v_0["viewableTop"])){$v_0["viewableTop"]=window.pageYOffset;$v_0["viewableLeft"]=window.pageXOffset}if(CUI.ScriptUtility.isNullOrUndefined($v_0["viewableTop"])){$v_0["viewableTop"]=document.body.scrollTop;$v_0["viewableLeft"]=document.body.scrollLeft}if((CUI.Utility.$3L()||CUI.Utility.get_$68())&&this.$0_0._textDirection===1)$v_0["viewableLeft"]=document.body.scrollLeft}return $v_0}};CUI.ButtonDock=function($p0,$p1,$p2){CUI.ButtonDock.initializeBase(this,[$p0,$p1,"",""]);this.$1N_1=$p2.Alignment};CUI.ButtonDock.prototype={$1N_1:null,$1i_0:function(){this.ensureDOMElementAndEmpty();this.appendChildrenToElement(this.get_$2_0());CUI.Component.prototype.$1i_0.call(this)},appendChildrenToElement:function($p0){var $$enum_1=this.$6_0.getEnumerator();while($$enum_1.moveNext()){var $v_0=$$enum_1.get_current();$v_0.$1g_0();switch(this.$1N_1){case "Left":CUI.Utility.ensureCSSClassOnElement($v_0.get_$2_0(),"ms-cui-toolbar-button-left");break;case "Center":CUI.Utility.ensureCSSClassOnElement($v_0.get_$2_0(),"ms-cui-toolbar-button-center");break;case "Right":CUI.Utility.ensureCSSClassOnElement($v_0.get_$2_0(),"ms-cui-toolbar-button-right");break;default:throw Error.argumentOutOfRange(this.$1N_1)}$p0.appendChild($v_0.get_$2_0());$v_0.$2U_0()}},ensureCorrectChildType:function($p0){if(!CUI.ControlComponent.isInstanceOfType($p0))throw Error.create("Only children of type ControlComponent can be added to a ButtonDock.")},get_cssClass:function(){switch(this.$1N_1){case "Left":return "ms-cui-toolbar-buttondock alignleft";case "Center":return "ms-cui-toolbar-buttondock aligncenter";case "Right":return "ms-cui-toolbar-buttondock alignright";default:throw Error.argumentOutOfRange(this.$1N_1)}},get_visibleInDOM:function(){return true},get_alignment:function(){return this.$1N_1}};CUI.Toolbar=function(id,properties,builder,hasJewel){CUI.Toolbar.initializeBase(this,[id,properties]);this.$3R_2=builder;this.$4e_2=hasJewel};CUI.Toolbar.prototype={$3g_2:null,$b_2:null,$c_2:null,$o_2:null,$q_2:null,$r_2:null,$3R_2:null,$4e_2:false,_jewel:null,get_jewel:function(){return this._jewel},set_jewel:function(value){this._jewel=value;return value},refresh:function(){this.$1i_0();CUI.Root.prototype.$1i_0.call(this)},$1i_0:function(){var $v_0=this.$5_1,$v_1=!CUI.ScriptUtility.isNullOrUndefined($v_0.Size)||$v_0.Size==="TwoRow";CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())&&this.createToolbarStructure($v_1);this.set_$2_0(CUI.Utility.removeChildNodes(this.get_$2_0()));if($v_1){this.get_$2_0().appendChild(this.$3g_2);this.appendChildrenToElement(this.$c_2)}else{this.$4e_2&&this.get_$2_0().appendChild(this.$o_2);this.appendChildrenToElement(this.get_$2_0())}this.$h_0=false},createToolbarStructure:function(twoRow){if(this.$4e_2){this.$o_2=CUI.Utility.$3("div");this.$o_2.id="jewelcontainer";this.$o_2.className="ms-cui-jewel-container";this.$o_2.style.display="none"}if(twoRow){this.$b_2=CUI.Utility.$3("div");this.$b_2.className="ms-cui-topBar1";this.$b_2.style.display="none";this.$c_2=CUI.Utility.$3("div");this.$c_2.className="ms-cui-topBar2";this.$4e_2&&this.$c_2.appendChild(this.$o_2);this.$3g_2=CUI.Utility.$3("div");this.$3g_2.className="ms-cui-ribbonTopBars";this.$3g_2.appendChild(this.$b_2);this.$3g_2.appendChild(this.$c_2);this.$q_2=$get(this.$2X_1+"-QATRowCenter");this.$r_2=$get(this.$2X_1+"-QATRowRight");if(!CUI.ScriptUtility.isNullOrUndefined(this.$q_2)){this.$q_2.parentNode.removeChild(this.$q_2);this.$b_2.appendChild(this.$q_2);this.$q_2.style.display="inline-block";this.$b_2.style.display="block";CUI.Utility.$2C(this.$q_2,true,false)}if(!CUI.ScriptUtility.isNullOrUndefined(this.$r_2)){this.$r_2.parentNode.removeChild(this.$r_2);this.$b_2.appendChild(this.$r_2);this.$r_2.style.display="inline-block";this.$b_2.style.display="block";CUI.Utility.$2C(this.$r_2,true,false)}}this.$1g_0()},$49_0:function(){this._jewel&&this._jewel.pollForStateAndUpdate();CUI.Root.prototype.$49_0.call(this)},ensureGlobalDisablingRemoved:function(){CUI.Root.prototype.ensureGlobalDisablingRemoved.call(this);this._jewel&&this._jewel.set_enabled(true)},ensureCorrectChildType:function(child){if(!CUI.ButtonDock.isInstanceOfType(child))throw Error.create("Only children of type ButtonDock can be added to a Toolbar");var $v_0=child;if($v_0.$1N_1==="Center"){var $$enum_2=this.$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.$1N_1==="Center")throw Error.create("Can't add a centered buttondock because one is already present.")}}},get_cssClass:function(){return "ms-cui-toolbar-toolbar "+CUI.Root.prototype.get_cssClass.call(this)},get_domElementTagName:function(){return "div"},get_rootType:function(){return "Toolbar"},get_$FK_2:function(){return this.get_$19_1()},set_$FK_2:function($p0){this.set_$19_1($p0);return $p0},$CT_2:function($p0,$p1){var $v_0=$p0.attrs,$v_1=new CUI.ButtonDock(this.$0_0,$v_0.Id,$v_0);return $v_1},$Bk_2:function($p0){if(!this.$4e_2)return;this.$o_2.style.display="block";var $v_0=new CUI.DataNodeWrapper($p0),$v_1=new CUI.JewelBuildContext;$v_1.jewelId=$v_0.get_attributes()["Id"];var $v_2=new CUI.JewelBuildOptions;$v_2.trimmedIds=this.$3R_2.$u_0.trimmedIds;var $v_3=new CUI.JewelBuilder($v_2,this.$o_2,this.$3R_2.$1R_0);$v_3.$Bz_1($p0,$v_1);this._jewel=$v_3.get_jewel()},$1g_0:function(){CUI.Root.prototype.$1g_0.call(this);this.get_$2_0().setAttribute("role","toolbar")},setFocusOnJewel:function(){this._jewel&&this._jewel.$DM_2()},dispose:function(){this.$o_2=null;this.$q_2=null;this.$r_2=null;this.$3g_2=null;this.$b_2=null;this.$c_2=null;CUI.Root.prototype.dispose.call(this)}};CUI.ToolbarBuildContext=function(){CUI.ToolbarBuildContext.initializeBase(this)};CUI.ToolbarBuildContext.prototype={toolbar:null};CUI.ToolbarBuildOptions=function(){CUI.ToolbarBuildOptions.initializeBase(this)};CUI.ToolbarBuilder=function(options,elmPlaceholder,rootBuildClient){this.$$d_$ET_1=Function.createDelegate(this,this.$ET_1);CUI.ToolbarBuilder.initializeBase(this,[options,elmPlaceholder,rootBuildClient]);if(CUI.ScriptUtility.isNullOrUndefined(elmPlaceholder))throw Error.create("Toolbar placeholder DOM element is null or undefined.")};CUI.ToolbarBuilder.prototype={get_toolbar:function(){return this.$0_0},set_toolbar:function(value){this.$0_0=value;return value},buildToolbar:function(){var $v_0=new CUI.ToolbarBuildContext,$v_1=new CUI.DataQuery;$v_1.id="toolbar";$v_1.queryType=1;$v_1.handler=this.$$d_$ET_1;$v_1.data=$v_0;this.$v_0.runQuery($v_1)},$ET_1:function($p0){var $v_0=$p0.contextData;$p0.queryData=this.applyDataExtensions($p0.queryData);this.set_toolbar(this.$CE_1($p0.queryData,$v_0));this.get_toolbar().set_$FK_2(this);this.$1R_0.onComponentCreated(this.get_toolbar(),this.get_toolbar().$4_0);this.get_toolbar().$1i_0();this._elmPlaceholder.appendChild(this.get_toolbar().get_$2_0());var $$enum_2=this.get_toolbar().$6_0.getEnumerator();while($$enum_2.moveNext()){var $v_1=$$enum_2.get_current();if($v_1.$1N_1==="Left"){var $v_2=$get("jewelcontainer");if($v_2)if(!this.get_toolbar()._textDirection)$v_1.get_$2_0().style.left=$v_2.offsetWidth+"px";else $v_1.get_$2_0().style.right=$v_2.offsetWidth+"px";break}}CUI.Utility.ensureCSSClassOnElement(this._elmPlaceholder,"loaded");this.$1R_0.onComponentBuilt(this.get_toolbar(),this.get_toolbar().$4_0)},$CE_1:function($p0,$p1){var $v_0=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0,"Toolbar");if(CUI.ScriptUtility.isNullOrUndefined($v_0))throw Error.create("No toolbar element was present in the data");var $v_1=new CUI.DataNodeWrapper($v_0),$v_2=null!==CUI.DataNodeWrapper.getFirstChildNodeWithName($p0,"Jewel");this.set_toolbar(new CUI.Toolbar($v_1.get_attributes()["Id"],$v_1.get_attributes(),this,$v_2));this.get_toolbar().$2X_1=this.$u_0.clientID;this.get_toolbar().set_useDataCookie(true);this.get_toolbar().$1i_0();$v_2&&this.get_toolbar().$Bk_2($p0);for(var $v_3=CUI.DataNodeWrapper.getNodeChildren(CUI.DataNodeWrapper.getFirstChildNodeWithName($v_1.$d_0,"ButtonDocks")),$v_4=0;$v_4<$v_3.length;$v_4++){var $v_5=this.$Bq_1($v_3[$v_4],$p1);this.get_toolbar().addChild($v_5)}return this.get_toolbar()},$Bq_1:function($p0,$p1){for(var $v_0=new CUI.DataNodeWrapper($p0),$v_1=this.get_toolbar().$CT_2($p0,$p1),$v_2=CUI.DataNodeWrapper.getFirstChildNodeWithName($p0,"Controls"),$v_3=CUI.DataNodeWrapper.getNodeChildren($v_2),$v_4=0;$v_4<$v_3.length;$v_4++){if(this.isNodeTrimmed($v_3[$v_4]))continue;var $v_5=this.$CD_1($v_3[$v_4],$p1);$v_1.addChild($v_5)}return $v_1},$CD_1:function($p0,$p1){var $v_0=null,$v_1=new CUI.DataNodeWrapper($p0),$v_2=$v_1.get_name(),$v_3=$v_1.get_attributes()["DisplayMode"];switch($v_2){case "Button":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode(CUI.ScriptUtility.isNullOrEmptyString($v_3)?"Small":$v_3);case "CheckBox":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode(CUI.ScriptUtility.isNullOrEmptyString($v_3)?"Small":$v_3);case "ComboBox":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode("Medium");case "FlyoutAnchor":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode(CUI.ScriptUtility.isNullOrEmptyString($v_3)?"Medium":$v_3);case "Label":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode(CUI.ScriptUtility.isNullOrEmptyString($v_3)?"Small":$v_3);case "Separator":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode("Small");case "TextBox":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode(CUI.ScriptUtility.isNullOrEmptyString($v_3)?"Medium":$v_3);case "ToggleButton":$v_0=this.$1f_0($p0,$p1);return $v_0.createComponentForDisplayMode(CUI.ScriptUtility.isNullOrEmptyString($v_3)?"Small":$v_3);default:throw Error.create("Invalid control type.")}}};CUI.ToolTip=function($p0,$p1,$p2,$p3,$p4){this.$$d_$E4_1=Function.createDelegate(this,this.$E4_1);CUI.ToolTip.initializeBase(this,[$p0,$p1,$p2,$p3]);this.$5_1=$p4;if(!CUI.ScriptUtility.isNullOrEmptyString($p4.ToolTipShortcutKey))if(!this.$0_0._textDirection)this.$1T_0=String.format("{0} ({1})",this.get_title(),this.$5_1.ToolTipShortcutKey);else this.$1T_0=String.format("({1}) {0}",this.get_title(),this.$5_1.ToolTipShortcutKey)};CUI.ToolTip.prototype={$W_1:null,$P_1:null,$D_1:null,$1X_1:null,$5K_1:null,$4R_1:null,$5Q_1:null,$2v_1:null,$6a_1:null,$4S_1:null,$2a_1:null,$4T_1:null,$2H_1:null,$6b_1:null,$4U_1:null,$4V_1:null,$5p_1:null,$5q_1:null,$7W_1:null,$7X_1:null,$7Y_1:null,$5_1:null,$1C_1:null,$1i_0:function(){this.get_needsDelayIniting()&&this.doDelayedInit();this.ensureDOMElementAndEmpty();this.get_$2_0().setAttribute("role","tooltip");this.get_$2_0().setAttribute("aria-hidden","true");if(CUI.ScriptUtility.isNullOrUndefined(this.$W_1)){this.$W_1=CUI.Utility.$3("div");this.$W_1.className="ms-cui-tooltip-body"}else this.$W_1=CUI.Utility.removeChildNodes(this.$W_1);this.get_$2_0().appendChild(this.$W_1);if(CUI.ScriptUtility.isNullOrUndefined(this.$P_1)){this.$P_1=CUI.Utility.$3("div");this.$P_1.className="ms-cui-tooltip-glow";this.$W_1.appendChild(this.$P_1)}else this.$P_1=CUI.Utility.removeChildNodes(this.$P_1);if(CUI.ScriptUtility.isNullOrUndefined(this.$D_1)){this.$D_1=CUI.Utility.$3("h1");if(this.$1T_0.length>100)CUI.UIUtility.setInnerText(this.$D_1,this.$1T_0.substr(0,100));else CUI.UIUtility.setInnerText(this.$D_1,this.get_title());this.$P_1.appendChild(this.$D_1)}if(CUI.ScriptUtility.isNullOrUndefined(this.$5K_1)&&!CUI.ScriptUtility.isNullOrEmptyString(this.$5_1.ToolTipImage32by32)){this.$5K_1=CUI.Utility.$3("img");this.$4R_1=CUI.Utility.$k(2,4,this.$5_1.ToolTipImage32by32,this.$5_1.ToolTipImage32by32Class,this.$5K_1,true,false,this.$5_1.ToolTipImage32by32Top,this.$5_1.ToolTipImage32by32Left);this.$4R_1.className=this.$4R_1.className+" ms-cui-tooltip-bitmap ";this.$P_1.appendChild(this.$4R_1)}var $v_0=this.$5_1.ToolTipSelectedItemTitle,$v_1=this.get_description();if(CUI.ScriptUtility.isNullOrUndefined(this.$1X_1)&&(!CUI.ScriptUtility.isNullOrEmptyString($v_1)||!CUI.ScriptUtility.isNullOrEmptyString($v_0))){this.$1X_1=CUI.Utility.$3("div");this.$1X_1.className="ms-cui-tooltip-description";if(!CUI.ScriptUtility.isNullOrUndefined(this.$5_1.ToolTipImage32by32))this.$1X_1.style.width="80%";this.$P_1.appendChild(this.$1X_1);var $v_2=this.$0_0.$5_1.ToolTipSelectedItemTitlePrefix;if(!CUI.ScriptUtility.isNullOrEmptyString($v_0)&&!CUI.ScriptUtility.isNullOrEmptyString($v_2)){var $v_3=String.format($v_2,$v_0);this.$5Q_1=CUI.Utility.$3("p");CUI.Utility.$2q(this.$5Q_1,$v_3);this.$1X_1.appendChild(this.$5Q_1);this.$7Y_1=CUI.Utility.$3("br");this.$1X_1.appendChild(this.$7Y_1)}if(!CUI.ScriptUtility.isNullOrEmptyString($v_1))if($v_1.length>512)this.$1X_1.innerHTML=this.$1X_1.innerHTML+CUI.Utility.$AT($v_1.substr(0,512),true);else this.$1X_1.innerHTML=this.$1X_1.innerHTML+CUI.Utility.$AT($v_1,true)}if(CUI.ScriptUtility.isNullOrUndefined(this.$2v_1)&&!CUI.ScriptUtility.isNullOrUndefined(this.$1C_1)&&!CUI.ScriptUtility.isNullOrEmptyString(this.$1C_1.Title)){this.$5p_1=CUI.Utility.$3("div");this.$5p_1.className="ms-cui-tooltip-clear";this.$P_1.appendChild(this.$5p_1);this.$7W_1=CUI.Utility.$3("hr");this.$P_1.appendChild(this.$7W_1);this.$2a_1=CUI.Utility.$3("div");this.$2a_1.className="ms-cui-tooltip-footer";this.$P_1.appendChild(this.$2a_1);this.$4T_1=CUI.Utility.$3("div");CUI.Utility.$2q(this.$4T_1,this.$1C_1.Title);this.$6a_1=CUI.Utility.$3("img");this.$4S_1=CUI.Utility.$k(2,3,this.$1C_1.Icon,this.$1C_1.IconClass,this.$6a_1,true,false,this.$1C_1.IconTop,this.$1C_1.IconLeft);this.$4S_1.style.verticalAlign="top";if(!this.$0_0._textDirection){this.$2a_1.appendChild(this.$4S_1);this.$2a_1.appendChild(this.$4T_1)}else{this.$2a_1.appendChild(this.$4T_1);this.$2a_1.appendChild(this.$4S_1)}if(!CUI.ScriptUtility.isNullOrUndefined(this.$1C_1.Description)){this.$2v_1=CUI.Utility.$3("div");this.$2v_1.className="ms-cui-tooltip-description";this.$2v_1.style.width="90%";CUI.Utility.$2q(this.$2v_1,this.$1C_1.Description);this.$P_1.appendChild(this.$2v_1)}}if(CUI.ScriptUtility.isNullOrUndefined(this.$2H_1)&&!CUI.ScriptUtility.isNullOrUndefined(this.$0_0.$5_1.ToolTipFooterImage16by16)&&!CUI.ScriptUtility.isNullOrUndefined(this.$0_0.$5_1.ToolTipFooterText)&&(!CUI.ScriptUtility.isNullOrUndefined(this.$1C_1)&&!CUI.ScriptUtility.isNullOrEmptyString(this.$1C_1.HelpKeyWord)||!CUI.ScriptUtility.isNullOrEmptyString(this.$5_1.ToolTipHelpKeyWord))){this.$5q_1=CUI.Utility.$3("div");this.$5q_1.className="ms-cui-tooltip-clear";this.$P_1.appendChild(this.$5q_1);this.$7X_1=CUI.Utility.$3("hr");this.$P_1.appendChild(this.$7X_1);this.$2H_1=CUI.Utility.$3("div");this.$2H_1.className="ms-cui-tooltip-footer";this.$P_1.appendChild(this.$2H_1);this.$4V_1=CUI.Utility.$3("div");CUI.Utility.$2q(this.$4V_1,this.$0_0.$5_1.ToolTipFooterText);this.$6b_1=CUI.Utility.$3("img");this.$4U_1=CUI.Utility.$k(2,3,this.$0_0.$5_1.ToolTipFooterImage16by16,this.$0_0.$5_1.ToolTipFooterImage16by16Class,this.$6b_1,true,false,this.$0_0.$5_1.ToolTipFooterImage16by16Top,this.$0_0.$5_1.ToolTipFooterImage16by16Left);this.$4U_1.style.verticalAlign="top";if(!this.$0_0._textDirection){this.$2H_1.appendChild(this.$4U_1);this.$2H_1.appendChild(this.$4V_1)}else{this.$2H_1.appendChild(this.$4V_1);this.$2H_1.appendChild(this.$4U_1)}}this.appendChildrenToElement(this.$W_1);CUI.Component.prototype.$1i_0.call(this)},$Ci_1:function(){this.$1i_0();this.get_$2_0().style.visibility="hidden";this.get_$2_0().style.position="absolute";this.get_$2_0().style.top="0px";this.get_$2_0().style.left="0px";document.body.appendChild(this.get_$2_0());this.$El_1();if(Sys.Browser.agent===Sys.Browser.InternetExplorer){CUI.Utility.$Aw(this.$0_0.get_$6K_1(),this.get_$2_0());this.$0_0.get_$6K_1().style.visibility="visible";this.$0_0.get_$6K_1().style.border="none"}this.get_$2_0().style.visibility="visible";this.set_visible(true);this.get_$2_0().setAttribute("aria-hidden","false");return true},$AP_1:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$2_0())){this.get_$2_0().style.visibility="hidden";this.get_$2_0().setAttribute("aria-hidden","true")}if(Sys.Browser.agent===Sys.Browser.InternetExplorer)this.$0_0.get_$6K_1().style.visibility="hidden";this.set_visible(false)},get_cssClass:function(){return "ms-cui-tooltip"},get_innerDiv:function(){return this.$P_1},set_innerDiv:function($p0){this.$P_1=$p0;return $p0},$El_1:function(){var $v_0=this.get_$2_0(),$v_1=this.$M_0.get_$2_0();if(CUI.ScriptUtility.isNullOrUndefined($v_0)||CUI.ScriptUtility.isNullOrUndefined($v_1))return;$v_0.style.top="0px";$v_0.style.left="0px";var $v_2=this.$0_0.$82_1($v_0,$v_1),$v_3=CUI.Root.$1K($v_2,"flyOutWidth");if(this.$M_0.get_$9g_0()>this.$0_0.get_$9g_0()&&this.$M_0.get_$9g_0()+this.$M_0.get_$CM_0()<this.$0_0.get_$9g_0()+this.$0_0.get_$CM_0()){$v_2["launcherTop"]=this.$0_0.get_$9g_0();$v_2["launcherHeight"]=this.$0_0.get_$CM_0()}else{var $v_4=CUI.Root.$1K($v_2,"launcherLeft"),$v_5=CUI.Root.$1K($v_2,"launcherTop");$v_4+=30;$v_5+=10;$v_2["launcherLeft"]=$v_4;$v_2["launcherTop"]=$v_5}this.$0_0.$8b_1($v_0,$v_2,false);$v_0.style.minWidth=$v_3+"px"},$E4_1:function($p0){this.$0_0&&this.$0_0.$2m_1()},$Ak_1:function($p0){if($p0)if($p0.rawEvent){var $v_0=113,$v_1=123;if($p0.rawEvent.keyCode===$v_0||$p0.rawEvent.keyCode===$v_1){var $v_2=null;if(!CUI.ScriptUtility.isNullOrUndefined(this.$5_1.ToolTipHelpKeyWord))$v_2=this.$5_1.ToolTipHelpKeyWord;if(!CUI.ScriptUtility.isNullOrUndefined(this.$1C_1)&&!CUI.ScriptUtility.isNullOrEmptyString(this.$1C_1.HelpKeyWord))$v_2=this.$1C_1.HelpKeyWord;if(!CUI.ScriptUtility.isNullOrUndefined($v_2)){var $v_3={};$v_3["HelpKeyword"]=$v_2;!CUI.ScriptUtility.isNullOrUndefined(this.$0_0.$5_1.ToolTipHelpCommand)&&this.raiseCommandEvent(this.$0_0.$5_1.ToolTipHelpCommand,1,$v_3)}$p0.preventDefault();$p0.stopPropagation();$p0.rawEvent.cancelBubble=true;$p0.rawEvent.returnValue=false}else this.$0_0.$2m_1()}},dispose:function(){CUI.Component.prototype.dispose.call(this);this.$W_1=null;this.$1X_1=null;this.$5K_1=null;this.$4R_1=null;this.$2v_1=null;this.$6a_1=null;this.$4S_1=null;this.$2a_1=null;this.$4T_1=null;this.$2H_1=null;this.$6b_1=null;this.$4U_1=null;this.$4V_1=null;this.$P_1=null;this.$D_1=null;this.$5Q_1=null;this.$5p_1=null;this.$5q_1=null;this.$7W_1=null;this.$7X_1=null;this.$7Y_1=null;this.$5_1=null}};CUI.Unit=function($p0,$p1,$p2,$p3,$p4,$p5){this.$5c_0=$p0;this.$59_0=$p1;this.$4n_0=$p2;this.$4l_0=$p3;this.$6V_0=$p4;this.$7a_0=$p5};CUI.Unit.prototype={$5c_0:null,$59_0:null,$4n_0:0,$4l_0:0,$6V_0:0,$7a_0:0,$7k_0:function($p0){if(!$p0)return false;for(var $v_0=0;$v_0<this.$59_0.length;$v_0++)if(this.$59_0[$v_0].toLowerCase()===$p0.toLowerCase())return true;return false},$FQ_0:function($p0){if(typeof $p0!=="number")return CUI.Unit.$8E;if($p0<this.$4n_0)return 2;if($p0>this.$4l_0)return 3;var $v_0=$p0.toString(),$v_1=$v_0.indexOf(".");if($v_1>-1){var $v_2=$v_0.substr($v_1+1);if($v_2.length>this.$6V_0)return 1}return 0},get_$5z_0:function(){return this.$59_0[0]}};CUI.Utility=function(){};CUI.Utility.removeChildNodes=function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))return null;var $v_0=$p0.parentNode;if($v_0){var $v_1=$p0.cloneNode(false);$v_0.replaceChild($v_1,$p0);return $v_1}else{var $v_2=$p0.firstChild,$v_3;while($v_2){$v_3=$v_2.nextSibling;$p0.removeChild($v_2);$v_2=$v_3}return $p0}};CUI.Utility.removeChildNodesSlow=function($p0){while($p0.hasChildNodes())$p0.removeChild($p0.firstChild)};CUI.Utility.ensureCSSClassOnElement=function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p0))return;var $v_0=$p0.className;if(!CUI.ScriptUtility.isNullOrUndefined($v_0)&&$v_0.indexOf($p1)!==-1)return;var $v_1=$v_0.trim()+" "+$p1;$v_1=$v_1.trim();$p0.className=$v_1};CUI.Utility.isDescendantOf=function($p0,$p1){while(!CUI.ScriptUtility.isNullOrUndefined($p1)){try{if($p1.nodeName.toLowerCase()==="body")break}catch($$e_2){if($p1===$p0)return true;break}if($p1===$p0)return true;$p1=$p1.parentNode}return false};CUI.Utility.removeCSSClassFromElement=function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined($p1)||CUI.ScriptUtility.isNullOrUndefined($p0.className))return;var $v_0=$p0.className;if($v_0!==$v_0.replace($p1,""))$p0.className=$v_0.replace($p1,"")};CUI.Utility.setEnabledOnElement=function($p0,$p1){if($p1)CUI.Utility.enableElement($p0);else CUI.Utility.disableElement($p0)};CUI.Utility.enableElement=function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))return;CUI.Utility.removeCSSClassFromElement($p0,"ms-cui-disabled")};CUI.Utility.disableElement=function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))return;CUI.Utility.ensureCSSClassOnElement($p0,"ms-cui-disabled")};CUI.Utility.setDisabledAttribute=function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p0))return;$p0.disabled=$p1};CUI.Utility.$1v=function($p0){$p0.setAttribute("href","javascript:;");$p0.setAttribute("onclick","return false;")};CUI.Utility.$4z=function(){var $v_0=CUI.Utility.$3("a");$v_0.href="javascript:;";$v_0.setAttribute("onclick","return false;");return $v_0};CUI.Utility.$AC=function($p0){var $v_0=$p0,$v_1=0,$v_2=0,$v_3=$p0.offsetWidth,$v_4=$p0.offsetHeight;while(!CUI.ScriptUtility.isNullOrUndefined($v_0)&&!CUI.ScriptUtility.isNullOrUndefined($v_0.nodeName)&&$v_0.nodeName.toLowerCase()!=="body"){var $v_5=$v_0.clientLeft;if(CUI.ScriptUtility.isNullOrUndefined($v_5))$v_5=0;var $v_6=$v_0.clientTop;if(CUI.ScriptUtility.isNullOrUndefined($v_6))$v_6=0;$v_1+=$v_0.offsetLeft+$v_5;$v_2+=$v_0.offsetTop+$v_6;$v_0=$v_0.offsetParent}return new Sys.UI.Bounds($v_1,$v_2,$v_3,$v_4)};CUI.Utility.$2q=function($p0,$p1){CUI.UIUtility.setInnerText($p0,$p1)};CUI.Utility.$AT=function($p0,$p1){var $v_0=new Sys.StringBuilder;if(CUI.ScriptUtility.isNullOrEmptyString($p0)||0===$p0.length)return null;var $v_1=false,$v_2=0,$v_3=0,$v_4=0,$v_5=$p0.length;while($v_4<$v_5){var $v_6,$v_7=$p0.charCodeAt($v_4);if($v_7<63)$v_6=CUI.Utility.$AS[$v_7];else if($v_7>=160&&$v_7<=255)$v_6=-2;else $v_6=0;if($v_6){if($v_3>0){$v_0.append($p0.substring($v_2,$v_2+$v_3));$v_3=0}$v_2=$v_4+1;if($v_6===-2){$v_0.append("&#");$v_0.append($v_7.toString());$v_0.append(";")}else if($v_6===8){var $v_8=$p0.charAt($v_4+1);if($v_8===" "||$v_1)$v_0.append(CUI.Utility.$1A[$v_6]);else $v_0.append(" ")}else{if($v_6===2&&$p1){if($v_4+5<$v_5&&$p0.charAt($v_4+1)==="n"&&$p0.charAt($v_4+2)==="b"&&$p0.charAt($v_4+3)==="s"&&$p0.charAt($v_4+4)==="p"&&$p0.charAt($v_4+5)===";"){$v_0.append(CUI.Utility.$1A[8]);$v_4+=6;$v_2+=5;continue}if($v_4+5<$v_5&&$p0.charAt($v_4+1)==="#"&&$p0.charAt($v_4+2)==="1"&&$p0.charAt($v_4+3)==="6"&&$p0.charAt($v_4+4)==="0"&&$p0.charAt($v_4+5)===";"){$v_0.append(CUI.Utility.$1A[8]);$v_4+=6;$v_2+=5;continue}}else if($v_6===4&&$p1){var $v_9,$v_A,$v_B;$v_9=$p0.charAt($v_4+1);if("b"===$v_9||"B"===$v_9){$v_A=$p0.charAt($v_4+2);if(">"===$v_A){$v_0.append(CUI.Utility.$1A[9]);$v_4+=3;$v_2+=2;continue}else if("r"===$v_A||"R"===$v_A){$v_B=$p0.charAt($v_4+3);if(">"===$v_B){$v_0.append(CUI.Utility.$1A[7]);$v_4+=4;$v_2+=3;continue}if("/"===$v_B){var $v_C=$p0.charAt($v_4+4);if($v_C===">"){$v_0.append(CUI.Utility.$1A[7]);$v_4+=5;$v_2+=4;continue}}if(" "===$v_B){var $v_D=$p0.charAt($v_4+4),$v_E=$p0.charAt($v_4+5);if($v_D==="/"&&$v_E===">"){$v_0.append(CUI.Utility.$1A[7]);$v_4+=6;$v_2+=5;continue}}}}else if("i"===$v_9||"I"===$v_9){$v_A=$p0.charAt($v_4+2);if(">"===$v_A){$v_0.append(CUI.Utility.$1A[10]);$v_4+=3;$v_2+=2;continue}}else if("p"===$v_9||"P"===$v_9){$v_A=$p0.charAt($v_4+2);if(">"===$v_A){$v_0.append(CUI.Utility.$1A[11]);$v_4+=3;$v_2+=2;continue}}else if("u"===$v_9||"U"===$v_9){$v_A=$p0.charAt($v_4+2);if(">"===$v_A){$v_0.append(CUI.Utility.$1A[12]);$v_4+=3;$v_2+=2;continue}}else if("/"===$v_9){$v_B=$p0.charAt($v_4+3);if(">"===$v_B){$v_A=$p0.charAt($v_4+2);if("b"===$v_A||"B"===$v_A){$v_0.append(CUI.Utility.$1A[13]);$v_4+=4;$v_2+=3;continue}else if("i"===$v_A||"I"===$v_A){$v_0.append(CUI.Utility.$1A[14]);$v_4+=4;$v_2+=3;continue}else if("p"===$v_A||"P"===$v_A){$v_0.append(CUI.Utility.$1A[15]);$v_4+=4;$v_2+=3;continue}else if("u"===$v_A||"U"===$v_A){$v_0.append(CUI.Utility.$1A[16]);$v_4+=4;$v_2+=3;continue}}}}else if($v_6===7)$v_1=true;else $v_1=false;$v_0.append(CUI.Utility.$1A[$v_6])}}else{$v_1=false;$v_3++}$v_4++}$v_2<$v_5&&$v_0.append($p0.substring($v_2,$v_5));return $v_0.toString()};CUI.Utility.$2C=function($p0,$p1,$p2){if(CUI.ScriptUtility.isNullOrUndefined($p0)||$p0.nodeName==="#text")return;if($p1)$p0.setAttribute("unselectable","on");else $p0.setAttribute("unselectable","off");if($p2){var $v_0=$p0.firstChild;while($v_0){CUI.Utility.$2C($v_0,$p1,true);$v_0=$v_0.nextSibling}}};CUI.Utility.$k=function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8){var $v_0=null;if($p0===1)$v_0=CUI.Utility.$3("div");else if($p0===3)$v_0=$p6?CUI.Utility.$CR():CUI.Utility.$3("a");else $v_0=$p6?CUI.Utility.$CS():CUI.Utility.$3("span");var $v_1="",$v_2={};$v_1=CUI.Utility.$AU[$p1];var $v_3=!CUI.ScriptUtility.isNullOrUndefined($p7),$v_4=!CUI.ScriptUtility.isNullOrUndefined($p8),$v_5=!CUI.ScriptUtility.isNullOrUndefined($p3);if($p5)$v_1+=" ms-cui-img-cont-float";else $v_1+=" ms-cui-img-container";if($v_5)$p4.className=$p3;$v_0.className+=" "+$v_1;if(!CUI.ScriptUtility.isNullOrEmptyString($p2)){$v_0.appendChild($p4);$p4.src=$p2;if(Sys.Browser.agent===Sys.Browser.Safari){$p4.style.top="0px";$p4.style.left="0px"}if($v_3)$p4.style.top=$p7+"px";if($v_4)$p4.style.left=$p8+"px"}return $v_0};CUI.Utility.$1h=function($p0,$p1,$p2,$p3,$p4,$p5,$p6){$p0.style.display="inline-block";if(!CUI.ScriptUtility.isNullOrUndefined($p2))$p0.className=$p2;if(!CUI.ScriptUtility.isNullOrEmptyString($p6))$p0.style.height=$p6+"px";if(!CUI.ScriptUtility.isNullOrEmptyString($p5))$p0.style.width=$p5+"px";if(!CUI.ScriptUtility.isNullOrEmptyString($p1))$p0.style.backgroundImage="url("+$p1+")";var $v_0="0px",$v_1="0px",$v_2=false;if(!CUI.ScriptUtility.isNullOrEmptyString($p4)){$v_0=$p4+"px";$v_2=true}if(!CUI.ScriptUtility.isNullOrEmptyString($p3)){$v_1=$p3+"px";$v_2=true}if($v_2)$p0.style.backgroundPosition=$v_0+" "+$v_1};CUI.Utility.$9m=function(){var $v_0=CUI.Utility.$3("iframe");$v_0.style.position="absolute";$v_0.style.visibility="hidden";return $v_0};CUI.Utility.$9l=function(){var $v_0=CUI.Utility.$3("span");if(Sys.Browser.agent===Sys.Browser.InternetExplorer)$v_0.className="ms-cui-glass-ie";else $v_0.className="ms-cui-glass-ff";return $v_0};CUI.Utility.$Aw=function($p0,$p1){$p0.style.position="absolute";$p0.style.visibility="hidden";$p0.style.border="none";$p0.style.left=$p1.style.left;$p0.style.top=$p1.style.top;var $v_0=$p1.offsetWidth,$v_1=$p1.offsetHeight;if(CUI.Utility.$Ds()){$v_0-=4;$v_1-=4}$p0.style.width=$v_0.toString()+"px";$p0.style.height=$v_1.toString()+"px";$p0.style.visibility="visible"};CUI.Utility.$1j=function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p1)||CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined($p0.ToolTipTitle))return;$p1.setAttribute("aria-describedby",$p0.Id+"_ToolTip")};CUI.Utility.$A3=function($p0,$p1){var $v_0,$v_1="<br />",$v_2=$p0.lastIndexOf("\u200b\u200b"),$v_3=$p0.lastIndexOf(" ");if($v_2!==-1){$v_0=CUI.Utility.$3K($p0.substr(0,$v_2))+$v_1;if($v_2<$p0.length)$v_0+=CUI.Utility.$3K($p0.substr($v_2+2))}else if($v_3!==-1){$v_0=CUI.Utility.$3K($p0.substr(0,$v_3))+$v_1;if($v_3<$p0.length)$v_0+=CUI.Utility.$3K($p0.substr($v_3+1));if($p1)$v_0+=" "}else if($v_3===-1&&$p1)$v_0=CUI.Utility.$3K($p0)+$v_1;else $v_0=CUI.Utility.$3K($p0);return $v_0};CUI.Utility.$3K=function($p0){if(CUI.ScriptUtility.isNullOrEmptyString($p0))return "";for(var $v_0=new Sys.StringBuilder,$v_1=$p0.length,$v_2=0;$v_2<$v_1;$v_2++){var $v_3=$p0.charAt($v_2);switch($v_3){case "<":$v_0.append("&lt;");break;case ">":$v_0.append("&gt;");break;case "&":$v_0.append("&amp;");break;case '"':$v_0.append("&quot;");break;case "'":$v_0.append("&#39;");break;default:$v_0.append($v_3);break}}return $v_0.toString()};CUI.Utility.$8R=function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))return;$clearHandlers($p0);if(!CUI.ScriptUtility.isNullOrUndefined($p0.childNodes))for(var $v_0=0;$v_0<$p0.childNodes.length;$v_0++)CUI.Utility.$8R($p0.childNodes[$v_0])};CUI.Utility.$CS=function(){var $v_0=CUI.Utility.$3("span");$v_0.className="ms-cui-block";return $v_0};CUI.Utility.$CR=function(){var $v_0=CUI.Utility.$3("a");$v_0.className="ms-cui-block";return $v_0};CUI.Utility.$x=function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0))return false;return $p0==="True"||$p0==="true"};CUI.Utility.$3I=function(){var $v_0=window.innerWidth;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0=document.documentElement.clientWidth;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0=document.body.clientWidth;return $v_0};CUI.Utility.$43=function(){var $v_0=window.innerHeight;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0=document.documentElement.clientHeight;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0=document.body.clientHeight;return $v_0};CUI.Utility.$64=function($p0,$p1){var $v_0=CUI.Utility.$DQ($p0,$p1,true);return $v_0&&$v_0.length>0?$v_0[0]:null};CUI.Utility.$DQ=function($p0,$p1,$p2){if(!CUI.ScriptUtility.isNullOrUndefined($p0.getElementsByClassName)){var $v_0=$p0.getElementsByClassName($p1);if($p2){if(CUI.ScriptUtility.isNullOrUndefined($v_0)||$v_0.length<=1)return $v_0;var $v_1=[];$v_1[0]=$v_0[0];return $v_1}return $v_0}if(!CUI.ScriptUtility.isNullOrUndefined($p0.querySelectorAll)){if($p2){var $v_2=$p0.querySelector("."+$p1),$v_3=[];if(!CUI.ScriptUtility.isNullOrUndefined($v_2))$v_3[0]=$v_2;return $v_3}return $p0.querySelectorAll("."+$p1)}else return CUI.Utility.$A9($p0,$p1,$p2)};CUI.Utility.$A9=function($p0,$p1,$p2){for(var $v_0=[],$v_1=0,$v_2,$v_3=0;$v_3<$p0.childNodes.length;$v_3++){$v_2=$p0.childNodes[$v_3];if(!CUI.ScriptUtility.isNullOrUndefined($v_2.className)&&$v_2.className.indexOf($p1)>=0){$v_0[$v_1++]=$v_2;if($p2)break}$v_0=$v_0.concat(CUI.Utility.$A9($v_2,$p1,$p2));if($v_0.length>0&&$p2)break}return $v_0};CUI.Utility.$8X=function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0.select))$p0.select();else if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var $v_0=$p0.createTextRange();$v_0.moveStart("character",0);$v_0.moveEnd("character",$p0.value.length);$v_0.select()}else $p0.setSelectionRange(0,$p0.value.length)};CUI.Utility.$Dr=function(){if(!CUI.Utility.$6t){CUI.Utility.$6v=Sys.Browser.agent===Sys.Browser.InternetExplorer;CUI.Utility.$6t=true}return CUI.Utility.$6v};CUI.Utility.$3L=function(){if(!CUI.Utility.$6p){if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&!window.document.documentMode)CUI.Utility.$6w=true;CUI.Utility.$6p=true}return CUI.Utility.$6w};CUI.Utility.$Ds=function(){if(!CUI.Utility.$6q){var $v_0=window.document.documentMode;if(CUI.Utility.$Dr()&&$v_0&&$v_0>=9)CUI.Utility.$6x=true;CUI.Utility.$6q=true}return CUI.Utility.$6x};CUI.Utility.get_$Dn=function(){if(!CUI.Utility.$6n){if(Sys.Browser.agent===Sys.Browser.InternetExplorer){CUI.Utility.$3k=7;if(Sys.Browser.version>=8)CUI.Utility.$3k=Sys.Browser.version;else{var $v_0=window.navigator.userAgent,$v_1=new RegExp("Trident\\/([0-9]{1,}[\\.0-9]{0,})");if($v_1.test($v_0)){var $v_2=$v_1.exec($v_0),$v_3=$v_2.length>=2?Number.parseInvariant($v_2[1]):3;CUI.Utility.$3k=$v_3>=4?$v_3+4:7}else CUI.Utility.$3k=Sys.Browser.version}}CUI.Utility.$6n=true}return CUI.Utility.$3k};CUI.Utility.get_$Dm=function(){if(!CUI.Utility.$6m){if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var $v_0=document.documentMode;if($v_0)CUI.Utility.$5W=$v_0;else{var $v_1=document.compatMode;if($v_1==="CSS1Compat")CUI.Utility.$5W=7}}CUI.Utility.$6m=true}return CUI.Utility.$5W};CUI.Utility.get_$68=function(){if(!CUI.Utility.$6s){var $v_0=CUI.Utility.get_$Dn();if($v_0>0){var $v_1=CUI.Utility.get_$Dm();if($v_1>0)CUI.Utility.$6r=$v_1!==$v_0}CUI.Utility.$6s=true}return CUI.Utility.$6r};CUI.Utility.$86=function($p0,$p1){return CUI.Utility.$DS($p0,[$p1])};CUI.Utility.$DS=function($p0,$p1){var $v_0=$p1.length;if(!$p0)return null;for(var $v_2=0;$v_2<$v_0;$v_2++)if($p0.tagName.toLowerCase()===$p1[$v_2].toLowerCase())return $p0;var $v_1=$p0.parentNode;while($v_1){for(var $v_3=0;$v_3<$v_0;$v_3++)if($v_1.tagName.toLowerCase()===$p1[$v_3].toLowerCase())return $v_1;$v_1=$v_1.parentNode}return null};CUI.Utility.$3=function($p0){var $v_0=document.createElement($p0);$v_0.setAttribute("unselectable","on");return $v_0};CUI.Utility.$2o=function($p0){var $v_0=document.createElement("label");$v_0.setAttribute("unselectable","on");$v_0.className="ms-cui-hidden";CUI.UIUtility.setInnerText($v_0,$p0);return $v_0};CUI.Utility.$7n=function($p0){return document.createElement($p0)};CUI.Utility.$8f=function($p0,$p1){if(CUI.ScriptUtility.isNullOrUndefined($p1))return;$p0.style.imeMode=CUI.Utility.$x($p1)?"auto":"disabled"};CUI.Utility.get_returnFalseHandler=function(){if(CUI.ScriptUtility.isNullOrUndefined(CUI.Utility.$5l))CUI.Utility.$5l=CUI.NativeUtility.returnFalse;return CUI.Utility.$5l};CUI.ScriptUtility=function(){};CUI.ScriptUtility.isNullOrEmptyString=function($p0){var $v_0=null;return $p0===$v_0||typeof $p0==="undefined"||!$p0.length};CUI.ScriptUtility.isNullOrUndefined=function($p0){var $v_0=null;return $p0===$v_0||typeof $p0==="undefined"};CUI.ScriptUtility.isUndefined=function($p0){return typeof $p0==="undefined"};CUI.UIUtility=function(){};CUI.UIUtility.generateRandomElementId=function(){var $v_0=null,$v_1=null;do{var $v_2=Math.random();$v_2=$v_2*1e5;$v_2=Math.round($v_2);$v_0="rnd"+$v_2.toString();$v_1=$get($v_0)}while($v_1);return $v_0};CUI.UIUtility.cancelEvent=function($p0){if($p0){$p0.preventDefault();$p0.stopPropagation()}};CUI.UIUtility.insertBefore=function($p0,$p1){var $v_0=$p1.parentNode;$v_0.insertBefore($p0,$p1)};CUI.UIUtility.insertAfter=function($p0,$p1){var $v_0=$p1.parentNode;if($v_0.lastChild===$p1)$v_0.appendChild($p0);else $v_0.insertBefore($p0,$p1.nextSibling)};CUI.UIUtility.removeNode=function($p0){$p0.parentNode&&$p0.parentNode.removeChild($p0)};CUI.UIUtility.calculateOffsetLeft=function($p0){var $v_0=0;while($p0){$v_0+=$p0.offsetLeft;$p0=$p0.offsetParent}return $v_0};CUI.UIUtility.calculateOffsetTop=function($p0){var $v_0=0;while($p0){$v_0+=$p0.offsetTop;$p0=$p0.offsetParent}return $v_0};CUI.UIUtility.setInnerText=function($p0,$p1){CUI.NativeUtility.setInnerText($p0,$p1)};CUI.UIUtility.isTextNode=function($p0){return $p0.nodeType===3||$p0.nodeType===4};CUI.UIUtility.isNodeOfType=function($p0,$p1){for(var $v_0=0;$v_0<$p1.length;$v_0++)if($p0.tagName===$p1[$v_0])return true;return false};CUI.ListNode=function($p0,$p1,$p2){this.next=$p2;this.previous=$p1;this.data=$p0};CUI.ListNode.prototype={next:null,previous:null,data:null};CUI.List=function(){};CUI.List.prototype={$1p_0:null,$39_0:null,$O_0:0,add:function($p0){if(!this.$1p_0)this.$1p_0=this.$39_0=new CUI.ListNode($p0,null,null);else this.$39_0=this.$39_0.next=new CUI.ListNode($p0,this.$39_0,null);this.$O_0++},insert:function($p0,$p1){if($p0>this.$O_0||0>$p0)throw Error.argumentOutOfRange("pos");if($p0===this.$O_0){this.add($p1);return}var $v_0=this.$1p_0;while(0!==$p0--)$v_0=$v_0.next;var $v_1=new CUI.ListNode($p1,$v_0.previous,$v_0);if(!$v_0.previous)this.$1p_0=$v_1;else $v_0.previous.next=$v_1;if(!$v_0.next)this.$39_0=$v_1;else $v_0.next.previous=$v_1},remove:function($p0){var $v_0=this.$1p_0;while($v_0){if($v_0.data===$p0)break;$v_0=$v_0.next}if(!$v_0)return false;if(!$v_0.previous)this.$1p_0=$v_0.next;else $v_0.previous.next=$v_0.next;if(!$v_0.next)this.$39_0=$v_0.previous;else $v_0.next.previous=$v_0.previous;return true},clear:function(){var $v_0=this.$1p_0,$v_1;this.$1p_0=null;this.$39_0=null;while($v_0){$v_1=$v_0.next;$v_0.previous=null;$v_0.next=null;$v_0=$v_1}},indexOf:function($p0){var $v_0=this.$1p_0,$v_1=0;while($v_0){if($v_0.data===$p0)break;$v_0=$v_0.next;$v_1++}if(!$v_0)return -1;return $v_1},get_item:function($p0){var $v_0=this.$9W_0($p0);return $v_0.data},get_count:function(){return this.$O_0},getEnumerator:function(){return new CUI.ListEnumerator(this.$1p_0)},getEnumeratorAtPos:function($p0){var $v_0=this.$9W_0($p0);return new CUI.ListEnumerator($v_0)},$9W_0:function($p0){var $v_0=this.$1p_0,$v_1=0;while($v_1!==$p0){if(!$v_0)throw Error.argumentOutOfRange("pos");$v_0=$v_0.next;$v_1++}return $v_0}};CUI.ListEnumerator=function($p0){this.$3i_0=$p0};CUI.ListEnumerator.prototype={$3i_0:null,$d_0:null,get_current:function(){if(!this.$d_0)throw Error.argumentOutOfRange();return this.$d_0.data},moveNext:function(){if(!this.$d_0){this.$d_0=this.$3i_0;return !!this.$3i_0}if(!this.$d_0.next)return false;this.$d_0=this.$d_0.next;return true},movePrevious:function(){if(!this.$d_0){this.$d_0=this.$3i_0;return !!this.$3i_0}if(!this.$d_0.previous)return false;this.$d_0=this.$d_0.previous;return true},reset:function(){this.$d_0=this.$3i_0}};CUI.JsonXmlElement=function(name,attrs){this.name=name;if(!attrs)attrs={};this.attrs=attrs};CUI.JsonXmlElement.prototype={get_name:function(){return this.name},get_attributes:function(){return this.attrs},appendChild:function(name,attrs){var $v_0=new CUI.JsonXmlElement(name,attrs);return this.appendChildNode($v_0)},appendChildNode:function(node){var $v_0=this.children;if(!$v_0){$v_0=[];this.children=$v_0}Array.add($v_0,node);return node},get_childNodes:function(){return this.children}};Type.registerNamespace("CUI.Controls");CUI.Controls.ColorStyle=function(){this.Title=null;this.Color=null;this.Style=null;this.DisplayColor=null};CUI.Controls.ColorPickerResult=function(){};CUI.Controls.ContextMenuControlProperties=function(){CUI.Controls.ContextMenuControlProperties.initializeBase(this)};CUI.Controls.ContextMenuControl=function($p0,$p1,$p2,$p3){CUI.Controls.ContextMenuControl.initializeBase(this,[$p0,$p1,$p2,$p3]);this.addDisplayMode("Menu")};CUI.Controls.ContextMenuControl.prototype={$8H_3:null,dispose:function(){this.$8H_3=null;CUI.ContextMenuLauncher.prototype.dispose.call(this)},createDOMElementForDisplayMode:function($p0){switch($p0){case "Menu":this.$8H_3=CUI.Utility.$3("span");return this.$8H_3;default:this.ensureValidDisplayMode($p0);return null}},onEnabledChanged:function($p0){},onMenuButtonClick:function($p0){if(!this.get_enabled())return;this.$Aa_2($p0,null);this.get_displayedComponent().raiseCommandEvent(this.get_$1_3().CommandMenuOpen,4,null)},onLaunchedMenuClosed:function(){this.get_displayedComponent().raiseCommandEvent(this.get_$1_3().CommandMenuClose,10,null)},get_$1_3:function(){return this.$5_0}};CUI.Controls.Button=function($p0,$p1,$p2){this.$$d_handleTabBlur=Function.createDelegate(this,this.handleTabBlur);this.$$d_handleTabFocus=Function.createDelegate(this,this.handleTabFocus);this.$$d_handleMouseBlur=Function.createDelegate(this,this.handleMouseBlur);this.$$d_handleMouseFocus=Function.createDelegate(this,this.handleMouseFocus);this.$$d_onClick=Function.createDelegate(this,this.onClick);CUI.Controls.Button.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Small");this.addDisplayMode("Medium");this.addDisplayMode("Large");this.addDisplayMode("Menu");this.addDisplayMode("Menu16");this.addDisplayMode("Menu32")};CUI.Controls.Button.prototype={$G_1:null,$8_1:null,$9_1:null,$T_1:null,$a_1:null,$2P_1:null,$16_1:null,$6c_1:null,$6d_1:null,$6e_1:null,$1x_1:null,$1Y_1:null,createComponentForDisplayModeInternal:function($p0){var $v_0;if($p0.startsWith("Menu")){$v_0=this.$0_0.$42_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);this.$2P_1=this.get_$1_1().MenuItemId;this.$16_1=this.get_$1_1().CommandValueId;if(CUI.ScriptUtility.isNullOrEmptyString(this.$16_1))this.$16_1=this.$2P_1}else $v_0=CUI.Control.prototype.createComponentForDisplayModeInternal.call(this,$p0);return $v_0},createDOMElementForDisplayMode:function($p0){return this.$2n_1($p0,true)},$2n_1:function($p0,$p1){var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().Alt)?this.getLabel():this.get_$1_1().Alt;switch($p0){case "Large":this.$G_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Large",this.get_$1_1(),false,false);$p1&&this.$Bm_0("Large");return this.$G_1;case "Medium":this.$8_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Medium",this.get_$1_1(),false,false);$p1&&this.$Bm_0("Medium");return this.$8_1;case "Small":this.$9_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Small",this.get_$1_1(),false,false);$p1&&this.$Bm_0("Small");return this.$9_1;case "Menu":case "Menu16":this.$T_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Menu16",this.get_$1_1(),true,false);$p1&&this.$Bm_0("Menu16");return this.$T_1;case "Menu32":this.$a_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Menu32",this.get_$1_1(),true,false);$p1&&this.$Bm_0("Menu32");return this.$a_1;default:this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Large":this.$G_1=$v_0;break;case "Medium":this.$8_1=$v_0;break;case "Small":this.$9_1=$v_0;break}},$Bm_0:function($p0){switch($p0){case "Large":this.$R_1(this.$G_1,true);break;case "Medium":this.$R_1(this.$8_1,true);break;case "Small":this.$R_1(this.$9_1,true);break;case "Menu32":this.$R_1(this.$a_1,false);break;case "Menu16":this.$R_1(this.$T_1,false);break;case "Menu":this.$R_1(this.$T_1,false);break}},$R_1:function($p0,$p1){$addHandler($p0,"click",this.$$d_onClick);$p1&&$addHandler($p0,"dblclick",this.$$d_onDblClick);$addHandler($p0,"mouseover",this.$$d_handleMouseFocus);$addHandler($p0,"mouseout",this.$$d_handleMouseBlur);$addHandler($p0,"focus",this.$$d_handleTabFocus);$addHandler($p0,"blur",this.$$d_handleTabBlur)},onEnabledChanged:function($p0){CUI.Utility.setEnabledOnElement(this.$G_1,$p0);CUI.Utility.setEnabledOnElement(this.$8_1,$p0);CUI.Utility.setEnabledOnElement(this.$9_1,$p0);CUI.Utility.setEnabledOnElement(this.$T_1,$p0);CUI.Utility.setEnabledOnElement(this.$a_1,$p0);!$p0&&this.$1L_1()},get_$9h_0:function(){return "Button"},getTextValue:function(){return this.getLabel()},getLabel:function(){return this.get_$1_1().LabelText},receiveFocus:function(){this.onBeginFocus();var $v_0=this.get_displayedComponent();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;$v_0.set_$1H_2(true);!CUI.ScriptUtility.isNullOrUndefined(this.$T_1)&&this.$T_1.focus();!CUI.ScriptUtility.isNullOrUndefined(this.$a_1)&&this.$a_1.focus()},getDropDownDOMElementForDisplayMode:function($p0){var $v_0;switch($p0){case "Large":$v_0=this.$6c_1;break;case "Medium":$v_0=this.$6d_1;break;case "Small":$v_0=this.$6e_1;break;case "Menu":$v_0=this.$1x_1;break;case "Text":$v_0=this.$1Y_1;break;default:$v_0=CUI.Utility.$3("span");break}if($v_0)return $v_0;return this.$9k_1($p0)},$9k_1:function($p0){var $v_0;switch($p0){case "Large":$v_0=this.$2n_1($p0,false).cloneNode(true);this.$G_1=null;$v_0.style.height="auto";$v_0.childNodes[1].style.height="auto";this.$6c_1=$v_0;break;case "Medium":$v_0=this.$2n_1($p0,false).cloneNode(true);this.$8_1=null;this.$6d_1=$v_0;break;case "Small":$v_0=this.$2n_1($p0,false).cloneNode(true);this.$9_1=null;this.$6e_1=$v_0;break;case "Menu":this.$1x_1=this.$2n_1("Menu",false).cloneNode(true);this.$T_1=null;return this.$1x_1;case "Text":var $v_1=CUI.Utility.$3("a");CUI.Utility.$1v($v_1);this.$1Y_1=CUI.Utility.$3("span");this.$1Y_1.className="ms-cui-textmenuitem";CUI.UIUtility.setInnerText($v_1,this.get_$1_1().LabelText);this.$1Y_1.appendChild($v_1);return this.$1Y_1;default:this.ensureValidDisplayMode($p0);return null}return $v_0},deselect:function(){},getMenuItemId:function(){return this.$2P_1},getCommandValueId:function(){return this.$16_1},$8d_0:function(){if(!this.get_enabled())return false;this.get_displayedComponent().get_$2_0().focus();return true},focusOnDisplayedComponent:function(){this.receiveFocus()},onClick:function($p0){!CUI.ScriptUtility.isNullOrUndefined(CUI.PMetrics)&&CUI.PMetrics.perfMark(7700);$p0.preventDefault();$p0.stopPropagation();this.$Y_0();if(!this.get_enabled())return;this.$0_0.set_$45_1(this);var $v_0=1,$v_1=this.get_stateProperties(),$v_2=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_2==="OptionSelection")$v_0=3;$v_1["CommandValueId"]=this.$16_1;$v_1["MenuItemId"]=this.$2P_1;$v_1["SourceControlId"]=this.$4_0;this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().Command,$v_0,$v_1);!CUI.ScriptUtility.isNullOrUndefined(CUI.PMetrics)&&CUI.PMetrics.perfMark(7701)},handleMouseFocus:function($p0){this.onBeginFocus();if(!this.get_enabled())return;var $v_0=this.get_displayedComponent();CUI.MenuItem.isInstanceOfType($v_0)&&$v_0.set_$1H_2(true);if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandPreview))return;var $v_1=this.get_stateProperties();$v_1["CommandValueId"]=this.$16_1;$v_1["MenuItemId"]=this.$2P_1;var $v_2=5,$v_3=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_3)&&$v_3==="OptionSelection")$v_2=7;$v_0.raiseCommandEvent(this.get_$1_1().CommandPreview,$v_2,$v_1)},handleMouseBlur:function($p0){this.$1L_1();this.onEndFocus();if(!this.get_enabled())return;var $v_0=this.get_displayedComponent();CUI.MenuItem.isInstanceOfType($v_0)&&$v_0.set_$1H_2(false);if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandRevert))return;var $v_1=6,$v_2=this.get_stateProperties();$v_2["CommandValueId"]=this.$16_1;$v_2["MenuItemId"]=this.$2P_1;var $v_3=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_3)&&$v_3==="OptionSelection")$v_1=8;$v_0.raiseCommandEvent(this.get_$1_1().CommandRevert,$v_1,$v_2)},handleTabFocus:function($p0){this.onBeginFocus();var $v_0=this.get_displayedComponent();if(CUI.MenuItem.isInstanceOfType($v_0)){$v_0.set_$1H_2(true);this.$3J_1(this.get_enabled())}else this.get_enabled()&&this.$0_0.set_$p_1(this)},handleTabBlur:function($p0){this.$1L_1();this.onEndFocus();if(!this.get_enabled())return;var $v_0=this.get_displayedComponent();CUI.MenuItem.isInstanceOfType($v_0)&&$v_0.set_$1H_2(false)},onMenuClosed:function(){this.$1L_1();this.$Y_0()},$1L_1:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$G_1)&&CUI.Utility.removeCSSClassFromElement(this.$G_1,"ms-cui-ctl-hoveredOver");!CUI.ScriptUtility.isNullOrUndefined(this.$8_1)&&CUI.Utility.removeCSSClassFromElement(this.$8_1,"ms-cui-ctl-hoveredOver");!CUI.ScriptUtility.isNullOrUndefined(this.$9_1)&&CUI.Utility.removeCSSClassFromElement(this.$9_1,"ms-cui-ctl-hoveredOver");if(!CUI.ScriptUtility.isNullOrUndefined(this.$T_1)){CUI.Utility.removeCSSClassFromElement(this.$T_1,"ms-cui-ctl-hoveredOver");CUI.Utility.removeCSSClassFromElement(this.$T_1,"ms-cui-ctl-disabledHoveredOver")}if(!CUI.ScriptUtility.isNullOrUndefined(this.$a_1)){CUI.Utility.removeCSSClassFromElement(this.$a_1,"ms-cui-ctl-hoveredOver");CUI.Utility.removeCSSClassFromElement(this.$a_1,"ms-cui-ctl-disabledHoveredOver")}},$3J_1:function($p0){var $v_0="ms-cui-ctl-hoveredOver";if(!$p0){$v_0="ms-cui-ctl-disabledHoveredOver";!CUI.ScriptUtility.isNullOrUndefined(this.$T_1)&&CUI.Utility.ensureCSSClassOnElement(this.$T_1,$v_0);!CUI.ScriptUtility.isNullOrUndefined(this.$a_1)&&CUI.Utility.ensureCSSClassOnElement(this.$a_1,$v_0)}else{!CUI.ScriptUtility.isNullOrUndefined(this.$G_1)&&CUI.Utility.ensureCSSClassOnElement(this.$G_1,$v_0);!CUI.ScriptUtility.isNullOrUndefined(this.$8_1)&&CUI.Utility.ensureCSSClassOnElement(this.$8_1,$v_0);!CUI.ScriptUtility.isNullOrUndefined(this.$9_1)&&CUI.Utility.ensureCSSClassOnElement(this.$9_1,$v_0);!CUI.ScriptUtility.isNullOrUndefined(this.$T_1)&&CUI.Utility.ensureCSSClassOnElement(this.$T_1,$v_0);!CUI.ScriptUtility.isNullOrUndefined(this.$a_1)&&CUI.Utility.ensureCSSClassOnElement(this.$a_1,$v_0)}},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$G_1=null;this.$8_1=null;this.$9_1=null;this.$T_1=null;this.$a_1=null;this.$6c_1=null;this.$6d_1=null;this.$6e_1=null;this.$1x_1=null;this.$1Y_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.CheckBoxCommandProperties=function(){};CUI.Controls.CheckBox=function($p0,$p1,$p2){this.$$d_$Al_2=Function.createDelegate(this,this.$Al_2);this.$$d_$EB_2=Function.createDelegate(this,this.$EB_2);this.$$d_$6C_2=Function.createDelegate(this,this.$6C_2);this.$$d_$6D_2=Function.createDelegate(this,this.$6D_2);this.$$d_$53_2=Function.createDelegate(this,this.$53_2);this.$$d_$48_2=Function.createDelegate(this,this.$48_2);this.$$d_onClick=Function.createDelegate(this,this.onClick);CUI.Controls.CheckBox.initializeBase(this,[$p0,$p1,$p2])};CUI.Controls.CheckBox.prototype={$9_2:null,$17_2:null,$8_2:null,$13_2:null,$2L_2:null,createDOMElementForDisplayMode:function($p0){var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().Alt)?this.get_$1_2().LabelText:this.get_$1_2().Alt;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0="";switch($p0){case "Small":this.$9_2=CUI.Utility.$3("span");this.$9_2.className="ms-cui-cbx";this.$9_2.setAttribute("mscui:controltype",this.get_$9h_0());this.$17_2=CUI.Utility.$3("input");this.$17_2.type="checkbox";this.$17_2.className="ms-cui-cbx-input";this.$17_2.id=this._id+"-Small-checkbox";if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().ToolTipTitle))this.$17_2.title=$v_0;this.$17_2.setAttribute("role",this.get_$3E_0());CUI.Utility.$1j(this.get_$1_2(),this.$17_2);this.$R_2(this.$17_2,null);this.$9_2.appendChild(this.$17_2);return this.$9_2;case "Medium":this.$8_2=CUI.Utility.$3("span");this.$8_2.className="ms-cui-cbx";this.$8_2.setAttribute("mscui:controltype",this.get_$9h_0());this.$13_2=CUI.Utility.$3("input");this.$13_2.type="checkbox";this.$13_2.className="ms-cui-cbx-input";this.$13_2.id=this._id+"-Medium-checkbox";if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().ToolTipTitle))this.$13_2.title=$v_0;this.$13_2.setAttribute("role",this.get_$3E_0());CUI.Utility.$1j(this.get_$1_2(),this.$13_2);var $v_1=false;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().LabelText)){this.$2L_2=CUI.Utility.$3("label");if(CUI.Utility.$3L())this.$2L_2.setAttribute("htmlFor",this._id+"-Medium-checkbox");else this.$2L_2.setAttribute("for",this._id+"-Medium-checkbox");CUI.Utility.$2q(this.$2L_2,this.get_$1_2().LabelText);$v_1=true}this.$R_2(this.$13_2,this.$2L_2);this.$8_2.appendChild(this.$13_2);$v_1&&this.$8_2.appendChild(this.$2L_2);return this.$8_2;default:this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Medium":this.$8_2=$v_0;this.$13_2=$v_0.firstChild;this.$2L_2=$v_0.childNodes[1];break;case "Small":this.$9_2=$v_0;this.$17_2=$v_0.firstChild;break}},$Bm_0:function($p0){switch($p0){case "Medium":this.$R_2(this.$13_2,this.$2L_2);break;case "Small":this.$R_2(this.$17_2,null);break}},$R_2:function($p0,$p1){$addHandler($p0,"click",this.$$d_onClick);$addHandler($p0,"focus",this.$$d_$48_2);$addHandler($p0,"blur",this.$$d_$53_2);$addHandler($p0,"mouseover",this.$$d_$6D_2);$addHandler($p0,"mouseout",this.$$d_$6C_2);$addHandler($p0,"keydown",this.$$d_$EB_2);if(!CUI.ScriptUtility.isNullOrUndefined($p1)){$addHandler($p1,"click",this.$$d_$Al_2);$addHandler($p1,"keydown",this.$$d_$EB_2);$addHandler($p1,"mouseover",this.$$d_$6D_2);$addHandler($p1,"mouseout",this.$$d_$6C_2)}},onEnabledChanged:function($p0){if($p0){CUI.Utility.enableElement(this.$9_2);CUI.Utility.enableElement(this.$8_2)}else{CUI.Utility.disableElement(this.$9_2);CUI.Utility.disableElement(this.$8_2)}CUI.Utility.setDisabledAttribute(this.$17_2,!$p0);CUI.Utility.setDisabledAttribute(this.$13_2,!$p0)},get_$9h_0:function(){return "CheckBox"},get_$3E_0:function(){return "checkbox"},onClick:function($p0){this.$Y_0();if(!this.get_enabled())return;var $v_0=9,$v_1=this.get_displayedComponent();switch($v_1.get_displayMode()){case "Small":this.get_stateProperties()["On"]=this.$17_2.checked;break;case "Medium":this.get_stateProperties()["On"]=this.$13_2.checked;break;default:this.ensureValidDisplayMode($v_1.get_displayMode());return}$v_1.raiseCommandEvent(this.get_$1_2().Command,$v_0,this.get_stateProperties());if(this.$0_0.get_$55_1())this.$Ef_0();else this.setState(this.get_stateProperties()["On"])},$48_2:function($p0){this.onBeginFocus();if(!this.get_enabled())return;this.$0_0.set_$p_1(this);if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandPreview))return;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandPreview,5,this.get_stateProperties())},$EB_2:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0))$p0.keyCode===13&&this.$Al_2($p0)},$6D_2:function($p0){this.onBeginFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandPreview))return;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandPreview,5,this.get_stateProperties())},$53_2:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandRevert))return;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandRevert,6,this.get_stateProperties())},$6C_2:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandRevert))return;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandRevert,6,this.get_stateProperties())},$Al_2:function($p0){$p0.preventDefault();this.$Y_0();if(!this.get_enabled())return;this.$0_0.set_$p_1(this);this.setState(!this.$13_2.checked);this.onClick($p0)},setState:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined(this.$17_2))this.$17_2.checked=$p0;if(!CUI.ScriptUtility.isNullOrUndefined(this.$13_2))this.$13_2.checked=$p0},$Ef_0:function(){this.pollForStateAndUpdateInternal(this.get_$1_2().Command,this.get_$1_2().QueryCommand,this.get_stateProperties(),true);this.setState(this.get_stateProperties()["On"])},addDisplayModes:function(){this.addDisplayMode("Small");this.addDisplayMode("Medium")},$8d_0:function(){if(!this.get_enabled())return false;var $v_0=this.get_displayedComponent().get_$2_0();$v_0.firstChild.focus();return true},dispose:function(){CUI.Controls.ToggleButton.prototype.dispose.call(this);this.$8_2=null;this.$13_2=null;this.$2L_2=null;this.$9_2=null;this.$17_2=null},get_$1_2:function(){return this.$5_0}};CUI.Controls.ColorPickerCommandProperties=function(){};CUI.Controls.ColorPicker=function($p0,$p1,$p2,$p3){this.$$d_$Ag_1=Function.createDelegate(this,this.$Ag_1);this.$$d_$E3_1=Function.createDelegate(this,this.$E3_1);this.$$d_$Ai_1=Function.createDelegate(this,this.$Ai_1);this.$$d_$Ah_1=Function.createDelegate(this,this.$Ah_1);CUI.Controls.ColorPicker.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Menu");this.$8l_1=$p3};CUI.Controls.ColorPicker.prototype={$8l_1:null,dispose:function(){this.$66_1=null;CUI.Control.prototype.dispose.call(this)},createComponentForDisplayModeInternal:function($p0){if(this.$l_0.length>0)throw Error.create("Only one ControlComponent can be created for each ColorPicker Control");var $v_0;$v_0=this.$0_0.$42_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);return $v_0},get_$9h_0:function(){return "ColorPicker"},$2Y_1:null,$Be_1:function($p0,$p1){for(var $v_0=null,$v_1=$p0.ownerDocument,$v_2=0,$v_3=$p1.length/10,$v_4=0;$v_4<$p1.length;$v_4++){if(!($v_4%10)){$v_0=$v_1.createElement("tr");$p0.appendChild($v_0);$v_2++}var $v_5=$v_1.createElement("td");$v_5.className="ms-cui-colorpicker-cell";$v_5.setAttribute("arrayPosition",$v_4);if($v_2===1){$v_5.style.padding="2px";$v_5.style.height="16px"}$v_0.appendChild($v_5);var $v_6=$v_1.createElement("a");$v_6.href="javascript:";var $v_7=$p1[$v_4].Title;$v_6.title=$v_7;$v_6.className="ms-cui-colorpicker-cell-a";$addHandler($v_6,"focus",this.$$d_$Ah_1);var $v_8=$v_1.createElement("div"),$v_9=$p1[$v_4].DisplayColor;$v_8.style.backgroundColor=$v_9;$v_8.className="ms-cui-colorpicker-celldiv";var $v_A=13;if($v_2===1||$v_2===2){$v_8.style.borderTopWidth="1px";$v_A--}if($v_2===1||$v_2===$v_3){$v_8.style.borderBottomWidth="1px";$v_A--}if($v_A!==13)$v_8.style.height=$v_A+"px";var $v_B=$v_1.createElement("div");$v_B.className="ms-cui-colorpicker-cellinternaldiv";$addHandler($v_6,"mouseover",this.$$d_$Ai_1);$addHandler($v_6,"mouseout",this.$$d_$E3_1);$addHandler($v_6,"click",this.$$d_$Ag_1);$v_5.appendChild($v_6);$v_6.appendChild($v_8);$v_8.appendChild($v_B);$v_5.colorPickerCssClass=$p1[$v_4];Array.add(this.$2Y_1,$v_5)}},createDOMElementForDisplayMode:function($p0){switch($p0){case "Menu":var $v_0=this.$0_0.get_element().ownerDocument,$v_1=$v_0.createElement("table");if(this.$0_0._textDirection===1)$v_1.dir="rtl";else $v_1.dir="ltr";$v_1.className="ms-cui-smenu-inner";$v_1.setAttribute("cellSpacing","0");$v_1.setAttribute("cellPadding","0");$v_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$2Y_1=[];var $v_2=$v_0.createElement("tbody");this.$Be_1($v_2,this.$8l_1);$v_1.appendChild($v_2);return $v_1;default:this.ensureValidDisplayMode($p0);break}return null},onEnabledChanged:function($p0){},$Ag_1:function($p0){$p0.preventDefault();if(!this.get_enabled())return;var $v_0=$p0.target,$v_1=CUI.Utility.$86($v_0,"td"),$v_2=this.$AB_1($v_1);this.$7i_1();this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().Command,1,$v_2)},$AB_1:function($p0){var $v_0=$p0.colorPickerCssClass,$v_1=new CUI.Controls.ColorPickerResult;$v_1.Color=$v_0.Color;$v_1.Style=$v_0.Style;return $v_1},$Ai_1:function($p0){if(!this.get_enabled())return;var $v_0=CUI.Utility.$86($p0.target,"td");this.$8A_1($v_0)},$Ah_1:function($p0){if(!this.get_enabled())return;var $v_0=CUI.Utility.$86($p0.target,"td");this.$8A_1($v_0)},$E3_1:function($p0){if(!this.get_enabled())return;this.$6F_1();CUI.Controls.ColorPicker.$7=-10},$3M_1:false,$8P_1:null,$8A_1:function($p0){var $v_0=parseInt($p0.getAttribute("arrayPosition"));if(CUI.Controls.ColorPicker.$7===$v_0)return;CUI.Controls.ColorPicker.$7=$v_0;this.$BB_1($p0);this.$Bi_1($p0)},$Bi_1:function($p0){this.$6F_1();Sys.UI.DomElement.addCssClass($p0,"ms-cui-colorpicker-hoveredOver");this.$66_1=$p0;$p0.firstChild&&$p0.firstChild.focus()},$66_1:null,$6F_1:function(){if(this.$66_1)this.$66_1.className="ms-cui-colorpicker-cell"},receiveFocus:function(){this.$8c_1(0)},$8c_1:function($p0){if(this.$2Y_1&&this.$2Y_1.length>$p0){var $v_0=this.$2Y_1[$p0];this.$8A_1($v_0)}},$7i_1:function(){this.$3M_1=false;this.$8P_1=null},$7s_1:function(){this.$3M_1&&!CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_1().CommandRevert)&&this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().CommandRevert,6,this.$8P_1)},$BB_1:function($p0){if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_1().CommandPreview)){this.$3M_1=true;var $v_0=this.$AB_1($p0);this.$8P_1=$v_0;this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().CommandPreview,5,$v_0)}},get_$1_1:function(){return this.$5_0},onMenuClosed:function(){this.$7s_1()},$61_0:function(){var $v_0=1,$v_1=window.event;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1.keyCode===38)$v_0=10;if(CUI.Controls.ColorPicker.$7<0)CUI.Controls.ColorPicker.$7+=this.$2Y_1.length+$v_0;if(CUI.Controls.ColorPicker.$7>=$v_0){this.$8c_1(CUI.Controls.ColorPicker.$7-$v_0);return true}this.$6F_1();CUI.Controls.ColorPicker.$7-=$v_0;return false},$60_0:function(){var $v_0=1,$v_1=window.event;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1.keyCode===40)$v_0=10;if(CUI.Controls.ColorPicker.$7+$v_0<0){CUI.Controls.ColorPicker.$7=-1;$v_0=1}if(CUI.Controls.ColorPicker.$7+$v_0<this.$2Y_1.length){this.$8c_1(CUI.Controls.ColorPicker.$7+$v_0);return true}this.$6F_1();CUI.Controls.ColorPicker.$7-=this.$2Y_1.length;return false}};CUI.Controls.ComboBoxCommandProperties=function(){};CUI.Controls.ComboBox=function($p0,$p1,$p2,$p3){this.$$d_executeAutoComplete=Function.createDelegate(this,this.executeAutoComplete);this.$$d_onInputKeyDown=Function.createDelegate(this,this.onInputKeyDown);this.$$d_onInputBlur=Function.createDelegate(this,this.onInputBlur);this.$$d_onInputFocus=Function.createDelegate(this,this.onInputFocus);this.$5B_3=100;this.$3r_3=-1;CUI.Controls.ComboBox.initializeBase(this,[$p0,$p1,$p2,$p3]);if(CUI.ScriptUtility.isNullOrUndefined(this.get_cbProperties().AllowFreeForm))this.$6O_3=false;else this.$6O_3=this.get_cbProperties().AllowFreeForm.toLowerCase()==="true";if(CUI.ScriptUtility.isNullOrEmptyString(this.get_cbProperties().AutoComplete))this.get_cbProperties().AutoComplete="true";if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_cbProperties().AutoCompleteDelay))try{this.$5B_3=parseInt(this.get_cbProperties().AutoCompleteDelay)}catch($$e_4){this.$5B_3=100}};CUI.Controls.ComboBox.prototype={$8_3:null,$L_3:null,$K_3:null,$20_3:null,$21_3:null,$6O_3:false,createDOMElementForDisplayMode:function($p0){switch($p0){case "Medium":var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_cbProperties().Alt)?"":this.get_cbProperties().Alt,$v_1=CUI.ScriptUtility.isNullOrUndefined(this.get_cbProperties().AltArrow)?$v_0:this.get_cbProperties().AltArrow;this.$8_3=CUI.Utility.$3("span");this.$8_3.className="ms-cui-cb";this.$8_3.setAttribute("mscui:controltype",this.get_$9h_0());this.$L_3=CUI.Utility.$7n("input");this.$L_3.setAttribute("name",this.get_cbProperties().Command);this.$L_3.type="text";this.$L_3.style.width=this.get_cbProperties().Width;this.$L_3.className="ms-cui-cb-input";this.$L_3.setAttribute("autocomplete","off");this.$L_3.id=this.get_cbProperties().Id;if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ToolTipTitle))this.$L_3.title=$v_0;CUI.Utility.$8f(this.$L_3,this.get_properties().ImeEnabled);var $v_2=this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.SelectedItemId];if(CUI.ScriptUtility.isNullOrUndefined($v_2))$v_2=this.get_cbProperties().InitialItem;!CUI.ScriptUtility.isNullOrUndefined($v_2)&&this.$2W_2($v_2);CUI.Utility.$1j(this.get_properties(),this.$L_3);this.$K_3=CUI.Utility.$3("a");CUI.Utility.ensureCSSClassOnElement(this.$K_3,"ms-cui-dd-arrow-button");CUI.Utility.$1v(this.$K_3);this.$K_3.tabIndex=-1;this.$K_3.setAttribute("aria-haspopup",true);this.$20_3=CUI.Utility.$3("img");this.$21_3=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageDownArrow,this.$0_0.$5_1.ImageDownArrowClass,this.$20_3,true,false,this.$0_0.$5_1.ImageDownArrowTop,this.$0_0.$5_1.ImageDownArrowLeft);if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ToolTipTitle)){this.$20_3.alt=$v_1;this.$K_3.title=$v_1}this.$Bm_0("Medium");this.$8_3.appendChild(this.$L_3);this.$8_3.appendChild(this.$K_3);this.$K_3.appendChild(this.$21_3);return this.$8_3;default:this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId]=null;switch($p0){case "Medium":this.$8_3=$v_0;this.$L_3=$v_0.childNodes[0];this.$K_3=$v_0.childNodes[1];this.$21_3=this.$K_3.childNodes[0];this.$20_3=this.$21_3.childNodes[0];CUI.Utility.$2C(this.$L_3,false,false);break}},$Bm_0:function($p0){switch($p0){case "Medium":this.$R_3();break}},$R_3:function(){$addHandler(this.$L_3,"focus",this.$$d_onInputFocus);$addHandler(this.$L_3,"blur",this.$$d_onInputBlur);$addHandler(this.$L_3,"keydown",this.$$d_onInputKeyDown);$addHandler(this.$L_3,"mouseup",CUI.Utility.get_returnFalseHandler());$addHandler(this.$K_3,"mouseover",this.$$d_onArrowButtonFocus);$addHandler(this.$K_3,"mouseout",this.$$d_onArrowButtonBlur);$addHandler(this.$K_3,"click",this.$$d_onArrowButtonClick);$addHandler(this.$K_3,"focus",this.$$d_onArrowButtonFocus);$addHandler(this.$K_3,"blur",this.$$d_onArrowButtonBlur);$addHandler(this.$K_3,"keypress",this.$$d_onArrowButtonKeyPress)},onEnabledChanged:function($p0){if($p0){CUI.Utility.enableElement(this.$L_3);CUI.Utility.enableElement(this.$8_3)}else{CUI.Utility.disableElement(this.$L_3);CUI.Utility.disableElement(this.$8_3)}CUI.Controls.DropDown.prototype.onEnabledChanged.call(this,$p0)},get_$9h_0:function(){return "ComboBox"},get_$3E_0:function(){return "combobox"},$3p_3:null,get_menuItems:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$3p_3))this.$3p_3={};return this.$3p_3},set_menuItems:function($p0){this.$3p_3=$p0;return $p0},getFirstMenuItemThatBeginsWith:function($p0){var $$dict_1=this.$3p_3;for(var $$key_2 in $$dict_1){var $v_0={key:$$key_2,value:$$dict_1[$$key_2]};if($v_0.key.toLowerCase().startsWith($p0.toLowerCase()))return $v_0}return null},$5j_3:null,onInputKeyDown:function($p0){this.clearPendingAutoComplete();var $v_0=this.$L_3.value;this.$Y_0();if($p0&&$p0.rawEvent)if($p0.rawEvent.keyCode===40&&$p0.altKey){this.launchMenuInternal();return}if(CUI.ScriptUtility.isNullOrEmptyString($v_0))return;if($p0&&$p0.rawEvent){var $v_1=$p0.rawEvent.keyCode;switch($v_1){case 13:this.clearPendingAutoComplete();$p0.preventDefault();this.validateAndSave();return;case 27:this.clearPendingAutoComplete();!this.$j_1&&this.resetToPreviousValue();return;case 38:break;case 40:if($p0.altKey){this.launchMenuInternal();return}break;case 8:case 127:case 46:this.clearPendingAutoComplete();this.$5j_3=null;return;case 36:case 35:case 33:case 34:case 37:case 39:case 16:case 18:case 17:case 20:return}}if(CUI.Utility.$x(this.get_cbProperties().AutoComplete)){this.clearPendingAutoComplete();this.$3r_3=window.setTimeout(this.$$d_executeAutoComplete,this.$5B_3)}},executeAutoComplete:function(){this.$3r_3=-1;var $v_0=this.$L_3.value,$v_1=this.getFirstMenuItemThatBeginsWith($v_0);if(!$v_1){this.$5j_3=null;return}this.$L_3.value=$v_1.key;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var $v_2=this.$L_3.createTextRange();$v_2.moveStart("character",$v_0.length);$v_2.moveEnd("character",this.$L_3.value.length);$v_2.select()}else this.$L_3.setSelectionRange($v_0.length,this.$L_3.value.length);this.$5j_3=$v_1.value},clearPendingAutoComplete:function(){this.$3r_3!==-1&&window.clearTimeout(this.$3r_3);this.$3r_3=-1},$8d_0:function(){if(!this.get_enabled())return false;if(!CUI.ScriptUtility.isNullOrUndefined(this.$L_3)){this.$L_3.focus();return true}return false},onInputFocus:function($p0){this.$0_0.set_$p_1(this);this.onArrowButtonFocus($p0);CUI.Utility.$x(this.get_cbProperties().PopulateDynamically)&&this.pollForDynamicMenu(false);CUI.Utility.$8X(this.$L_3);!CUI.ScriptUtility.isNullOrUndefined(this.$B_1)&&this.$B_1.$1i_0()},onInputBlur:function($p0){this.clearPendingAutoComplete();this.onArrowButtonBlur($p0)},get_$67_3:function(){return this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.IsFreeForm]},set_$67_3:function($p0){this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.IsFreeForm]=$p0;return $p0},validateAndSave:function(){if(!this.$2W_2(this.$5j_3)){var $v_0=this.get_displayedComponent();if(!CUI.Utility.$x(this.get_cbProperties().AutoComplete)){var $v_1=this.$3p_3[this.$L_3.value];if(!CUI.ScriptUtility.isNullOrEmptyString($v_1)&&this.$2W_2($v_1)){this.set_$67_3(false);$v_0.raiseCommandEvent(this.get_cbProperties().Command,3,{IsFreeForm:false,CommandValueId:this._selectedControl.getCommandValueId()});return}}if(this.$6O_3){this.set_$67_3(true);this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.Value]=this.$L_3.value;$v_0.raiseCommandEvent(this.get_cbProperties().Command,3,{IsFreeForm:true,Value:this.$L_3.value})}else{this.resetToPreviousValue();return}}else{this.set_$67_3(false);this.get_displayedComponent().raiseCommandEvent(this.get_cbProperties().Command,3,{IsFreeForm:false,CommandValueId:this._selectedControl.getCommandValueId()})}},resetToPreviousValue:function(){if(!CUI.ScriptUtility.isNullOrUndefined(this._selectedControl))this.$L_3.value=this._selectedControl.getTextValue();else this.$L_3.value=""},selectMenuItem:function($p0){if(this._selectedControl===$p0)return;this._selectedControl=$p0;this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.SelectedItemId]=$p0.getMenuItemId();var $v_0=$p0;this.$L_3.value=$v_0.getTextValue()},$Ef_0:function(){var $v_0=this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.SelectedItemId];if(CUI.ScriptUtility.isNullOrUndefined($v_0))this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.SelectedItemId]=this.get_cbProperties().InitialItem;var $v_1=this.pollForStateAndUpdateInternal(this.get_cbProperties().Command,this.get_cbProperties().QueryCommand,this.get_stateProperties(),false),$v_2=this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.SelectedItemId];if($v_1)if(this.get_$67_3()){this.$L_3.value=this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.Value];this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.SelectedItemId]=null}else if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){if($v_0!==$v_2||!this._itemEverSelected)if(!this.$2W_2($v_2))throw Error.create("The menu item id requested via polling does not exist")}else if(!CUI.ScriptUtility.isNullOrUndefined(this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.Value]))this.$L_3.value=this.get_stateProperties()[CUI.Controls.ComboBoxCommandProperties.Value]},onDynamicMenuPopulated:function(){var $v_0=null,$v_1=null,$v_2=null,$v_3=null,$v_4=null,$v_5=null;if(CUI.ScriptUtility.isNullOrUndefined(this.$B_1))return;var $$enum_6=this.$B_1.$6_0.getEnumerator();while($$enum_6.moveNext()){var $v_6=$$enum_6.get_current(),$$enum_8=$v_6.$6_0.getEnumerator();while($$enum_8.moveNext()){var $v_7=$$enum_8.get_current();if(CUI.MenuItem.isInstanceOfType($v_7)){$v_0=$v_7;$v_1=$v_0.$N_1;if(CUI.ISelectableControl.isInstanceOfType($v_1)){$v_2=$v_1;$v_4=$v_2.getMenuItemId()}if(CUI.IMenuItem.isInstanceOfType($v_1)){$v_3=$v_1;$v_5=$v_3.getTextValue()}if(!(CUI.ScriptUtility.isNullOrUndefined($v_4)||CUI.ScriptUtility.isNullOrUndefined($v_5))){this.get_menuItems()[$v_5]=$v_4;$v_5=null;$v_4=null}}}}},launchMenuInternal:function(){this.launchMenu(this.$L_3,this.$$d_sendMenuCreationCommandEvent)&&this.sendMenuCreationCommandEvent()},dispose:function(){CUI.Controls.DropDown.prototype.dispose.call(this);this.$8_3=null;this.$20_3=null;this.$21_3=null;this.$K_3=null;this.$L_3=null},get_cbProperties:function(){return this.$5_0}};CUI.Controls.DropDownCommandProperties=function(){};CUI.Controls.DropDown=function($p0,$p1,$p2,$p3){this.$$d_onArrowButtonKeyboardFocus=Function.createDelegate(this,this.onArrowButtonKeyboardFocus);this.$$d_sendMenuCreationCommandEvent=Function.createDelegate(this,this.sendMenuCreationCommandEvent);this.$$d_onArrowButtonKeyPress=Function.createDelegate(this,this.onArrowButtonKeyPress);this.$$d_onArrowButtonClick=Function.createDelegate(this,this.onArrowButtonClick);this.$$d_onArrowButtonBlur=Function.createDelegate(this,this.onArrowButtonBlur);this.$$d_onArrowButtonFocus=Function.createDelegate(this,this.onArrowButtonFocus);CUI.Controls.DropDown.initializeBase(this,[$p0,$p1,$p2,$p3]);this.addDisplayModes();this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId]=null;this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.Value]=null};CUI.Controls.DropDown.prototype={$8_2:null,$Z_2:null,$K_2:null,$20_2:null,$21_2:null,$8d_0:function(){if(!this.get_enabled())return false;this.$K_2.focus();return true},createDOMElementForDisplayMode:function($p0){var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_properties().Alt)?"":this.get_properties().Alt,$v_1=CUI.ScriptUtility.isNullOrUndefined(this.get_properties().AltArrow)?$v_0:this.get_properties().AltArrow,$v_2=true;if(CUI.ScriptUtility.isNullOrEmptyString($v_1)&&!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ToolTipTitle))$v_1=this.get_properties().ToolTipTitle;var $v_3=null;switch($p0){case "Text":case "Medium":this.$8_2=CUI.Utility.$3("span");this.$8_2.className="ms-cui-dd";this.$8_2.setAttribute("mscui:controltype",this.get_$9h_0());this.$Z_2=CUI.Utility.$3("span");this.$Z_2.className="ms-cui-dd-text";this.$Z_2.style.width=this.get_properties().Width;var $v_4=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId];if(CUI.ScriptUtility.isNullOrUndefined($v_4))$v_4=this.get_properties().InitialItem;!CUI.ScriptUtility.isNullOrUndefined($v_4)&&this.$2W_2($v_4);this.$K_2=CUI.Utility.$3("a");this.$K_2.setAttribute("role",this.get_$3E_0());this.$K_2.setAttribute("aria-haspopup",true);CUI.Utility.ensureCSSClassOnElement(this.$K_2,"ms-cui-dd-arrow-button");CUI.Utility.$1j(this.get_properties(),this.$K_2);CUI.Utility.$1v(this.$K_2);this.$K_2.id=this.$4_0;this.$20_2=CUI.Utility.$3("img");this.$21_2=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageDownArrow,this.$0_0.$5_1.ImageDownArrowClass,this.$20_2,true,false,this.$0_0.$5_1.ImageDownArrowTop,this.$0_0.$5_1.ImageDownArrowLeft);if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ToolTipTitle)){this.$K_2.setAttribute("title",$v_1);this.$Z_2.title=$v_0;this.$20_2.alt=$v_1;$v_2=false}this.$Bm_0("Medium");this.$8_2.appendChild(this.$Z_2);this.$8_2.appendChild(this.$K_2);this.$K_2.appendChild(this.$21_2);if($v_2){$v_3=CUI.Utility.$2o($v_1);this.$K_2.appendChild($v_3)}return this.$8_2;default:this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Text":case "Medium":this.$8_2=$v_0;this.$Z_2=$v_0.childNodes[0];this.$K_2=$v_0.childNodes[1];this.$21_2=this.$K_2.childNodes[0];this.$20_2=this.$21_2.childNodes[0];break}},$Bm_0:function($p0){switch($p0){case "Text":case "Medium":this.$R_2();break}},$R_2:function(){$addHandler(this.$8_2,"click",this.$$d_onArrowButtonClick);$addHandler(this.$8_2,"keypress",this.$$d_onArrowButtonKeyPress);$addHandler(this.$K_2,"mouseover",this.$$d_onArrowButtonFocus);$addHandler(this.$K_2,"mouseout",this.$$d_onArrowButtonBlur);$addHandler(this.$K_2,"focus",this.$$d_onArrowButtonKeyboardFocus);$addHandler(this.$K_2,"blur",this.$$d_onArrowButtonBlur)},onEnabledChanged:function($p0){if($p0)CUI.Utility.enableElement(this.$8_2);else CUI.Utility.disableElement(this.$8_2)},get_$9h_0:function(){return "DropDown"},$2p_0:function($p0){if($p0.$I_1===3){var $v_0=$p0.$37_1;if(!CUI.ISelectableControl.isInstanceOfType($v_0.$N_1))return CUI.MenuLauncher.prototype.$2p_0.call(this,$p0);var $v_1=$v_0.$N_1;!CUI.ScriptUtility.isNullOrUndefined(this._selectedControl)&&this._selectedControl.deselect();this.selectMenuItem($v_1)}if($p0.$I_1===3||$p0.$I_1===7||$p0.$I_1===8){var $v_2;switch($p0.$I_1){case 3:$v_2=this.get_properties().Command;break;case 7:$v_2=this.get_properties().CommandPreview;break;case 8:$v_2=this.get_properties().CommandRevert;break;default:$v_2=this.get_properties().Command;break}this.get_displayedComponent().raiseCommandEvent($v_2,$p0.$I_1,$p0.$34_1);CUI.MenuLauncher.prototype.$2p_0.call(this,$p0);return false}return CUI.MenuLauncher.prototype.$2p_0.call(this,$p0)},selectMenuItem:function($p0){if(this._selectedControl===$p0)return;this._selectedControl=$p0;this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId]=$p0.getMenuItemId();var $v_0;if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().SelectedItemDisplayMode))$v_0="Text";else $v_0=this.get_properties().SelectedItemDisplayMode;var $v_1;if($v_0==="Text"){var $v_2=$p0.getTextValue();$v_1=CUI.Utility.$3("a");CUI.UIUtility.setInnerText($v_1,$v_2)}else $v_1=this._selectedControl.getDropDownDOMElementForDisplayMode($v_0);if(this.$Z_2.hasChildNodes()){var $v_3=this.$Z_2.firstChild;this.$Z_2.replaceChild($v_1,$v_3)}else this.$Z_2.appendChild($v_1)},_itemEverSelected:false,$2W_2:function($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0)||CUI.ScriptUtility.isNullOrUndefined(this.$B_1))return false;var $v_0=this.$B_1.$AF_1($p0);if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;this.selectMenuItem($v_0);this._itemEverSelected=true;return true},addDisplayModes:function(){this.addDisplayMode("Medium");this.addDisplayMode("Text")},onArrowButtonClick:function($p0){var $v_0=this.get_enabled();$v_0&&CUI.PMetrics.perfMark(7192);this.$Y_0();$p0.preventDefault();if(!$v_0)return;this.$0_0.set_$p_1(this);this.launchMenuInternal($p0);CUI.PMetrics.perfMark(7193)},launchMenuInternal:function($p0){this.launchMenu(this.$K_2,this.$$d_sendMenuCreationCommandEvent)&&this.sendMenuCreationCommandEvent()},sendMenuCreationCommandEvent:function(){this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandMenuOpen,4,null)},onBeginFocus:function(){var $v_0=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.Value];if(CUI.ScriptUtility.isNullOrUndefined($v_0)){var $v_1=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId];if(CUI.ScriptUtility.isNullOrUndefined($v_1))$v_1=this.get_properties().InitialItem;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&!CUI.ScriptUtility.isNullOrUndefined(this.$B_1)){var $v_2=this.$B_1.$AF_1($v_1);if(!CUI.ScriptUtility.isNullOrUndefined($v_2))$v_0=$v_2.getTextValue()}}if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.get_properties().ToolTipSelectedItemTitle=$v_0;CUI.Control.prototype.onBeginFocus.call(this)},onArrowButtonKeyboardFocus:function($p0){this.$0_0.set_$p_1(this);this.onArrowButtonFocus($p0)},onArrowButtonFocus:function($p0){this.onBeginFocus();if(!this.get_enabled())return;this.highlight()},onArrowButtonBlur:function($p0){this.onEndFocus();if(!this.get_enabled()||this.$j_1)return;this.removeHighlight()},onArrowButtonKeyPress:function($p0){this.$Y_0();if(!this.get_enabled())return;var $v_0=$p0.rawEvent.keyCode;if($v_0===13||$v_0===32||$v_0===40){this.$18_1=true;this.launchMenuInternal($p0)}},highlight:function(){CUI.Utility.ensureCSSClassOnElement(this.$K_2,"ms-cui-ctl-light-hoveredOver")},removeHighlight:function(){CUI.Utility.removeCSSClassFromElement(this.$K_2,"ms-cui-ctl-light-hoveredOver")},onLaunchedMenuClosed:function(){this.$Y_0();this.removeHighlight();this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandMenuClose,10,null);CUI.MenuLauncher.prototype.onLaunchedMenuClosed.call(this)},$Ef_0:function(){var $v_0=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId];if(CUI.ScriptUtility.isNullOrUndefined($v_0))this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId]=this.get_properties().InitialItem;this.pollForStateAndUpdateInternal(this.get_properties().Command,this.get_properties().QueryCommand,this.get_stateProperties(),false);var $v_1=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId];if(!CUI.ScriptUtility.isNullOrUndefined($v_1)){if($v_0!==$v_1||!this._itemEverSelected)if(!this.$2W_2($v_1))throw Error.create("The menu item id requested via polling does not exist")}else if(!CUI.ScriptUtility.isNullOrUndefined(this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.Value])){var $v_2=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.Value];this.$Z_2.innerHTML="<a>"+CUI.Utility.$3K($v_2)+"</a>"}},dispose:function(){CUI.MenuLauncher.prototype.dispose.call(this);this.$8_2=null;this.$20_2=null;this.$21_2=null;this.$K_2=null;this.$Z_2=null},get_properties:function(){return this.$5_0}};CUI.Controls.FlyoutAnchor=function($p0,$p1,$p2,$p3){this.$$d_$EG_2=Function.createDelegate(this,this.$EG_2);this.$$d_$EF_2=Function.createDelegate(this,this.$EF_2);this.$$d_$EH_2=Function.createDelegate(this,this.$EH_2);this.$$d_$2l_2=Function.createDelegate(this,this.$2l_2);this.$$d_$6C_2=Function.createDelegate(this,this.$6C_2);this.$$d_$6D_2=Function.createDelegate(this,this.$6D_2);this.$$d_$48_2=Function.createDelegate(this,this.$48_2);this.$$d_$EQ_2=Function.createDelegate(this,this.$EQ_2);this.$$d_$EP_2=Function.createDelegate(this,this.$EP_2);this.$$d_$EX_2=Function.createDelegate(this,this.$EX_2);this.$$d_$Ak_2=Function.createDelegate(this,this.$Ak_2);this.$$d_$53_2=Function.createDelegate(this,this.$53_2);this.$$d_onClick=Function.createDelegate(this,this.onClick);CUI.Controls.FlyoutAnchor.initializeBase(this,[$p0,$p1,$p2,$p3]);this.addDisplayMode("Menu");this.addDisplayMode("Menu16");this.addDisplayMode("Menu32");this.addDisplayMode("Small");this.addDisplayMode("Medium");this.addDisplayMode("Large");this.addDisplayMode("Thin")};CUI.Controls.FlyoutAnchor.prototype={$5O_2:null,$5P_2:null,$3c_2:null,$4Y_2:null,$6f_2:null,$4Z_2:null,$6g_2:null,$i_2:null,$T_2:null,$a_2:null,$G_2:null,$8t_2:null,$1y_2:null,$8_2:null,$8v_2:null,$2K_2:null,$9_2:null,$8y_2:null,$2M_2:null,$1b_2:null,$3e_2:null,$4c_2:null,createDOMElementForDisplayMode:function($p0){var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().Alt)?this.get_$1_2().LabelText:this.get_$1_2().Alt;switch($p0){case "Menu":this.$i_2=this.createMenuDOMElement("Menu","ms-cui-textmenuitem ms-cui-fa-menuitem ms-cui-ctl-menu",$v_0,null,null,null,null);this.$Bm_0($p0);this.$i_2.setAttribute("aria-haspopup",true);return this.$i_2;case "Menu16":this.$T_2=this.createMenuDOMElement("Menu16","ms-cui-fa-menuitem ms-cui-ctl-menu",$v_0,this.get_$1_2().Image16by16,this.get_$1_2().Image16by16Class,this.get_$1_2().Image16by16Top,this.get_$1_2().Image16by16Left);this.$Bm_0($p0);this.$T_2.setAttribute("aria-haspopup",true);return this.$T_2;case "Menu32":this.$a_2=this.createMenuDOMElement("Menu32","ms-cui-fa-menuitem ms-cui-ctl-menu",$v_0,this.get_$1_2().Image32by32,this.get_$1_2().Image32by32Class,this.get_$1_2().Image32by32Top,this.get_$1_2().Image32by32Left);this.$a_2.setAttribute("aria-haspopup",true);this.$Bm_0($p0);return this.$a_2;case "Large":this.$G_2=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Large",this.get_$1_2(),false,true);this.$G_2.setAttribute("aria-haspopup",true);this.$6o_2&&CUI.Utility.ensureCSSClassOnElement(this.$G_2,"ms-cui-ctl-large-groupPopup");this.$Bm_0("Large");return this.$G_2;case "Medium":this.$8_2=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Medium",this.get_$1_2(),false,true);this.$Bm_0("Medium");this.$8_2.setAttribute("aria-haspopup",true);return this.$8_2;case "Small":this.$9_2=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Small",this.get_$1_2(),false,true);this.$Bm_0("Small");this.$9_2.setAttribute("aria-haspopup",true);return this.$9_2;case "Thin":this.$1b_2=CUI.Utility.$4z();this.$1b_2.className="ms-cui-ctl-thin";this.$3e_2=CUI.Utility.$3("img");this.$3e_2.alt="";if(CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_2().ToolTipTitle)){this.$1b_2.title=$v_0;this.$3e_2.alt=$v_0}var $v_1=this.$0_0;this.$4c_2=CUI.Utility.$k(2,1,$v_1.$5_1.ImageDownArrow,$v_1.$5_1.ImageDownArrowClass,this.$3e_2,true,false,$v_1.$5_1.ImageDownArrowTop,$v_1.$5_1.ImageDownArrowLeft);this.$1b_2.appendChild(this.$4c_2);this.$Bm_0("Thin");this.$1b_2.setAttribute("aria-haspopup",true);return this.$1b_2;default:this.ensureValidDisplayMode($p0);break}return null},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);!CUI.ScriptUtility.isNullOrUndefined($v_0)&&this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Large":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$G_2=$v_0;this.$8t_2=this.$G_2.childNodes[0].childNodes[0];this.$1y_2=this.$G_2.lastChild.lastChild.childNodes[0];break;case "Medium":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$8_2=$v_0;this.$8v_2=this.$8_2.childNodes[0].childNodes[0];this.$2K_2=this.$8_2.lastChild.lastChild.childNodes[0];break;case "Small":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$9_2=$v_0;this.$8y_2=this.$9_2.childNodes[0].childNodes[0];this.$2M_2=this.$9_2.lastChild.lastChild.childNodes[0];break;case "Thin":this.$1b_2=$v_0;this.$4c_2=$v_0.firstChild;this.$3e_2=this.$4c_2.firstChild;break}},get_$9h_0:function(){return "FlyoutAnchor"},createMenuDOMElement:function($p0,$p1,$p2,$p3,$p4,$p5,$p6){var $v_0=CUI.Utility.$4z();$v_0.className=$p1;$v_0.title=$p2;$v_0.setAttribute("mscui:controltype",this.get_$9h_0());CUI.Utility.$1j(this.get_$1_2(),$v_0);var $v_1=null;switch($p0){case "Menu16":if(CUI.ScriptUtility.isNullOrUndefined(this.$4Y_2)){this.$4Y_2=CUI.Utility.$3("img");this.$6f_2=CUI.Utility.$k(2,3,$p3,$p4,this.$4Y_2,true,true,$p5,$p6);this.$4Y_2.alt=$p2;$v_1=this.$6f_2}break;case "Menu32":if(CUI.ScriptUtility.isNullOrUndefined(this.$4Z_2)){this.$4Z_2=CUI.Utility.$3("img");this.$6g_2=CUI.Utility.$k(2,4,$p3,$p4,this.$4Z_2,true,true,$p5,$p6);this.$4Z_2.alt=$p2;$v_1=this.$6g_2}break}this.createMenuLabelDOMElementIfNeeded($p0);if(CUI.ScriptUtility.isNullOrUndefined(this.$5O_2)){this.$5O_2=CUI.Utility.$3("img");this.$5P_2=CUI.Utility.$k(2,2,this.$0_0.$5_1.ImageSideArrow,this.$0_0.$5_1.ImageSideArrowClass,this.$5O_2,false,true,this.$0_0.$5_1.ImageSideArrowTop,this.$0_0.$5_1.ImageSideArrowLeft);CUI.Utility.ensureCSSClassOnElement(this.$5P_2,"ms-cui-fa-menu-arrow")}if($v_1){var $v_2=CUI.Utility.$3("span");$v_2.className="ms-cui-ctl-iconContainer";$v_2.appendChild($v_1);$v_0.appendChild($v_2)}$v_0.appendChild(this.$3c_2);$v_0.appendChild(this.$5P_2);return $v_0},createMenuLabelDOMElementIfNeeded:function($p0){if(CUI.ScriptUtility.isNullOrUndefined(this.$3c_2)){this.$3c_2=CUI.Utility.$3("span");this.$3c_2.className="ms-cui-ctl-mediumlabel";CUI.UIUtility.setInnerText(this.$3c_2,this.get_$1_2().LabelText)}},$Bm_0:function($p0){var $v_0=this.getDisplayedDOMElement($p0);if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;var $v_1={click:this.$$d_onClick,blur:this.$$d_$53_2,keypress:this.$$d_$Ak_2,focus:this.$$d_$EX_2},$v_2;if(Sys.Browser.agent===Sys.Browser.InternetExplorer)if($p0.startsWith("Menu"))$v_2={mouseenter:this.$$d_$EP_2,mouseleave:this.$$d_$EQ_2};else $v_2={mouseenter:this.$$d_$48_2,mouseleave:this.$$d_$53_2};else if($p0.startsWith("Menu"))$v_2={mouseover:this.$$d_$6D_2,mouseout:this.$$d_$6C_2};else $v_2={mouseover:this.$$d_$48_2,mouseout:this.$$d_$53_2};$addHandlers($v_0,$v_1);$addHandlers($v_0,$v_2)},onEnabledChanged:function($p0){CUI.Utility.setEnabledOnElement(this.$i_2,$p0);CUI.Utility.setEnabledOnElement(this.$T_2,$p0);CUI.Utility.setEnabledOnElement(this.$a_2,$p0);CUI.Utility.setEnabledOnElement(this.$G_2,$p0);CUI.Utility.setEnabledOnElement(this.$8_2,$p0);CUI.Utility.setEnabledOnElement(this.$9_2,$p0);CUI.Utility.setEnabledOnElement(this.$1b_2,$p0)},positionMenu:function($p0,$p1){if(this.get_displayedComponent().get_displayMode().startsWith("Menu"))this.$0_0.$Ek_1($p0,$p1);else CUI.MenuLauncher.prototype.positionMenu.call(this,$p0,$p1)},createComponentForDisplayModeInternal:function($p0){var $v_0;if($p0.startsWith("Menu"))$v_0=this.$0_0.$42_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);else $v_0=CUI.Control.prototype.createComponentForDisplayModeInternal.call(this,$p0);return $v_0},getDisplayedDOMElement:function($p0){switch($p0){case "Menu":return this.$i_2;case "Menu16":return this.$T_2;case "Menu32":return this.$a_2;case "Large":return this.$G_2;case "Medium":return this.$8_2;case "Small":return this.$9_2;case "Thin":return this.$1b_2;default:this.ensureValidDisplayMode($p0);return null}},onClick:function($p0){var $v_0=this.get_enabled();$v_0&&!this.$j_1&&CUI.PMetrics.perfMark(7190);this.$Y_0();$p0.preventDefault();if(!$v_0||this.$j_1)return;this.$0_0.set_$45_1(this);var $v_1=this.get_displayedComponent(),$v_2=$v_1.get_$2_0();this.$69_2($v_2);!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().Command)&&$v_1.raiseCommandEvent(this.get_$1_2().Command,4,null);CUI.PMetrics.perfMark(7191)},$48_2:function($p0){this.onBeginFocus();if(!this.get_enabled())return},$EP_2:function($p0){this.onBeginFocus();if(!this.get_enabled()||this.$j_1)return;var $v_0=this.get_displayedComponent(),$v_1=$v_0.get_$2_0();this.$69_2($v_1);var $v_2=this.get_$1_2().Command;!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_0.raiseCommandEvent($v_2,4,null)},$6D_2:function($p0){this.onBeginFocus();if(!this.get_enabled()||this.$j_1)return;var $v_0=$p0.target;while($v_0.nodeType!==1||$v_0.tagName.toLowerCase()!=="a")$v_0=$v_0.parentNode;var $v_1=$p0.rawEvent.relatedTarget;if(!($v_0===this.$i_2||$v_0===this.$T_2||$v_0===this.$a_2))return;while($v_1!==$v_0){try{if($v_1.nodeName.toLowerCase()==="body")break}catch($$e_3){break}$v_1=$v_1.parentNode}if($v_1===$v_0)return;var $v_2=this.get_displayedComponent(),$v_3=$v_2.get_$2_0();this.$69_2($v_3);var $v_4=this.get_$1_2().Command;!CUI.ScriptUtility.isNullOrUndefined($v_4)&&$v_2.raiseCommandEvent($v_4,4,null)},$EH_2:function($p0){var $v_0=Array.indexOf(this.$0_0.$X_1,this),$v_1=this.$0_0.$2h_1;if($v_1!==-1&&$v_0>=this.$0_0.$3s_1){window.clearTimeout($v_1);this.$0_0.$2h_1=-1;this.$0_0.$3s_1=-1}},$EX_2:function($p0){this.onBeginFocus();this.get_displayedComponent().get_displayMode().startsWith("Menu")&&this.$3J_2(this.get_enabled());this.get_enabled()&&this.$0_0.set_$p_1(this)},$53_2:function($p0){this.onEndFocus();if(this.$j_1)return;this.$1L_2()},$EQ_2:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(this.$j_1){for(var $v_0=Array.indexOf(this.$0_0.$X_1,this),$v_1=$v_0;$v_1<this.$0_0.$X_1.length;$v_1++)if(CUI.Utility.isDescendantOf(this.$0_0.$X_1[$v_1].$B_1.get_$2_0(),$p0.rawEvent.toElement))return;this.$6I_2()}this.$1L_2()},$EF_2:function($p0){this.onEndFocus();if(CUI.Utility.isDescendantOf(this.get_displayedComponent().get_$2_0(),$p0.rawEvent.toElement))return;if(this.$j_1){for(var $v_0=Array.indexOf(this.$0_0.$X_1,this),$v_1=$v_0;$v_1<this.$0_0.$X_1.length;$v_1++)if(CUI.Utility.isDescendantOf(this.$0_0.$X_1[$v_1].$B_1.get_$2_0(),$p0.rawEvent.toElement))return;this.$6I_2()}},$6C_2:function($p0){this.onEndFocus();if(!this.get_enabled()||CUI.Utility.isDescendantOf(this.get_displayedComponent().get_$2_0(),$p0.rawEvent.relatedTarget))return;if(this.$j_1){for(var $v_0=Array.indexOf(this.$0_0.$X_1,this),$v_1=$v_0;$v_1<this.$0_0.$X_1.length;$v_1++)if(CUI.Utility.isDescendantOf(this.$0_0.$X_1[$v_1].$B_1.get_$2_0(),$p0.rawEvent.relatedTarget))return;this.$6I_2()}},$EG_2:function($p0){this.onEndFocus();if(CUI.Utility.isDescendantOf(this.get_displayedComponent().get_$2_0(),$p0.rawEvent.relatedTarget))return;if(this.$j_1){for(var $v_0=Array.indexOf(this.$0_0.$X_1,this),$v_1=$v_0;$v_1<this.$0_0.$X_1.length;$v_1++)if(CUI.Utility.isDescendantOf(this.$0_0.$X_1[$v_1].$B_1.get_$2_0(),$p0.rawEvent.relatedTarget))return;this.$6I_2()}this.$1L_2()},$Ak_2:function($p0){this.$Y_0();if(!this.get_enabled())return;var $v_0=$p0.rawEvent.keyCode;if(this.$j_1)(!this.$0_0._textDirection&&$v_0===39||this.$0_0._textDirection===1&&$v_0===37)&&this.$B_1.$7z_0();else if($v_0===13||$v_0===32||(!this.$0_0._textDirection&&$v_0===39||this.$0_0._textDirection===1&&$v_0===37)&&(!$p0.ctrlKey||!$p0.shiftKey)){this.$18_1=true;var $v_1=this.get_displayedComponent(),$v_2=$v_1.get_$2_0(),$v_3=this.get_$1_2().Command;!CUI.ScriptUtility.isNullOrUndefined($v_3)&&$v_1.raiseCommandEvent($v_3,4,null);this.$69_2($v_2)}},$6j_2:false,onModalKeyPress:function($p0){if($p0)if($p0.rawEvent)if((!this.$0_0._textDirection&&$p0.rawEvent.keyCode===37||this.$0_0._textDirection===1&&$p0.rawEvent.keyCode===39)&&this.get_displayedComponent().get_displayMode().startsWith("Menu")||$p0.rawEvent.keyCode===27){this.$0_0.$2l_1(this);return}if(this.$6o_2){if(this.$6j_2)return;if(this.$B_1.$8e_0())this.$6j_2=true;$p0.preventDefault()}else CUI.MenuLauncher.prototype.onModalKeyPress.call(this,$p0)},onModalBodyClick:function($p0){this.$0_0.$40_1()},onLaunchedMenuClosed:function(){var $v_0=this.$0_0.$2h_1;$v_0!==-1&&window.clearTimeout($v_0);this.$0_0.$2h_1=-1;this.$0_0.$3s_1=-1;this.$1L_2();this.$Y_0();var $v_1=this.get_displayedComponent();if($v_1.get_displayMode().startsWith("Menu")){var $v_2=$v_1.$M_0.$M_0;$v_2.set_$At_1(null)}$v_1.raiseCommandEvent(this.get_$1_2().CommandMenuClose,10,null);CUI.MenuLauncher.prototype.onLaunchedMenuClosed.call(this)},$6I_2:function(){var $v_0=this.$0_0.$2h_1;$v_0!==-1&&window.clearTimeout($v_0);if(null===this.$6Q_2)this.$6Q_2=this.$$d_$2l_2;this.$0_0.$3s_1=Array.indexOf(this.$0_0.$X_1,this);this.$0_0.$2h_1=window.setTimeout(this.$6Q_2,500)},$6Q_2:null,$2l_2:function(){this.$0_0.$2l_1(this);this.$0_0.$2h_1=-1;this.$0_0.$3s_1=-1},$7F_2:null,$7D_2:null,$7E_2:null,$69_2:function($p0){this.$Y_0();this.$3J_2(true);this.$0_0.$30_1=false;this.$6j_2=false;var $v_0=this.get_displayedComponent(),$v_1=$v_0.get_displayMode().startsWith("Menu");if($v_1){var $v_2=$v_0.$M_0.$M_0;$v_2.set_$At_1(this)}this.launchMenu($p0);if(!$v_1)return;if(null===this.$7F_2)this.$7F_2=this.$$d_$EH_2;$addHandler(this.$B_1.get_$2_0(),"mouseover",this.$7F_2);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){if(null===this.$7D_2)this.$7D_2=this.$$d_$EF_2;$addHandler(this.$B_1.get_$2_0(),"mouseleave",this.$7D_2)}else{if(null===this.$7E_2)this.$7E_2=this.$$d_$EG_2;$addHandler(this.$B_1.get_$2_0(),"mouseout",this.$7E_2)}},$1L_2:function(){var $v_0="ms-cui-ctl-disabledHoveredOver",$v_1="ms-cui-ctl-hoveredOver";CUI.Utility.removeCSSClassFromElement(this.$i_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$T_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$a_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$G_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$8_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$9_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$1b_2,$v_1);CUI.Utility.removeCSSClassFromElement(this.$i_2,$v_0);CUI.Utility.removeCSSClassFromElement(this.$T_2,$v_0);CUI.Utility.removeCSSClassFromElement(this.$a_2,$v_0)},$3J_2:function($p0){var $v_0="ms-cui-ctl-hoveredOver";if(!$p0){$v_0="ms-cui-ctl-disabledHoveredOver";CUI.Utility.ensureCSSClassOnElement(this.$i_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$T_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$a_2,$v_0)}else{CUI.Utility.ensureCSSClassOnElement(this.$i_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$T_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$a_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$G_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$8_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$9_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$1b_2,$v_0)}},$6o_2:false,getTextValue:function(){return this.get_$1_2().LabelText},$8d_0:function(){if(!this.get_enabled())return false;this.receiveFocus();return true},receiveFocus:function(){var $v_0=this.get_displayedComponent().get_$2_0();!CUI.ScriptUtility.isNullOrUndefined($v_0)&&$v_0.focus()},onMenuClosed:function(){this.$1L_2()},dispose:function(){CUI.MenuLauncher.prototype.dispose.call(this);this.$1b_2=null;this.$3e_2=null;this.$4c_2=null;this.$G_2=null;this.$1y_2=null;this.$8t_2=null;this.$8_2=null;this.$2K_2=null;this.$8v_2=null;this.$i_2=null;this.$T_2=null;this.$a_2=null;this.$5O_2=null;this.$5P_2=null;this.$4Y_2=null;this.$6f_2=null;this.$4Z_2=null;this.$6g_2=null;this.$3c_2=null;this.$9_2=null;this.$2M_2=null;this.$8y_2=null},get_$1_2:function(){return this.$5_0}};CUI.Controls.GalleryButtonCommandProperties=function(){};CUI.Controls.GalleryButton=function($p0,$p1,$p2,$p3){this.$$d_onBlur=Function.createDelegate(this,this.onBlur);this.$$d_onFocus=Function.createDelegate(this,this.onFocus);this.$$d_onClick=Function.createDelegate(this,this.onClick);CUI.Controls.GalleryButton.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Large");this.addDisplayMode("Menu");this.$4L_1=$p3};CUI.Controls.GalleryButton.prototype={$F_1:null,$J_1:null,$4O_1:null,$4P_1:null,$4L_1:0,createComponentForDisplayModeInternal:function($p0){var $v_0;if($p0==="Menu"){$v_0=this.$0_0.$42_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().CommandValueId))this.get_properties().CommandValueId=this.get_properties().MenuItemId}else $v_0=CUI.Control.prototype.createComponentForDisplayModeInternal.call(this,$p0);return $v_0},createDOMElementForDisplayMode:function($p0){switch($p0){case "Large":case "Menu":var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_properties().Alt)?"":this.get_properties().Alt;this.$F_1=CUI.Utility.$3("span");this.$F_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$F_1.className="ms-cui-gallerybutton ms-cui-gallerybutton-"+CUI.Utility.$A6[this.$4L_1];this.$J_1=CUI.Utility.$3("a");this.$J_1.title=$v_0;this.$J_1.className="ms-cui-gallerybutton-a";CUI.Utility.$1v(this.$J_1);CUI.Utility.$1j(this.get_properties(),this.$J_1);this.$F_1.appendChild(this.$J_1);if(!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().InnerHTML)){this.$J_1.innerHTML=this.get_properties().InnerHTML;CUI.Utility.$2C(this.$J_1,true,true)}else{if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().Image))throw Error.create("InnerHTML or Image must be defined for this GalleryButton");var $v_1=4;switch(this.$4L_1){case 1:$v_1=3;break;case 2:$v_1=4;break;case 3:$v_1=5;break;case 4:$v_1=6;break;case 5:$v_1=7;break;case 6:$v_1=8;break;case 7:$v_1=9;break}this.$4O_1=CUI.Utility.$3("img");this.$4P_1=CUI.Utility.$k(2,$v_1,this.get_properties().Image,this.get_properties().ImageClass,this.$4O_1,true,false,this.get_properties().ImageTop,this.get_properties().ImageLeft);this.$4O_1.alt=$v_0;this.$J_1.appendChild(this.$4P_1)}this.$Bm_0($p0);return this.$F_1;default:this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Large":case "Menu":this.$F_1=$v_0;this.$J_1=this.$F_1.childNodes[0];this.$4P_1=this.$J_1.childNodes[0];this.$4O_1=this.$4P_1.childNodes[0];break}},$Bm_0:function($p0){switch($p0){case "Large":case "Menu":this.$R_1();break}},$R_1:function(){$addHandler(this.$J_1,"click",this.$$d_onClick);$addHandler(this.$J_1,"focus",this.$$d_onFocus);$addHandler(this.$J_1,"mouseover",this.$$d_onFocus);$addHandler(this.$J_1,"blur",this.$$d_onBlur);$addHandler(this.$J_1,"mouseout",this.$$d_onBlur)},get_$9h_0:function(){return "GalleryButton"},onEnabledChanged:function($p0){if($p0)CUI.Utility.enableElement(this.$J_1);else CUI.Utility.disableElement(this.$J_1)},onClick:function($p0){this.$Y_0();$p0.preventDefault();if(!this.get_enabled())return;this.toggle();var $v_0=1,$v_1=this.get_properties().CommandType,$v_2=this.get_stateProperties();$v_2[CUI.Controls.GalleryButtonCommandProperties.CommandValueId]=this.get_properties().CommandValueId;$v_2["MenuItemId"]=this.get_properties().MenuItemId;$v_2["SourceControlId"]=this.get_properties().Id;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1==="OptionSelection")$v_0=3;this.get_displayedComponent().raiseCommandEvent(this.get_properties().Command,$v_0,$v_2);if(this.$0_0.get_$55_1())this.$Ef_0();else this.$57_1(this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.On])},onFocus:function($p0){this.onBeginFocus();if(!this.get_enabled())return;this.$0_0.set_$p_1(this);if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().CommandPreview))return;var $v_0=5,$v_1=this.get_properties().CommandType;this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.CommandValueId]=this.get_properties().CommandValueId;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1==="OptionSelection")$v_0=7;this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandPreview,$v_0,this.get_stateProperties())},onBlur:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().CommandRevert))return;var $v_0=6,$v_1=this.get_properties().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1==="OptionSelection"){$v_0=8;this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.CommandValueId]=this.get_properties().CommandValueId}this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandRevert,$v_0,this.get_stateProperties())},getDropDownDOMElementForDisplayMode:function($p0){return CUI.Utility.$3("span")},deselect:function(){this.set_selected(false)},getMenuItemId:function(){return this.get_properties().MenuItemId},getCommandValueId:function(){return this.get_properties().CommandValueId},focusOnDisplayedComponent:function(){this.receiveFocus()},getTextValue:function(){return this.get_properties().Alt},receiveFocus:function(){this.$J_1.focus()},onMenuClosed:function(){CUI.Control.prototype.onMenuClosed.call(this)},$3J_1:function(){CUI.Utility.ensureCSSClassOnElement(this.$F_1,"ms-cui-gallerybutton-highlighted")},$1L_1:function(){CUI.Utility.removeCSSClassFromElement(this.$F_1,"ms-cui-gallerybutton-highlighted")},toggle:function(){var $v_0=!this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.On];this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.On]=$v_0;this.$57_1($v_0)},$57_1:function($p0){if($p0)this.$3J_1();else this.$1L_1()},$Ef_0:function(){var $v_0=this.get_stateProperties();$v_0[CUI.Controls.GalleryButtonCommandProperties.CommandValueId]=this.get_properties().CommandValueId;$v_0["MenuItemId"]=this.get_properties().MenuItemId;$v_0["SourceControlId"]=this.get_properties().Id;var $v_1=this.pollForStateAndUpdateInternal(this.get_properties().Command,this.get_properties().QueryCommand,$v_0,false);$v_1&&this.$57_1(this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.On])},get_selected:function(){return this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.On]},set_selected:function($p0){this.get_stateProperties()[CUI.Controls.GalleryButtonCommandProperties.On]=$p0;if($p0)this.$3J_1();else this.$1L_1();return $p0},get_elementDimensions:function(){return this.$4L_1},set_elementDimensions:function($p0){this.$4L_1=$p0;return $p0},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$F_1=null;this.$J_1=null;this.$4O_1=null;this.$4P_1=null},get_properties:function(){return this.$5_0}};CUI.Controls.InsertTableCommandProperties=function(){};CUI.Controls.InsertTable=function($p0,$p1,$p2){this.$$d_$Ag_1=Function.createDelegate(this,this.$Ag_1);this.$$d_$Ai_1=Function.createDelegate(this,this.$Ai_1);this.$$d_$Ah_1=Function.createDelegate(this,this.$Ah_1);this.$$d_$E5_1=Function.createDelegate(this,this.$E5_1);this.$1c_1=-1;this.$4A_1=-1;this.$4B_1=-1;CUI.Controls.InsertTable.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Menu")};CUI.Controls.InsertTable.prototype={$2O_1:null,$4q_1:null,createComponentForDisplayModeInternal:function($p0){if(this.$l_0.length>0)throw Error.create("Only one ControlComponent can be created for each InsertTable Control");var $v_0;$v_0=this.$0_0.$42_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);return $v_0},$F_1:null,$2u_1:null,createDOMElementForDisplayMode:function($p0){switch($p0){case "Menu":this.$F_1=CUI.Utility.$3("table");this.$F_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$2u_1=CUI.Utility.$3("tbody");this.$2u_1.className="ms-cui-it";this.$F_1.setAttribute("cellspacing","0");this.$F_1.setAttribute("cellpadding","0");this.$2u_1.setAttribute("cellspacing","0");this.$2u_1.setAttribute("cellpadding","0");$addHandler(this.$F_1,"mouseout",this.$$d_$E5_1);this.$Co_1();for(var $v_0,$v_1,$v_2,$v_3,$v_4,$v_5=0,$v_6=0;$v_6<10;$v_6++){$v_0=CUI.Utility.$3("tr");this.$2u_1.appendChild($v_0);for(var $v_7=0;$v_7<10;$v_7++){$v_1=CUI.Utility.$3("td");$v_1.style.padding="0px";$v_0.appendChild($v_1);$v_2=CUI.Utility.$3("a");CUI.Utility.$1v($v_2);CUI.Utility.$1j(this.get_$1_1(),$v_2);$addHandler($v_2,"focus",this.$$d_$Ah_1);$v_3=CUI.Utility.$3("div");$v_3.className="ms-cui-it-inactiveCell";$v_4=CUI.Utility.$3("div");$v_4.id=this.$4_0+"-"+$v_5;$v_4.className="ms-cui-it-inactiveCellOuter";$addHandler($v_1,"mouseover",this.$$d_$Ai_1);$addHandler($v_1,"click",this.$$d_$Ag_1);$v_1.appendChild($v_4);$v_4.appendChild($v_3);$v_3.appendChild($v_2);this.$2O_1[$v_5]=$v_3;this.$4q_1[$v_5]=$v_4;$v_5++}}this.$F_1.appendChild(this.$2u_1);return this.$F_1;default:this.ensureValidDisplayMode($p0);break}return null},onEnabledChanged:function($p0){},get_$9h_0:function(){return "InsertTable"},$Ag_1:function($p0){!CUI.ScriptUtility.isNullOrUndefined(CUI.PMetrics)&&CUI.PMetrics.perfMark(7702);$p0.preventDefault();if(!this.get_enabled())return;var $v_0=this.$87_1($p0.target),$v_1=this.$85_1($v_0),$v_2=this.$51_1($v_1),$v_3=this.$52_1($v_1);this.$7i_1();this.get_commandProperties()["Rows"]=$v_3+1;this.get_commandProperties()["Columns"]=$v_2+1;this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().Command,1,this.get_commandProperties());!CUI.ScriptUtility.isNullOrUndefined(CUI.PMetrics)&&CUI.PMetrics.perfMark(7703)},$87_1:function($p0){while($p0.hasChildNodes())$p0=$p0.childNodes[0];return $p0.parentNode.parentNode},$BN_1:function($p0){var $v_0=$p0.childNodes[0].childNodes[0],$v_1=this.$85_1($p0);$v_0.title=this.$A8_1(this.$52_1($v_1)+1,this.$51_1($v_1)+1)},$A8_1:function($p0,$p1){var $v_0=this.get_$1_1().Alt;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0=this.get_$1_1().MenuSectionTitle;$v_0=String.format($v_0,$p1.toString(),$p0.toString());return $v_0},$Ai_1:function($p0){if(!this.get_enabled())return;var $v_0=this.$87_1($p0.target);this.$BN_1($v_0);this.$AM_1($v_0)},$Ah_1:function($p0){if(!this.get_enabled())return;var $v_0=this.$87_1($p0.target);this.$BN_1($v_0);this.$AM_1($v_0)},$E5_1:function($p0){var $v_0=CUI.Utility.$AC(this.$F_1);($p0.clientX<=$v_0.x||$p0.clientX>=$v_0.x+$v_0.width||$p0.clientY<=$v_0.y||$p0.clientY>=$v_0.y+$v_0.height)&&this.$6G_1()},$6G_1:function(){this.$FM_1();this.$7s_1();this.$4A_1=-1;this.$4B_1=-1;this.$3M_1=false},$85_1:function($p0){return parseInt($p0.id.substr(this.$4_0.length+1))},$3M_1:false,$AM_1:function($p0){var $v_0=this.$85_1($p0);if(this.$1c_1===$v_0)return;this.$DX_1($v_0)},$DX_1:function($p0){this.$Bj_1($p0);this.$1c_1=$p0;this.$7s_1();this.$BB_1($p0)},$52_1:function($p0){return Math.floor($p0/10)},$51_1:function($p0){return $p0%10},$Bj_1:function($p0){var $v_0=this.$51_1($p0),$v_1=this.$52_1($p0),$v_2=-1,$v_3=-1;if(this.$1c_1!==-1){$v_2=this.$52_1(this.$1c_1);$v_3=this.$51_1(this.$1c_1)}while($v_2!==$v_1||$v_3!==$v_0)if($v_2<$v_1)this.$BK_1(++$v_2,$v_3,true);else if($v_2>$v_1){this.$BK_1($v_2,$v_3,false);$v_2--}else if($v_3<$v_0)this.$BD_1(++$v_3,$v_2,true);else if($v_3>$v_0){this.$BD_1($v_3,$v_2,false);$v_3--}this.get_$AR_1().$BM_1(this.$A8_1($v_1+1,$v_0+1))},$BK_1:function($p0,$p1,$p2){for(var $v_0=0;$v_0<=$p1;$v_0++)this.$BC_1($p0,$v_0,$p2)},$BD_1:function($p0,$p1,$p2){for(var $v_0=0;$v_0<=$p1;$v_0++)this.$BC_1($v_0,$p0,$p2)},$BC_1:function($p0,$p1,$p2){var $v_0=$p0*10+$p1,$v_1=this.$2O_1[$v_0],$v_2=this.$4q_1[$v_0];if($p2){$v_1.className="ms-cui-it-activeCell";$v_2.className="ms-cui-it-activeCellOuter"}else{$v_1.className="ms-cui-it-inactiveCell";$v_2.className="ms-cui-it-inactiveCellOuter"}},$FM_1:function(){for(var $v_1=0;$v_1<100;$v_1++){this.$2O_1[$v_1].className="ms-cui-it-inactiveCell";this.$4q_1[$v_1].className="ms-cui-it-inactiveCellOuter"}this.$1c_1=-1;var $v_0=this.get_$1_1().MenuSectionInitialTitle;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0="";this.get_$AR_1().$BM_1($v_0)},$Co_1:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$2O_1))this.$2O_1=new Array(100);if(CUI.ScriptUtility.isNullOrUndefined(this.$4q_1))this.$4q_1=new Array(100)},receiveFocus:function(){var $v_0=this.$2O_1[0];if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;$v_0.firstChild.focus()},$7i_1:function(){this.$4A_1=-1;this.$4B_1=-1;this.$3M_1=false},$7s_1:function(){if(this.$3M_1){var $v_0=this.get_$1_1().CommandRevert;if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){this.get_commandProperties()["Rows"]=this.$4B_1+1;this.get_commandProperties()["Columns"]=this.$4A_1+1;this.get_displayedComponent().raiseCommandEvent($v_0,6,this.get_commandProperties())}this.$7i_1()}},$BB_1:function($p0){this.$4A_1=this.$51_1($p0);this.$4B_1=this.$52_1($p0);this.$3M_1=true;var $v_0=this.get_$1_1().CommandPreview;if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){this.get_commandProperties()["Rows"]=this.$4B_1+1;this.get_commandProperties()["Columns"]=this.$4A_1+1;this.get_displayedComponent().raiseCommandEvent($v_0,5,this.get_commandProperties())}},get_$AR_1:function(){var $v_0=this.get_displayedComponent().$M_0;if(!CUI.MenuSection.isInstanceOfType($v_0))throw Error.create("InsertTable must live inside of a MenuSection.");return $v_0},onMenuClosed:function(){this.$6G_1()},$60_0:function(){if(this.$1c_1===99){this.$6G_1();return false}this.$2O_1[this.$1c_1+1].firstChild.focus();return true},$61_0:function(){if(!this.$1c_1){this.$6G_1();return false}else if(this.$1c_1===-1)this.$2O_1[99].firstChild.focus();else this.$2O_1[this.$1c_1-1].firstChild.focus();return true},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$F_1=null;this.$2u_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.LabelCommandProperties=function(){};CUI.Controls.Label=function($p0,$p1,$p2){CUI.Controls.Label.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Medium");this.addDisplayMode("Small")};CUI.Controls.Label.prototype={$F_1:null,$5J_1:null,$2G_1:null,$9_1:null,$4b_1:null,$5r_1:"",createDOMElementForDisplayMode:function($p0){var $v_0=this.get_$1_1().ForId,$v_1=this.get_$1_1().LabelText;switch($p0){case "Medium":if($v_0){this.$F_1=CUI.Utility.$3("label");if(CUI.Utility.$3L())this.$F_1.setAttribute("htmlFor",$v_0);else this.$F_1.setAttribute("for",$v_0)}else this.$F_1=CUI.Utility.$3("span");this.$F_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$F_1.className="ms-cui-ctl-small ms-cui-fslb";if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_1().Image16by16)){this.$5J_1=CUI.Utility.$3("img");var $v_4=CUI.Utility.$k(2,3,this.get_$1_1().Image16by16,this.get_$1_1().Image16by16Class,this.$5J_1,true,false,this.get_$1_1().Image16by16Top,this.get_$1_1().Image16by16Left),$v_5=CUI.Utility.$3("span");$v_5.className="ms-cui-ctl-iconContainer";$v_5.appendChild($v_4);this.$F_1.appendChild($v_5)}this.$2G_1=CUI.Utility.$3("span");this.$2G_1.className="ms-cui-ctl-mediumlabel";!CUI.ScriptUtility.isNullOrUndefined($v_1)&&CUI.UIUtility.setInnerText(this.$2G_1,$v_1);this.$F_1.appendChild(this.$2G_1);return this.$F_1;case "Small":if($v_0){this.$9_1=CUI.Utility.$3("label");if(CUI.Utility.$3L())this.$9_1.setAttribute("htmlFor",$v_0);else this.$9_1.setAttribute("for",$v_0)}else this.$9_1=CUI.Utility.$3("span");this.$9_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$9_1.className="ms-cui-ctl-small ms-cui-fslb";if(CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_1().Image16by16))throw Error.argumentNull("Image16by16","Small display mode must have an icon set");this.$4b_1=CUI.Utility.$3("img");var $v_2=CUI.Utility.$k(2,3,this.get_$1_1().Image16by16,this.get_$1_1().Image16by16Class,this.$4b_1,true,false,this.get_$1_1().Image16by16Top,this.get_$1_1().Image16by16Left);if(!CUI.ScriptUtility.isNullOrUndefined($v_1))this.$4b_1.alt=$v_1;var $v_3=CUI.Utility.$3("span");$v_3.className="ms-cui-ctl-iconContainer";$v_3.appendChild($v_2);this.$9_1.appendChild($v_3);return this.$9_1;default:this.ensureValidDisplayMode($p0);break}return null},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Medium":this.$F_1=$v_0;if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_1().Image16by16)){this.$5J_1=this.$F_1.firstChild.firstChild.firstChild;this.$2G_1=this.$F_1.childNodes[1]}else this.$2G_1=this.$F_1.firstChild;break;case "Small":this.$9_1=$v_0;this.$4b_1=this.$9_1.firstChild.firstChild.firstChild;break}},onEnabledChanged:function($p0){CUI.Utility.setEnabledOnElement(this.$F_1,$p0);CUI.Utility.setEnabledOnElement(this.$9_1,$p0)},get_$9h_0:function(){return "Label"},$Ef_0:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().Command))return;var $v_0=this.pollForStateAndUpdateInternal(this.get_$1_1().Command,this.get_$1_1().QueryCommand,this.get_stateProperties(),false);if($v_0&&!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().QueryCommand)){var $v_1=this.$5r_1;if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_stateProperties()[CUI.Controls.LabelCommandProperties.Value])){CUI.UIUtility.setInnerText(this.$2G_1,this.get_stateProperties()[CUI.Controls.LabelCommandProperties.Value]);this.$5r_1=this.get_stateProperties()[CUI.Controls.LabelCommandProperties.Value]}else{CUI.UIUtility.setInnerText(this.$2G_1,this.get_$1_1().LabelText);this.$5r_1=this.get_$1_1().LabelText}if(this.$5r_1!==$v_1)this.$0_0.$3Q_1=true}},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$F_1=null;this.$5J_1=null;this.$2G_1=null;this.$9_1=null;this.$4b_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.MRUSplitButton=function($p0,$p1,$p2,$p3){this.$$d_onDblClick=Function.createDelegate(this,this.onDblClick);this.$$d_$Ar_3=Function.createDelegate(this,this.$Ar_3);this.$$d_$EV_3=Function.createDelegate(this,this.$EV_3);this.$$d_$EW_3=Function.createDelegate(this,this.$EW_3);CUI.Controls.MRUSplitButton.initializeBase(this,[$p0,$p1,$p2,$p3])};CUI.Controls.MRUSplitButton.prototype={$G_3:null,$1I_3:null,$Q_3:null,$1y_3:null,$8_3:null,$Z_3:null,$S_3:null,$2K_3:null,$9_3:null,$1P_3:null,$U_3:null,$2M_3:null,$1V_3:false,$3S_3:false,$8d_0:function(){if(!this.get_enabled())return false;if(this.$1V_3){this.get_displayedComponent().get_$2_0().firstChild.firstChild.focus();return true}return false},createDOMElementForDisplayMode:function($p0){var $v_0=true,$v_1=CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().Alt)?"":this.get_properties().Alt,$v_2=$p0==="Medium"&&!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().Width)?this.get_properties().Width:"auto",$v_3=null,$v_4=this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId];if(CUI.ScriptUtility.isNullOrUndefined($v_4))$v_4=this.get_properties().InitialItem;this.$3S_3=true;switch($p0){case "Large":this.$G_3=CUI.Utility.$3("span");this.$G_3.setAttribute("mscui:controltype",this.get_$9h_0());CUI.Utility.ensureCSSClassOnElement(this.$G_3,"ms-cui-ctl-large");this.$1I_3=CUI.Utility.$3("span");this.$1I_3.className="ms-cui-mrusb-selecteditem";if(!this.$2W_2($v_4))if(!CUI.Utility.$x(this.get_properties().PopulateDynamically))throw Error.create("No menu item with id '"+this.get_properties().InitialItem+"' exists in this control's menu");else{this.$1I_3.style.width="32px";this.$1I_3.style.height="32px"}this.$Q_3=CUI.Utility.$3("a");this.$Q_3.className="ms-cui-ctl-a2";this.$Q_3.style.display="block";this.$Q_3.setAttribute("role",this.get_$3E_0());this.$Q_3.setAttribute("aria-haspopup",true);CUI.Utility.$1v(this.$Q_3);CUI.Utility.$1j(this.get_properties(),this.$Q_3);this.$1y_3=CUI.Utility.$3("img");var $v_5=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageDownArrow,this.$0_0.$5_1.ImageDownArrowClass,this.$1y_3,true,false,this.$0_0.$5_1.ImageDownArrowTop,this.$0_0.$5_1.ImageDownArrowLeft);if(CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().ToolTipTitle)){$v_0=false;this.$Q_3.title=$v_1;this.$1y_3.alt=$v_1}this.$Bm_0($p0);this.$Q_3.appendChild($v_5);if($v_0){$v_3=CUI.Utility.$2o($v_1);this.$Q_3.appendChild($v_3)}this.$G_3.appendChild(this.$1I_3);this.$G_3.appendChild(this.$Q_3);this.$3S_3=false;return this.$G_3;case "Medium":this.$8_3=CUI.Utility.$3("span");this.$8_3.setAttribute("mscui:controltype",this.get_$9h_0());this.$8_3.className="ms-cui-ctl-medium ms-cui-ctl";this.$Z_3=CUI.Utility.$3("span");this.$Z_3.className="ms-cui-mrusb-selecteditem";this.$Z_3.style.width=$v_2;if(!this.$2W_2($v_4))throw Error.create("No menu item with id '"+this.get_properties().InitialItem+"' exists in this control's menu");this.$S_3=CUI.Utility.$3("a");CUI.Utility.$1v(this.$S_3);CUI.Utility.$1j(this.get_properties(),this.$S_3);this.$S_3.className="ms-cui-ctl";this.$S_3.setAttribute("role",this.get_$3E_0());this.$S_3.setAttribute("aria-haspopup",true);this.$2K_3=CUI.Utility.$3("img");if(CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().ToolTipTitle)){$v_0=false;this.$S_3.title=$v_1;this.$2K_3.alt=$v_1}var $v_6=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageDownArrow,this.$0_0.$5_1.ImageDownArrowClass,this.$2K_3,true,false,this.$0_0.$5_1.ImageDownArrowTop,this.$0_0.$5_1.ImageDownArrowLeft);this.$Bm_0($p0);this.$S_3.appendChild($v_6);if($v_0){$v_3=CUI.Utility.$2o($v_1);this.$S_3.appendChild($v_3)}this.$8_3.appendChild(this.$Z_3);this.$8_3.appendChild(this.$S_3);this.$3S_3=false;return this.$8_3;case "Small":this.$9_3=CUI.Utility.$3("span");this.$9_3.setAttribute("mscui:controltype",this.get_$9h_0());this.$9_3.className="ms-cui-ctl-medium ms-cui-ctl";this.$1P_3=CUI.Utility.$3("span");this.$1P_3.className="ms-cui-mrusb-selecteditem";this.$1P_3.style.width=$v_2;if(!this.$2W_2($v_4))throw Error.create("No menu item with id '"+this.get_properties().InitialItem+"' exists in this control's menu");this.$U_3=CUI.Utility.$3("a");CUI.Utility.$1v(this.$U_3);CUI.Utility.$1j(this.get_properties(),this.$U_3);this.$U_3.setAttribute("role",this.get_$3E_0());this.$U_3.setAttribute("aria-haspopup",true);this.$U_3.className="ms-cui-ctl ms-cui-mrusb-arwbtn";this.$2M_3=CUI.Utility.$3("img");if(CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().ToolTipTitle)){this.$U_3.title=$v_1;this.$2M_3.alt=$v_1;$v_0=false}var $v_7=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageDownArrow,this.$0_0.$5_1.ImageDownArrowClass,this.$2M_3,true,false,this.$0_0.$5_1.ImageDownArrowTop,this.$0_0.$5_1.ImageDownArrowLeft);this.$Bm_0($p0);this.$U_3.appendChild($v_7);if($v_0){$v_3=CUI.Utility.$2o($v_1);this.$U_3.appendChild($v_3)}this.$9_3.appendChild(this.$1P_3);this.$9_3.appendChild(this.$U_3);this.$3S_3=false;return this.$9_3;default:this.$3S_3=false;this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Large":this.$G_3=$v_0;this.$1I_3=this.$G_3.childNodes[0];this.$Q_3=this.$G_3.childNodes[1];this.$1y_3=this.$Q_3.childNodes[0].childNodes[0];break;case "Medium":this.$8_3=$v_0;this.$Z_3=this.$8_3.childNodes[0];this.$S_3=this.$8_3.childNodes[1];this.$2K_3=this.$S_3.childNodes[0].childNodes[0];break;case "Small":this.$9_3=$v_0;this.$1P_3=this.$9_3.childNodes[0];this.$U_3=this.$9_3.childNodes[1];this.$2M_3=this.$U_3.childNodes[0].childNodes[0];break}},$Bm_0:function($p0){this.$R_3($p0)},$R_3:function($p0){switch($p0){case "Large":$addHandler(this.$Q_3,"click",this.$$d_onArrowButtonClick);$addHandler(this.$1I_3,"mouseover",this.$$d_$EW_3);$addHandler(this.$1I_3,"mouseout",this.$$d_$EV_3);$addHandler(this.$Q_3,"mouseover",this.$$d_onArrowButtonFocus);$addHandler(this.$Q_3,"mouseout",this.$$d_onArrowButtonBlur);$addHandler(this.$Q_3,"focus",this.$$d_onArrowButtonKeyboardFocus);$addHandler(this.$Q_3,"blur",this.$$d_onArrowButtonBlur);$addHandler(this.$Q_3,"keypress",this.$$d_onArrowButtonKeyPress);break;case "Medium":$addHandler(this.$S_3,"click",this.$$d_onArrowButtonClick);$addHandler(this.$Z_3,"mouseover",this.$$d_$EW_3);$addHandler(this.$Z_3,"mouseout",this.$$d_$EV_3);$addHandler(this.$S_3,"mouseover",this.$$d_onArrowButtonFocus);$addHandler(this.$S_3,"mouseout",this.$$d_onArrowButtonBlur);$addHandler(this.$S_3,"focus",this.$$d_onArrowButtonKeyboardFocus);$addHandler(this.$S_3,"blur",this.$$d_onArrowButtonBlur);$addHandler(this.$S_3,"keypress",this.$$d_onArrowButtonKeyPress);break;case "Small":$addHandler(this.$U_3,"click",this.$$d_onArrowButtonClick);$addHandler(this.$1P_3,"mouseover",this.$$d_$EW_3);$addHandler(this.$1P_3,"mouseout",this.$$d_$EV_3);$addHandler(this.$U_3,"mouseover",this.$$d_onArrowButtonFocus);$addHandler(this.$U_3,"mouseout",this.$$d_onArrowButtonBlur);$addHandler(this.$U_3,"focus",this.$$d_onArrowButtonKeyboardFocus);$addHandler(this.$U_3,"blur",this.$$d_onArrowButtonBlur);$addHandler(this.$U_3,"keypress",this.$$d_onArrowButtonKeyPress);break}},get_$9h_0:function(){return "MRUSplitButton"},selectMenuItem:function($p0){if(this._selectedControl===$p0&&!this.$3S_3)return;var $v_0=!CUI.ScriptUtility.isNullOrUndefined(this.get_displayedComponent())?this.get_displayedComponent().get_title():this.$6U_0,$v_1;switch($v_0){case "Large":$v_1=this.$1I_3;break;case "Medium":$v_1=this.$Z_3;break;case "Small":$v_1=this.$1P_3;break;default:throw Error.create("Invalid display mode on split button while selecting a menu item")}this._selectedControl=$p0;this.get_stateProperties()[CUI.Controls.DropDownCommandProperties.SelectedItemId]=$p0.getMenuItemId();var $v_2=$p0;if(CUI.MenuItem.isInstanceOfType($v_2.get_displayedComponent()))this.$B_1.$3v_1=$v_2.get_displayedComponent();var $v_3=this._selectedControl.getDropDownDOMElementForDisplayMode($v_0);if($v_3.childNodes.length>1){var $v_4=$v_3.childNodes[1];if($v_4.childNodes.length>1)if($v_4.childNodes[1].tagName.toLowerCase()==="br"){var $v_5=CUI.Utility.$3("span");CUI.Utility.$2q($v_5," ");$v_4.replaceChild($v_5,$v_4.childNodes[1])}}$v_3.id=this.$4_0+"-SelectedItem";if($v_1.hasChildNodes()){var $v_6=$v_1.firstChild;$v_1.replaceChild($v_3,$v_6);$clearHandlers($v_6)}else $v_1.appendChild($v_3);$addHandler($v_3,"click",this.$$d_$Ar_3);$addHandler($v_3,"dblclick",this.$$d_onDblClick)},addDisplayModes:function(){this.addDisplayMode("Large");this.addDisplayMode("Medium");this.addDisplayMode("Small")},launchMenuInternal:function($p0){var $v_0=false;this.$0_0.$30_1=false;switch(this.get_displayedComponent().get_title()){case "Large":$v_0=this.launchMenu(this.$Q_3,this.$$d_sendMenuCreationCommandEvent);break;case "Medium":$v_0=this.launchMenu(this.$S_3,this.$$d_sendMenuCreationCommandEvent);break;case "Small":$v_0=this.launchMenu(this.$U_3,this.$$d_sendMenuCreationCommandEvent);break}$v_0&&this.sendMenuCreationCommandEvent()},onEnabledChanged:function($p0){CUI.Controls.DropDown.prototype.onEnabledChanged.call(this,$p0);var $v_0="ms-cui-disabled";this.$1V_3=$p0;if($p0){CUI.Utility.removeCSSClassFromElement(this.$G_3,$v_0);CUI.Utility.enableElement(this.$Q_3);CUI.Utility.removeCSSClassFromElement(this.$8_3,$v_0);CUI.Utility.enableElement(this.$S_3);CUI.Utility.removeCSSClassFromElement(this.$9_3,$v_0);CUI.Utility.enableElement(this.$U_3)}else{CUI.Utility.ensureCSSClassOnElement(this.$G_3,$v_0);CUI.Utility.disableElement(this.$Q_3);CUI.Utility.ensureCSSClassOnElement(this.$8_3,$v_0);CUI.Utility.disableElement(this.$S_3);CUI.Utility.ensureCSSClassOnElement(this.$9_3,$v_0);CUI.Utility.disableElement(this.$U_3)}CUI.Utility.setEnabledOnElement(this.$Q_3,$p0);CUI.Utility.setEnabledOnElement(this.$S_3,$p0);CUI.Utility.setEnabledOnElement(this.$U_3,$p0)},onDblClick:function($p0){this.$Y_0();$p0.preventDefault();if(!this.get_enabled())return;this.$Ar_3($p0)},$Ar_3:function($p0){CUI.PMetrics.perfMark(7735);this.$Y_0();$p0.preventDefault();if(!this.get_enabled())return;var $v_0=3;this.get_displayedComponent().raiseCommandEvent(this.get_properties().Command,$v_0,{CommandValueId:this._selectedControl.getCommandValueId()})},$EW_3:function($p0){this.onBeginFocus();if(!this.get_enabled())return;switch(this.get_displayedComponent().get_title()){case "Large":CUI.Utility.ensureCSSClassOnElement(this.$1I_3,"ms-cui-ctl-light-hoveredOver");CUI.Utility.ensureCSSClassOnElement(this.$Q_3,"ms-cui-ctl-split-hover");break;case "Medium":CUI.Utility.ensureCSSClassOnElement(this.$Z_3,"ms-cui-ctl-light-hoveredOver");CUI.Utility.ensureCSSClassOnElement(this.$S_3,"ms-cui-ctl-split-hover");break;case "Small":CUI.Utility.ensureCSSClassOnElement(this.$1P_3,"ms-cui-ctl-light-hoveredOver");CUI.Utility.ensureCSSClassOnElement(this.$U_3,"ms-cui-ctl-split-hover");break}if(CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().CommandPreview))return;this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandPreview,5,{CommandValueId:this._selectedControl.getCommandValueId()})},$EV_3:function($p0){this.onEndFocus();if(!this.get_enabled())return;switch(this.get_displayedComponent().get_title()){case "Large":CUI.Utility.removeCSSClassFromElement(this.$1I_3,"ms-cui-ctl-light-hoveredOver");CUI.Utility.removeCSSClassFromElement(this.$Q_3,"ms-cui-ctl-split-hover");break;case "Medium":CUI.Utility.removeCSSClassFromElement(this.$Z_3,"ms-cui-ctl-light-hoveredOver");CUI.Utility.removeCSSClassFromElement(this.$S_3,"ms-cui-ctl-split-hover");break;case "Small":CUI.Utility.removeCSSClassFromElement(this.$1P_3,"ms-cui-ctl-light-hoveredOver");CUI.Utility.removeCSSClassFromElement(this.$U_3,"ms-cui-ctl-split-hover");break}if(CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().CommandRevert))return;this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandRevert,6,{CommandValueId:this._selectedControl.getCommandValueId()})},highlight:function(){switch(this.get_displayedComponent().get_title()){case "Large":CUI.Utility.ensureCSSClassOnElement(this.$1I_3,"ms-cui-ctl-split-hover");CUI.Utility.ensureCSSClassOnElement(this.$Q_3,"ms-cui-ctl-light-hoveredOver");break;case "Medium":CUI.Utility.ensureCSSClassOnElement(this.$Z_3,"ms-cui-ctl-split-hover");CUI.Utility.ensureCSSClassOnElement(this.$S_3,"ms-cui-ctl-light-hoveredOver");break;case "Small":CUI.Utility.ensureCSSClassOnElement(this.$1P_3,"ms-cui-ctl-split-hover");CUI.Utility.ensureCSSClassOnElement(this.$U_3,"ms-cui-ctl-light-hoveredOver");break}},removeHighlight:function(){switch(this.get_displayedComponent().get_title()){case "Large":CUI.Utility.removeCSSClassFromElement(this.$1I_3,"ms-cui-ctl-split-hover");CUI.Utility.removeCSSClassFromElement(this.$Q_3,"ms-cui-ctl-light-hoveredOver");break;case "Medium":CUI.Utility.removeCSSClassFromElement(this.$Z_3,"ms-cui-ctl-split-hover");CUI.Utility.removeCSSClassFromElement(this.$S_3,"ms-cui-ctl-light-hoveredOver");break;case "Small":CUI.Utility.removeCSSClassFromElement(this.$1P_3,"ms-cui-ctl-split-hover");CUI.Utility.removeCSSClassFromElement(this.$U_3,"ms-cui-ctl-light-hoveredOver");break}},dispose:function(){CUI.Controls.DropDown.prototype.dispose.call(this);this.$G_3=null;this.$1y_3=null;this.$Q_3=null;this.$1I_3=null;this.$8_3=null;this.$2K_3=null;this.$S_3=null;this.$Z_3=null;this.$9_3=null;this.$2M_3=null;this.$U_3=null;this.$1P_3=null}};CUI.Controls.Separator=function($p0,$p1,$p2){CUI.Controls.Separator.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Small")};CUI.Controls.Separator.prototype={$5M_1:null,$5N_1:null,$9_1:null,createDOMElementForDisplayMode:function($p0){switch($p0){case "Small":this.$5M_1=CUI.Utility.$3("img");this.$5M_1.style.cursor="default";this.$5N_1=CUI.Utility.$k(2,11,this.get_$1_1().Image,this.get_$1_1().ImageClass,this.$5M_1,true,false,this.get_$1_1().ImageTop,this.get_$1_1().ImageLeft);this.$9_1=CUI.Utility.$3("span");this.$9_1.className="ms-cui-ctl ms-cui-ctl-small ms-cui-separator";this.$9_1.appendChild(this.$5N_1);return this.$9_1;default:this.ensureValidDisplayMode($p0);break}return null},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Small":this.$5N_1=$v_0;break}},onEnabledChanged:function($p0){},get_$9h_0:function(){return "Separator"},$Ef_0:function(){},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$5M_1=null;this.$5N_1=null;this.$9_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.SpinnerCommandProperties=function(){};CUI.Controls.Spinner=function($p0,$p1,$p2,$p3){this.$$d_$Bc_1=Function.createDelegate(this,this.$Bc_1);this.$$d_$Bd_1=Function.createDelegate(this,this.$Bd_1);this.$$d_$FH_1=Function.createDelegate(this,this.$FH_1);this.$$d_$FI_1=Function.createDelegate(this,this.$FI_1);this.$$d_$Am_1=Function.createDelegate(this,this.$Am_1);this.$$d_$EN_1=Function.createDelegate(this,this.$EN_1);this.$$d_$Eb_1=Function.createDelegate(this,this.$Eb_1);this.$$d_$E7_1=Function.createDelegate(this,this.$E7_1);this.$$d_$An_1=Function.createDelegate(this,this.$An_1);this.$$d_$EO_1=Function.createDelegate(this,this.$EO_1);this.$$d_$Ec_1=Function.createDelegate(this,this.$Ec_1);this.$$d_$E8_1=Function.createDelegate(this,this.$E8_1);this.$$d_$EE_1=Function.createDelegate(this,this.$EE_1);this.$$d_$EA_1=Function.createDelegate(this,this.$EA_1);this.$$d_$Aj_1=Function.createDelegate(this,this.$Aj_1);this.$$d_$6E_1=Function.createDelegate(this,this.$6E_1);this.$$d_$6B_1=Function.createDelegate(this,this.$6B_1);this.$$d_$8K_1=Function.createDelegate(this,this.$8K_1);this.$$d_$53_1=Function.createDelegate(this,this.$53_1);this.$$d_$48_1=Function.createDelegate(this,this.$48_1);CUI.Controls.Spinner.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Medium");this.$4F_1=0;this.$3q_1=1;this.$2T_1=$p3;this.$1e_1=parseFloat(this.get_$1_1().DefaultValue);this.get_stateProperties()["Value"]=this.$1e_1;this.$n_1=this.$A2_1(this.get_$1_1().DefaultUnit);if(CUI.ScriptUtility.isNullOrUndefined(this.$n_1))throw Error.create("The default unit is not in the list of valid units");this.get_stateProperties()["Unit"]=this.$n_1.$5c_0};CUI.Controls.Spinner.createUnit=function($p0,$p1,$p2,$p3,$p4,$p5){return new CUI.Unit($p0,$p1,$p2,$p3,$p4,$p5)};CUI.Controls.Spinner.$DK=function($p0,$p1){var $v_0=Math.pow(10,$p1.$6V_0);return Math.round($p0*$v_0)/$v_0};CUI.Controls.Spinner.prototype={$F_1:null,$C_1:null,$2F_1:null,$f_1:null,$e_1:null,$4w_1:null,$3y_1:null,$4N_1:null,$3Y_1:null,$n_1:null,$2T_1:null,$1e_1:0,$9P_1:false,$4F_1:0,$5A_1:0,$9A_1:0,$3q_1:0,$2g_1:0,$3x_1:0,$5C_1:null,$3U_1:false,createDOMElementForDisplayMode:function($p0){switch($p0){case "Medium":this.$F_1=CUI.Utility.$3("span");this.$F_1.className="ms-cui-spn";this.$F_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$C_1=CUI.Utility.$7n("input");this.$C_1.className="ms-cui-spn-txtbx";this.$C_1.id=this.$4_0;this.$C_1.setAttribute("role","textbox");CUI.Utility.$1j(this.get_$1_1(),this.$C_1);CUI.Utility.$8f(this.$C_1,this.get_$1_1().ImeEnabled);this.$2F_1=CUI.Utility.$3("span");this.$2F_1.className="ms-cui-spn-arwbx";this.$f_1=CUI.Utility.$3("a");this.$f_1.className="ms-cui-spn-btnup";this.$f_1.setAttribute("role","spinbutton");this.$e_1=CUI.Utility.$3("a");this.$e_1.className="ms-cui-spn-btndown";this.$e_1.setAttribute("role","spinbutton");this.$4w_1=CUI.Utility.$3("img");this.$4w_1.alt="";this.$3y_1=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageUpArrow,this.$0_0.$5_1.ImageUpArrowClass,this.$4w_1,true,false,this.$0_0.$5_1.ImageUpArrowTop,this.$0_0.$5_1.ImageUpArrowLeft);CUI.Utility.ensureCSSClassOnElement(this.$3y_1,"ms-cui-spn-imgcnt");if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().AltUpArrow))this.$f_1.title=this.get_$1_1().AltUpArrow;this.$4N_1=CUI.Utility.$3("img");this.$4N_1.alt="";this.$3Y_1=CUI.Utility.$k(2,1,this.$0_0.$5_1.ImageDownArrow,this.$0_0.$5_1.ImageDownArrowClass,this.$4N_1,true,false,this.$0_0.$5_1.ImageDownArrowTop,this.$0_0.$5_1.ImageDownArrowLeft);CUI.Utility.ensureCSSClassOnElement(this.$3Y_1,"ms-cui-spn-imgcnt");if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().AltDownArrow))this.$e_1.title=this.get_$1_1().AltDownArrow;this.$Bm_0($p0);this.$F_1.appendChild(this.$C_1);this.$F_1.appendChild(this.$2F_1);this.$2F_1.appendChild(this.$f_1);this.$2F_1.appendChild(this.$e_1);this.$f_1.appendChild(this.$3y_1);this.$e_1.appendChild(this.$3Y_1);return this.$F_1;default:this.ensureValidDisplayMode($p0);return null}},$F6_1:function(){this.$FD_1(parseFloat(this.get_$1_1().DefaultValue));this.$5A_1=parseInt(this.get_$1_1().AccelerationInterval);this.$9A_1=parseInt(this.get_$1_1().MultiplierInterval);this.$5C_1=this.get_$1_1().Command},$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Medium":this.$F_1=$v_0;this.$C_1=this.$F_1.childNodes[0];this.$2F_1=this.$F_1.childNodes[1];this.$f_1=this.$2F_1.childNodes[0];this.$e_1=this.$2F_1.childNodes[1];this.$3y_1=this.$f_1.childNodes[0];this.$3Y_1=this.$e_1.childNodes[0];this.$4w_1=this.$3y_1.childNodes[0];this.$4N_1=this.$3Y_1.childNodes[0];break}},$Bm_0:function($p0){switch($p0){case "Medium":this.$R_1();this.$F6_1();break}},$R_1:function(){$addHandler(this.$C_1,"focus",this.$$d_$48_1);$addHandler(this.$C_1,"blur",this.$$d_$53_1);$addHandler(this.$C_1,"change",this.$$d_$8K_1);$addHandler(this.$C_1,"mouseover",this.$$d_$6B_1);$addHandler(this.$C_1,"mouseout",this.$$d_$6E_1);$addHandler(this.$C_1,"keypress",this.$$d_$Aj_1);$addHandler(this.$C_1,"keydown",this.$$d_$EA_1);$addHandler(this.$C_1,"keyup",this.$$d_$EE_1);$addHandler(this.$f_1,"mouseover",this.$$d_$E8_1);$addHandler(this.$f_1,"mouseout",this.$$d_$Ec_1);$addHandler(this.$f_1,"mousedown",this.$$d_$EO_1);$addHandler(this.$f_1,"mouseup",this.$$d_$An_1);$addHandler(this.$e_1,"mouseover",this.$$d_$E7_1);$addHandler(this.$e_1,"mouseout",this.$$d_$Eb_1);$addHandler(this.$e_1,"mousedown",this.$$d_$EN_1);$addHandler(this.$e_1,"mouseup",this.$$d_$Am_1)},get_$9h_0:function(){return "Spinner"},onEnabledChanged:function($p0){CUI.Utility.setEnabledOnElement(this.$C_1,$p0)},$8d_0:function(){if(!this.get_enabled())return false;this.$C_1.focus();return true},$48_1:function($p0){this.onBeginFocus();if(!this.get_enabled())return;this.$0_0.set_$p_1(this);this.$Ad_1($p0);CUI.Utility.$8X(this.$C_1)},$53_1:function($p0){this.onEndFocus();if(!this.get_enabled())return;this.$32_1&&this.$4D_1();this.$Ad_1($p0)},$3o_1:false,$Ad_1:function($p0){this.$3o_1=!this.$3o_1;if(this.$3o_1)this.$6B_1($p0);else this.$6E_1($p0)},$8K_1:function($p0){this.$Y_0();if(!this.get_enabled())return;if(!this.$FP_1()){this.$56_1();return}var $v_0=1;this.get_stateProperties()["ChangeType"]="manual";this.get_stateProperties()["ChangedByMouse"]=false;this.get_displayedComponent().raiseCommandEvent(this.$5C_1,$v_0,this.get_stateProperties())},$CI_0:function(){this.$8K_1(null)},$6B_1:function($p0){if(!this.get_enabled())return;CUI.Utility.ensureCSSClassOnElement(this.$C_1,"ms-cui-spn-txtbx-hover");CUI.Utility.ensureCSSClassOnElement(this.$f_1,"ms-cui-spn-btnup-ctl-hover");CUI.Utility.ensureCSSClassOnElement(this.$e_1,"ms-cui-spn-btndown-ctl-hover")},$6E_1:function($p0){if(!this.get_enabled())return;if(!this.$3o_1){CUI.Utility.removeCSSClassFromElement(this.$C_1,"ms-cui-spn-txtbx-hover");CUI.Utility.removeCSSClassFromElement(this.$f_1,"ms-cui-spn-btnup-ctl-hover");CUI.Utility.removeCSSClassFromElement(this.$e_1,"ms-cui-spn-btndown-ctl-hover");CUI.Utility.removeCSSClassFromElement(this.$f_1,"ms-cui-spn-btnup-down");CUI.Utility.removeCSSClassFromElement(this.$e_1,"ms-cui-spn-btndown-down")}},$E8_1:function($p0){if(!this.get_enabled())return;this.$6B_1($p0);CUI.Utility.removeCSSClassFromElement(this.$f_1,"ms-cui-spn-btnup-ctl-hover");CUI.Utility.ensureCSSClassOnElement(this.$f_1,"ms-cui-spn-btnup-hover")},$Ec_1:function($p0){if(!this.get_enabled())return;!this.$32_1&&this.$An_1($p0);this.$6E_1($p0);this.$3o_1&&CUI.Utility.ensureCSSClassOnElement(this.$f_1,"ms-cui-spn-btnup-ctl-hover");CUI.Utility.removeCSSClassFromElement(this.$f_1,"ms-cui-spn-btnup-hover")},$EO_1:function($p0){if(!this.get_enabled())return;this.$3U_1=true;if($p0.button){this.$4D_1();return}this.$6J_1(1);CUI.Utility.ensureCSSClassOnElement(this.$f_1,"ms-cui-spn-btnup-down")},$An_1:function($p0){if(!this.get_enabled())return;this.$4D_1();this.$0_0.set_$p_1(this);CUI.Utility.removeCSSClassFromElement(this.$f_1,"ms-cui-spn-btnup-down")},$AV_1:function($p0){if(!this.get_enabled())return;if(!this.$3P_1(this.$n_1,this.$1e_1+$p0*this.$n_1.$7a_0))if(this.$1e_1<this.$n_1.$4l_0)this.$3P_1(this.$n_1,this.$n_1.$4l_0);else{this.$56_1();return}var $v_0=9;this.get_stateProperties()["ChangeType"]="increase";this.get_stateProperties()["ChangedByMouse"]=this.$3U_1;this.get_displayedComponent().raiseCommandEvent(this.$5C_1,$v_0,this.get_stateProperties())},$E7_1:function($p0){if(!this.get_enabled())return;this.$6B_1($p0);CUI.Utility.removeCSSClassFromElement(this.$e_1,"ms-cui-spn-btndown-ctl-hover");CUI.Utility.ensureCSSClassOnElement(this.$e_1,"ms-cui-spn-btndown-hover")},$Eb_1:function($p0){if(!this.get_enabled())return;!this.$32_1&&this.$Am_1($p0);this.$6E_1($p0);this.$3o_1&&CUI.Utility.ensureCSSClassOnElement(this.$e_1,"ms-cui-spn-btndown-ctl-hover");CUI.Utility.removeCSSClassFromElement(this.$e_1,"ms-cui-spn-btndown-hover")},$EN_1:function($p0){if(!this.get_enabled())return;this.$3U_1=true;if($p0.button){this.$4D_1();return}this.$6J_1(CUI.Controls.Spinner.$7p);CUI.Utility.ensureCSSClassOnElement(this.$e_1,"ms-cui-spn-btndown-down")},$Am_1:function($p0){if(!this.get_enabled())return;this.$4D_1();this.$0_0.set_$p_1(this);CUI.Utility.removeCSSClassFromElement(this.$e_1,"ms-cui-spn-btndown-down")},$9r_1:function($p0){if(!this.get_enabled())return;if(!this.$3P_1(this.$n_1,this.$1e_1-$p0*this.$n_1.$7a_0))if(this.$1e_1>this.$n_1.$4n_0)this.$3P_1(this.$n_1,this.$n_1.$4n_0);else{this.$56_1();return}var $v_0=9;this.get_stateProperties()["ChangeType"]="decrease";this.get_stateProperties()["ChangedByMouse"]=this.$3U_1;this.get_displayedComponent().raiseCommandEvent(this.$5C_1,$v_0,this.get_stateProperties())},$Aj_1:function($p0){if(!this.get_enabled())return;this.$3U_1=false;var $v_0=$p0.rawEvent.keyCode;if($v_0===27)this.$56_1();else if($v_0===13){this.$8K_1($p0);$p0.preventDefault()}else return},$32_1:false,$EA_1:function($p0){if(!this.get_enabled())return;if(this.$32_1)return;this.$3U_1=false;var $v_0=$p0.rawEvent.keyCode;if($v_0===38){this.$6J_1(1);CUI.Utility.ensureCSSClassOnElement(this.$f_1,"ms-cui-spn-btnup-down")}else if($v_0===40){this.$6J_1(CUI.Controls.Spinner.$7p);CUI.Utility.ensureCSSClassOnElement(this.$e_1,"ms-cui-spn-btndown-down")}else return;this.$32_1=true},$EE_1:function($p0){if(!this.get_enabled())return;if(!this.$32_1)return;this.$4D_1();CUI.Utility.removeCSSClassFromElement(this.$f_1,"ms-cui-spn-btnup-down");CUI.Utility.removeCSSClassFromElement(this.$e_1,"ms-cui-spn-btndown-down");this.$32_1=false},$Bd_1:function(){this.$4F_1++;this.$AV_1(this.$A7_1())},$Bc_1:function(){this.$4F_1++;this.$9r_1(this.$A7_1())},$6J_1:function($p0){if(this.$2g_1>-1||this.$3x_1>-1)return;if($p0===1)this.$AV_1(1);else this.$9r_1(1);if($p0===1)this.$3x_1=window.setTimeout(this.$$d_$FI_1,500);else this.$3x_1=window.setTimeout(this.$$d_$FH_1,500)},$4D_1:function(){if(this.$3x_1>-1){window.clearTimeout(this.$3x_1);this.$3x_1=-1}if(this.$2g_1>-1){window.clearInterval(this.$2g_1);this.$2g_1=-1;this.$3q_1=1;this.$4F_1=0}},$FI_1:function(){if(this.$2g_1!==-1)return;this.$2g_1=window.setInterval(this.$$d_$Bd_1,this.$5A_1)},$FH_1:function(){if(this.$2g_1!==-1)return;this.$2g_1=window.setInterval(this.$$d_$Bc_1,this.$5A_1)},$A7_1:function(){var $v_0=this.$4F_1*this.$5A_1;if($v_0>=this.$3q_1*this.$9A_1&&this.$3q_1<=3)this.$3q_1++;return this.$3q_1},$FD_1:function($p0){this.$1e_1=$p0;this.$C_1.value=this.$7y_1($p0,this.$n_1.get_$5z_0());this.get_stateProperties()["Value"]=this.$1e_1},get_value:function(){return this.$1e_1},set_value:function($p0){if(!this.$3P_1(this.$n_1,$p0))throw Error.create("Invalid value");return $p0},get_unitString:function(){return this.$n_1.get_$5z_0()},set_unitString:function($p0){if(!this.$BT_1(this.$1e_1.toString()+$p0)){this.$56_1();throw Error.create("Invalid unit")}return $p0},$94_1:false,$93_1:false,get_$8F_1:function(){if(!this.$94_1){var $v_0=1.1,$v_1=$v_0.toLocaleString().substring(1,2);this.$93_1=$v_1===",";this.$94_1=true}return this.$93_1},$FP_1:function(){var $v_0=this.$C_1.value;return this.$BT_1($v_0)},$BT_1:function($p0){var $v_0="(\\-)?[0-9]*[\\.,]?[0-9]+",$v_1=new RegExp($v_0);$p0=$p0.trim();if($p0.search($v_1))return false;var $v_2=$p0.replace($v_1,""),$v_3=$p0.replace($v_2,""),$v_4=$v_2.trim(),$v_5,$v_6,$v_7=false;if(this.get_$8F_1()){$v_3=$v_3.replace(".","");if($v_3.indexOf(",")>-1){$v_7=true;$v_3=$v_3.replace(",",".")}}else $v_3=$v_3.replace(",","");$v_6=parseFloat($v_3);if(!CUI.ScriptUtility.isNullOrEmptyString($v_4))if(this.$n_1.$7k_0($v_4))$v_5=this.$n_1;else $v_5=this.$DJ_1($v_4);else $v_5=this.$n_1;return this.$3P_1($v_5,$v_6,$v_7)},$3P_1:function($p0,$p1,$p2){if(arguments.length<3)$p2=this.get_$8F_1();if(!$p0)return false;var $v_0=$p0.$FQ_0($p1);if($v_0===CUI.Unit.$8E)return false;else if($v_0===1)$p1=CUI.Controls.Spinner.$DK($p1,$p0);else if($v_0===2)$p1=$p0.$4n_0;else if($v_0===3)$p1=$p0.$4l_0;this.$C_1.value=this.$7y_1($p1,$p0.get_$5z_0(),$p2);this.$n_1=$p0;this.$1e_1=$p1;this.$9P_1=$p2;this.get_stateProperties()["Unit"]=$p0.$5c_0;this.get_stateProperties()["Value"]=$p1;return true},$56_1:function(){this.$C_1.value=this.$7y_1(this.$1e_1,this.$n_1.get_$5z_0(),this.$9P_1)},$7y_1:function($p0,$p1,$p2){if(arguments.length<3)$p2=this.get_$8F_1();var $v_0=$p0.toString();if($p2)$v_0=$v_0.replace(".",",");return $v_0+" "+$p1},$DJ_1:function($p0){for(var $v_0=0;$v_0<this.$2T_1.length;$v_0++)if(this.$2T_1[$v_0].$7k_0($p0))return this.$2T_1[$v_0];return null},$A2_1:function($p0){for(var $v_0=0;$v_0<this.$2T_1.length;$v_0++){if(this.$2T_1[$v_0].$5c_0===$p0)return this.$2T_1[$v_0];if(this.$2T_1[$v_0].$7k_0($p0))return this.$2T_1[$v_0]}return null},$Ef_0:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.$F_1))return;var $v_0=this.pollForStateAndUpdateInternal(this.get_$1_1().Command,this.get_$1_1().QueryCommand,this.get_stateProperties(),true),$v_1=this.$A2_1(this.get_stateProperties()["Unit"]);if(!this.$3P_1($v_1,this.get_stateProperties()["Value"]))throw Error.create("Invalid valid and/or unit returned when polling")},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$4N_1=null;this.$3Y_1=null;this.$4w_1=null;this.$3y_1=null;this.$F_1=null;this.$2F_1=null;this.$e_1=null;this.$C_1=null;this.$f_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.SplitButton=function($p0,$p1,$p2,$p3){this.$$d_onMenuButtonKeyPress=Function.createDelegate(this,this.onMenuButtonKeyPress);this.$$d_onMenuButtonABlur=Function.createDelegate(this,this.onMenuButtonABlur);this.$$d_onMenuButtonKeyboardFocus=Function.createDelegate(this,this.onMenuButtonKeyboardFocus);this.$$d_onMenuButtonBlur=Function.createDelegate(this,this.onMenuButtonBlur);this.$$d_onMenuButtonFocus=Function.createDelegate(this,this.onMenuButtonFocus);this.$$d_onMenuButtonClick=Function.createDelegate(this,this.onMenuButtonClick);this.$$d_onButtonKeyboardFocus=Function.createDelegate(this,this.onButtonKeyboardFocus);this.$$d_onButtonBlur=Function.createDelegate(this,this.onButtonBlur);this.$$d_onButtonFocus=Function.createDelegate(this,this.onButtonFocus);this.$$d_onMouseOut=Function.createDelegate(this,this.onMouseOut);this.$$d_onMouseOver=Function.createDelegate(this,this.onMouseOver);this.$$d_onDblClick=Function.createDelegate(this,this.onDblClick);this.$$d_onButtonClick=Function.createDelegate(this,this.onButtonClick);CUI.Controls.SplitButton.initializeBase(this,[$p0,$p1,$p2,$p3]);this.addDisplayMode("Large");this.addDisplayMode("Medium");this.addDisplayMode("Small")};CUI.Controls.SplitButton.prototype={$G_2:null,$8u_2:null,$4W_2:null,$3a_2:null,$1y_2:null,$8_2:null,$8w_2:null,$4X_2:null,$3b_2:null,$2K_2:null,$9_2:null,$8z_2:null,$4a_2:null,$3d_2:null,$2M_2:null,createDOMElementForDisplayMode:function($p0){var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().Alt)?this.get_$1_2().LabelText:this.get_$1_2().Alt,$v_1=CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().MenuAlt)?$v_0:this.get_$1_2().MenuAlt;this.$7o_2=$p0;if(CUI.ScriptUtility.isNullOrUndefined($v_0))$v_0="";if(CUI.ScriptUtility.isNullOrUndefined($v_1))$v_1="";switch($p0){case "Large":this.$G_2=CUI.Control.createTwoAnchorControlDOMElementCore(this,this.$0_0,"Large",this.get_$1_2().Id,this.get_$1_2().Image32by32,this.get_$1_2().Image32by32Class,this.get_$1_2().Image32by32Top,this.get_$1_2().Image32by32Left,this.get_$1_2().Image16by16,this.get_$1_2().Image16by16Class,this.get_$1_2().Image16by16Top,this.get_$1_2().Image16by16Left,this.get_$1_2().LabelText,this.get_$1_2().Alt,this.get_$1_2().ToolTipTitle,true);this.$Bl_0("Large");this.$Bm_0($p0);return this.$G_2;case "Medium":this.$8_2=CUI.Control.createTwoAnchorControlDOMElementCore(this,this.$0_0,"Medium",this.get_$1_2().Id,this.get_$1_2().Image32by32,this.get_$1_2().Image32by32Class,this.get_$1_2().Image32by32Top,this.get_$1_2().Image32by32Left,this.get_$1_2().Image16by16,this.get_$1_2().Image16by16Class,this.get_$1_2().Image16by16Top,this.get_$1_2().Image16by16Left,this.get_$1_2().LabelText,this.get_$1_2().Alt,this.get_$1_2().ToolTipTitle,true);this.$Bl_0("Medium");this.$Bm_0($p0);return this.$8_2;case "Small":this.$9_2=CUI.Control.createTwoAnchorControlDOMElementCore(this,this.$0_0,"Small",this.get_$1_2().Id,this.get_$1_2().Image32by32,this.get_$1_2().Image32by32Class,this.get_$1_2().Image32by32Top,this.get_$1_2().Image32by32Left,this.get_$1_2().Image16by16,this.get_$1_2().Image16by16Class,this.get_$1_2().Image16by16Top,this.get_$1_2().Image16by16Left,this.get_$1_2().LabelText,this.get_$1_2().Alt,this.get_$1_2().ToolTipTitle,true);this.$Bl_0("Small");this.$Bm_0($p0);return this.$9_2;default:this.ensureValidDisplayMode($p0);return null}},$7o_2:null,$Bl_0:function($p0){var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);this.$7o_2=$p0;switch($p0){case "Large":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$G_2=$v_0;this.$4W_2=this.$G_2.childNodes[0];this.$8u_2=this.$4W_2.childNodes[0].childNodes[0];this.$3a_2=this.$G_2.childNodes[1];var $v_1=this.$3a_2.childNodes[0];this.$1y_2=null;for(var $v_2=0;$v_2<$v_1.childNodes.length;$v_2++){var $v_3=$v_1.childNodes[$v_2].tagName;if(!CUI.ScriptUtility.isNullOrUndefined($v_3)&&$v_3.toLowerCase()==="span"){this.$1y_2=$v_1.childNodes[$v_2].childNodes[0];break}}break;case "Medium":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$8_2=$v_0;this.$4X_2=this.$8_2.childNodes[0];this.$8w_2=this.$4X_2.childNodes[0].childNodes[0];this.$3b_2=this.$8_2.childNodes[1];this.$2K_2=this.$3b_2.childNodes[0].childNodes[0].childNodes[0];break;case "Small":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$9_2=$v_0;this.$4a_2=this.$9_2.childNodes[0];this.$8z_2=this.$4a_2.childNodes[0].childNodes[0];this.$3d_2=this.$9_2.childNodes[1];this.$2M_2=this.$3d_2.childNodes[0].childNodes[0].childNodes[0];break}},$Bm_0:function($p0){this.$R_2($p0)},$R_2:function($p0){var $v_0=null,$v_1=null;switch($p0){case "Large":$v_0=this.$4W_2;$v_1=this.$3a_2;break;case "Medium":$v_0=this.$4X_2;$v_1=this.$3b_2;break;case "Small":$v_0=this.$4a_2;$v_1=this.$3d_2;break}$addHandler($v_0,"click",this.$$d_onButtonClick);$addHandler($v_0,"dblclick",this.$$d_onDblClick);$addHandler($v_0,"mouseover",this.$$d_onMouseOver);$addHandler($v_0,"mouseout",this.$$d_onMouseOut);$addHandler($v_0,"mouseover",this.$$d_onButtonFocus);$addHandler($v_0,"mouseout",this.$$d_onButtonBlur);$addHandler($v_0,"focus",this.$$d_onButtonKeyboardFocus);$addHandler($v_0,"blur",this.$$d_onButtonBlur);$addHandler($v_1,"click",this.$$d_onMenuButtonClick);$addHandler($v_1,"mouseover",this.$$d_onMenuButtonFocus);$addHandler($v_1,"mouseout",this.$$d_onMenuButtonBlur);$addHandler($v_1,"focus",this.$$d_onMenuButtonKeyboardFocus);$addHandler($v_1,"blur",this.$$d_onMenuButtonABlur);$addHandler($v_1,"keypress",this.$$d_onMenuButtonKeyPress)},$50_2:false,$8d_0:function(){if(!this.get_enabled())return false;var $v_0=this.get_displayedComponent().get_$2_0();if(!CUI.ScriptUtility.isNullOrUndefined($v_0)){if(this.$50_2||!this.$1V_2)$v_0=$v_0.childNodes[1];else $v_0=$v_0.childNodes[0];$v_0.focus();return true}return false},onEnabledChanged:function($p0){this.onEnabledChangedForControl($p0);this.onEnabledChangedForButton($p0);this.onEnabledChangedForMenu($p0)},get_$9h_0:function(){return "SplitButton"},onEnabledChangedForControl:function($p0){var $v_0="ms-cui-disabled";if($p0){CUI.Utility.removeCSSClassFromElement(this.$G_2,$v_0);CUI.Utility.removeCSSClassFromElement(this.$8_2,$v_0);CUI.Utility.removeCSSClassFromElement(this.$9_2,$v_0)}else{CUI.Utility.ensureCSSClassOnElement(this.$G_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$8_2,$v_0);CUI.Utility.ensureCSSClassOnElement(this.$9_2,$v_0)}},$23_2:true,onEnabledChangedForMenu:function($p0){CUI.Utility.setEnabledOnElement(this.$3a_2,$p0);CUI.Utility.setEnabledOnElement(this.$3b_2,$p0);CUI.Utility.setEnabledOnElement(this.$3d_2,$p0);this.$8T_2();this.$23_2=$p0},$FC_2:function($p0){CUI.Utility.setEnabledOnElement(this.$3a_2,$p0);CUI.Utility.setEnabledOnElement(this.$3b_2,$p0);CUI.Utility.setEnabledOnElement(this.$3d_2,$p0)},$1V_2:false,onEnabledChangedForButton:function($p0){CUI.Utility.setEnabledOnElement(this.$4W_2,$p0);CUI.Utility.setEnabledOnElement(this.$4X_2,$p0);CUI.Utility.setEnabledOnElement(this.$4a_2,$p0);this.$8S_2();this.$1V_2=$p0},onButtonClick:function($p0){$p0.preventDefault();this.$Y_0();if(!this.get_enabled()||!this.$1V_2)return;this.$0_0.set_$45_1(this);this.$50_2=false;var $v_0=this.get_stateProperties();$v_0["CommandValueId"]=this.get_$1_2().CommandValueId;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().Command,1,$v_0)},onDblClick:function($p0){$p0.preventDefault();this.$Y_0();if(!this.get_enabled())return;this.onButtonClick($p0)},onMouseOver:function($p0){this.onBeginFocus();if(!this.get_enabled()||!this.$1V_2)return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandPreview))return;var $v_0=this.get_stateProperties();$v_0["CommandValueId"]=this.get_$1_2().CommandValueId;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandPreview,5,$v_0)},onButtonKeyboardFocus:function($p0){this.$0_0.set_$p_1(this);this.$50_2=false;this.onButtonFocus($p0)},onButtonFocus:function($p0){this.onBeginFocus();if(!this.get_enabled()||!this.$1V_2)return;this.$Dk_2()},onMouseOut:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandRevert))return;var $v_0=this.get_stateProperties();$v_0["CommandValueId"]=this.get_$1_2().CommandValueId;this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandRevert,6,$v_0)},onButtonBlur:function($p0){this.onEndFocus();if(!this.get_enabled()||!this.$1V_2)return;this.$8S_2()},onMenuButtonClick:function($p0){$p0.preventDefault();this.$Y_0();if(!this.get_enabled()||!this.$23_2)return;this.$0_0.$30_1=false;this.$0_0.set_$45_1(this);this.$50_2=true;var $v_0=$p0.target;this.launchMenu($v_0);this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandMenuOpen,4,null)},onMenuButtonKeyboardFocus:function($p0){this.onMenuButtonFocus($p0);this.$50_2=true;this.$0_0.set_$p_1(this)},onMenuButtonFocus:function($p0){this.onBeginFocus();if(!this.get_enabled()||!this.$23_2)return;this.$Dl_2()},onMenuButtonBlur:function($p0){this.onEndFocus();if(!this.get_enabled()||this.$j_1||!this.$23_2)return;this.$8T_2()},onMenuButtonABlur:function($p0){this.onEndFocus();if(!this.get_enabled()||!this.$23_2)return;this.onMenuButtonBlur($p0)},onMenuButtonKeyPress:function($p0){this.$Y_0();if(!this.get_enabled()||!this.$23_2)return;if($p0.rawEvent.keyCode===13)this.$18_1=true},onLaunchedMenuClosed:function(){this.$Y_0();this.$1L_2();this.get_displayedComponent().raiseCommandEvent(this.get_$1_2().CommandMenuClose,10,null);CUI.MenuLauncher.prototype.onLaunchedMenuClosed.call(this)},$1L_2:function(){this.$8S_2();this.$8T_2()},$8S_2:function(){var $v_0=this.$63_0();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;CUI.Utility.removeCSSClassFromElement($v_0.childNodes[1],"ms-cui-ctl-split-hover");CUI.Utility.removeCSSClassFromElement($v_0.childNodes[0],"ms-cui-ctl-light-hoveredOver")},$Dk_2:function(){var $v_0=this.$63_0();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;CUI.Utility.ensureCSSClassOnElement($v_0.childNodes[1],"ms-cui-ctl-split-hover");CUI.Utility.ensureCSSClassOnElement($v_0.childNodes[0],"ms-cui-ctl-light-hoveredOver")},$8T_2:function(){var $v_0=this.$63_0();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;CUI.Utility.removeCSSClassFromElement($v_0.childNodes[0],"ms-cui-ctl-split-hover");CUI.Utility.removeCSSClassFromElement($v_0.childNodes[1],"ms-cui-ctl-light-hoveredOver")},$Dl_2:function(){var $v_0=this.$63_0();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;CUI.Utility.ensureCSSClassOnElement($v_0.childNodes[0],"ms-cui-ctl-split-hover");CUI.Utility.ensureCSSClassOnElement($v_0.childNodes[1],"ms-cui-ctl-light-hoveredOver")},$Ef_0:function(){var $v_0=this.$0_0.$54_1(this.get_$1_2().Command,null,null),$v_1=true;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_2().CommandMenuOpen))$v_1=this.$0_0.$54_1(this.get_$1_2().CommandMenuOpen,null,null);else $v_1=$v_0;if($v_1!==this.$23_2||$v_0!==this.$1V_2){this.$1Q_0=$v_1||$v_0;var $v_2=this.$23_2&&this.$1V_2,$v_3=$v_1&&$v_0;$v_2!==$v_3&&this.onEnabledChangedForControl($v_3);this.$FC_2(this.$1Q_0);$v_0!==this.$1V_2&&this.onEnabledChangedForButton($v_0);$v_1!==this.$23_2&&this.onEnabledChangedForMenu($v_1);this.$23_2=$v_1;this.$1V_2=$v_0}},dispose:function(){CUI.MenuLauncher.prototype.dispose.call(this);this.$G_2=null;this.$8u_2=null;this.$4W_2=null;this.$3a_2=null;this.$1y_2=null;this.$8_2=null;this.$8w_2=null;this.$4X_2=null;this.$3b_2=null;this.$2K_2=null;this.$9_2=null;this.$8z_2=null;this.$4a_2=null;this.$3d_2=null;this.$2M_2=null},get_$1_2:function(){return this.$5_0}};CUI.Controls.TextBoxCommandProperties=function(){};CUI.Controls.TextBox=function($p0,$p1,$p2){this.$$d_$Aj_1=Function.createDelegate(this,this.$Aj_1);this.$$d_$6C_1=Function.createDelegate(this,this.$6C_1);this.$$d_$6D_1=Function.createDelegate(this,this.$6D_1);this.$$d_$53_1=Function.createDelegate(this,this.$53_1);this.$$d_$48_1=Function.createDelegate(this,this.$48_1);this.$$d_$8J_1=Function.createDelegate(this,this.$8J_1);CUI.Controls.TextBox.initializeBase(this,[$p0,$p1,$p2]);this.addDisplayMode("Medium")};CUI.Controls.TextBox.prototype={$C_1:null,get_value:function(){this.$7t_1();return this.$C_1.value},set_value:function($p0){this.$7t_1();if($p0)this.$C_1.value=$p0;else this.$C_1.value="";return $p0},$7t_1:function(){if(!this.$C_1){this.$C_1=CUI.Utility.$7n("input");this.$C_1.type="text";CUI.Utility.$8f(this.$C_1,this.get_$1_1().ImeEnabled)}},createDOMElementForDisplayMode:function($p0){switch($p0){case "Medium":this.$7t_1();this.$C_1.id=this.$4_0;this.$C_1.setAttribute("mscui:controltype",this.get_$9h_0());this.$C_1.setAttribute("role",this.get_$3E_0());CUI.Utility.$1j(this.get_$1_1(),this.$C_1);this.$C_1.className="ms-cui-tb";if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_$1_1().MaxLength)){var $v_0=parseInt(this.get_$1_1().MaxLength);$v_0!==Number.NaN&&this.$C_1.setAttribute("maxlength",$v_0)}if(CUI.Utility.$x(this.get_$1_1().ShowAsLabel)){CUI.Utility.ensureCSSClassOnElement(this.$C_1,"ms-cui-tb-labelmode");this.$C_1.disabled=true}if(!CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().Width))this.$C_1.style.width=this.get_$1_1().Width;this.$R_1();return this.$C_1;default:this.ensureValidDisplayMode($p0);return null}},$Bl_0:function($p0){var $v_0=$get(this.$4_0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Medium":this.$C_1=$v_0;break}},$Bm_0:function($p0){this.$R_1()},$R_1:function(){$addHandler(this.$C_1,"change",this.$$d_$8J_1);$addHandler(this.$C_1,"focus",this.$$d_$48_1);$addHandler(this.$C_1,"blur",this.$$d_$53_1);$addHandler(this.$C_1,"mouseup",CUI.Utility.get_returnFalseHandler());$addHandler(this.$C_1,"mouseover",this.$$d_$6D_1);$addHandler(this.$C_1,"mouseout",this.$$d_$6C_1);$addHandler(this.$C_1,"keypress",this.$$d_$Aj_1)},onEnabledChanged:function($p0){if($p0)CUI.Utility.enableElement(this.$C_1);else CUI.Utility.disableElement(this.$C_1)},get_$9h_0:function(){return "TextBox"},get_$3E_0:function(){return "textbox"},$8J_1:function($p0){this.$Y_0();if(!this.get_enabled())return;this.get_stateProperties()["Value"]=this.get_value();this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().Command,1,this.get_stateProperties());if(this.$0_0.get_$55_1())this.$Ef_0();else this.$57_1(null)},$CI_0:function(){this.$8J_1(null)},$57_1:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined(this.$C_1))!CUI.ScriptUtility.isNullOrUndefined($p0)&&this.set_value($p0)},$8d_0:function(){if(!this.get_enabled())return false;this.$C_1.focus();return true},$48_1:function($p0){this.onBeginFocus();if(!this.get_enabled())return;CUI.Utility.$8X(this.$C_1);this.$0_0.set_$p_1(this)},$53_1:function($p0){this.onEndFocus();if(!this.get_enabled())return},$6D_1:function($p0){this.onBeginFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandPreview))return;this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().CommandPreview,5,this.get_stateProperties())},$6C_1:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandRevert))return;this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().CommandRevert,6,this.get_stateProperties())},$Aj_1:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined($p0)&&!CUI.ScriptUtility.isNullOrUndefined($p0.rawEvent))if($p0.rawEvent.keyCode===13){this.$8J_1($p0);$p0.preventDefault()}},$Ef_0:function(){var $v_0=this.pollForStateAndUpdateInternal(this.get_$1_1().Command,this.get_$1_1().QueryCommand,this.get_stateProperties(),false);$v_0&&this.$57_1(this.get_stateProperties()["Value"])},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$C_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.ToggleButtonCommandProperties=function(){};CUI.Controls.ToggleButton=function($p0,$p1,$p2){this.$$d_$E9_1=Function.createDelegate(this,this.$E9_1);this.$$d_$6C_1=Function.createDelegate(this,this.$6C_1);this.$$d_$6D_1=Function.createDelegate(this,this.$6D_1);this.$$d_onClick=Function.createDelegate(this,this.onClick);this.$$d_$53_1=Function.createDelegate(this,this.$53_1);this.$$d_$48_1=Function.createDelegate(this,this.$48_1);CUI.Controls.ToggleButton.initializeBase(this,[$p0,$p1,$p2]);this._id=$p1;this.addDisplayModes();this.get_stateProperties()["On"]=false};CUI.Controls.ToggleButton.prototype={_id:null,$G_1:null,$2P_1:null,$16_1:null,$9_1:null,$8_1:null,$i_1:null,$1a_1:null,$1z_1:null,$1x_1:null,$1Y_1:null,get_on:function(){return this.get_stateProperties()["On"]},set_on:function($p0){this.get_stateProperties()["On"]=$p0;this.setState($p0);return $p0},createComponentForDisplayModeInternal:function($p0){var $v_0;if($p0.startsWith("Menu")){$v_0=this.$0_0.$42_1(this.$4_0+"-"+$p0+this.$0_0.$2A_1(),$p0,this);this.$2P_1=this.get_$1_1().MenuItemId;this.$16_1=this.get_$1_1().CommandValueId;if(CUI.ScriptUtility.isNullOrEmptyString(this.$16_1))this.$16_1=this.$2P_1}else $v_0=CUI.Control.prototype.createComponentForDisplayModeInternal.call(this,$p0);return $v_0},createDOMElementForDisplayMode:function($p0){return this.$2n_1($p0,true)},$2n_1:function($p0,$p1){switch($p0){case "Large":this.$G_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Large",this.get_$1_1(),false,false);this.$Bl_0("Large");$p1&&this.$Bm_0("Large");return this.$G_1;case "Medium":this.$8_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Medium",this.get_$1_1(),false,false);this.$Bl_0("Medium");$p1&&this.$Bm_0("Medium");return this.$8_1;case "Small":this.$9_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Small",this.get_$1_1(),false,false);this.$Bl_0("Small");$p1&&this.$Bm_0("Small");return this.$9_1;case "Menu":this.$i_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Menu",this.get_$1_1(),true,false);$p1&&this.$Bm_0("Menu");return this.$i_1;case "Menu16":this.$1a_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Menu16",this.get_$1_1(),true,false);$p1&&this.$Bm_0("Menu16");return this.$1a_1;case "Menu32":this.$1z_1=CUI.Control.createStandardControlDOMElement(this,this.$0_0,"Menu32",this.get_$1_1(),true,false);$p1&&this.$Bm_0("Menu32");return this.$1z_1;default:this.ensureValidDisplayMode($p0);return null}},$7o_1:null,$Bl_0:function($p0){this.$7o_1=$p0;var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);switch($p0){case "Large":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$G_1=$v_0;break;case "Medium":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$8_1=$v_0;break;case "Small":if(!CUI.ScriptUtility.isNullOrUndefined($v_0))this.$9_1=$v_0;break}},$Bm_0:function($p0){switch($p0){case "Large":this.$R_1(this.$G_1,true);break;case "Medium":this.$R_1(this.$8_1,true);break;case "Small":this.$R_1(this.$9_1,true);break;case "Menu32":this.$R_1(this.$1z_1,false);break;case "Menu16":this.$R_1(this.$1a_1,false);break;case "Menu":this.$R_1(this.$i_1,false);break}},$R_1:function($p0,$p1){if($p1){$addHandler($p0,"mouseover",this.$$d_$48_1);$addHandler($p0,"mouseout",this.$$d_$53_1)}$addHandler($p0,"click",this.$$d_onClick);$addHandler($p0,"mouseover",this.$$d_$6D_1);$addHandler($p0,"mouseout",this.$$d_$6C_1);$addHandler($p0,"focus",this.$$d_$E9_1);$addHandler($p0,"blur",this.$$d_$53_1)},$8d_0:function(){if(!this.get_enabled())return false;var $v_0=this.get_displayedComponent().get_$2_0();$v_0.focus();return true},onEnabledChanged:function($p0){CUI.Utility.setEnabledOnElement(this.$9_1,$p0);CUI.Utility.setEnabledOnElement(this.$8_1,$p0);CUI.Utility.setEnabledOnElement(this.$G_1,$p0);CUI.Utility.setEnabledOnElement(this.$i_1,$p0);CUI.Utility.setEnabledOnElement(this.$1a_1,$p0);CUI.Utility.setEnabledOnElement(this.$1z_1,$p0);if(this.get_on())if($p0)this.setState(true);else this.setState(false)},get_$9h_0:function(){return "ToggleButton"},onStateChanged:function(){this.setState(this.get_stateProperties()["On"])},getDropDownDOMElementForDisplayMode:function($p0){var $v_0;switch($p0){case "Menu16":$v_0=this.$1x_1;break;case "Text":$v_0=this.$1Y_1;break;default:$v_0=CUI.Utility.$3("span");break}if($v_0)return $v_0;return this.$9k_1($p0)},$9k_1:function($p0){switch($p0){case "Menu":this.$1x_1=this.$2n_1("Menu",false).cloneNode(true);return this.$1x_1;case "Menu16":this.$1x_1=this.$2n_1("Menu16",false).cloneNode(true);return this.$1x_1;case "Text":var $v_0=CUI.Utility.$3("a");CUI.Utility.$1v($v_0);this.$1Y_1=CUI.Utility.$3("span");this.$1Y_1.className="ms-cui-textmenuitem";CUI.UIUtility.setInnerText($v_0,this.get_$1_1().LabelText);this.$1Y_1.appendChild($v_0);return this.$1Y_1;default:return CUI.Utility.$3("span")}},deselect:function(){},getMenuItemId:function(){return this.$2P_1},getCommandValueId:function(){return this.$16_1},focusOnDisplayedComponent:function(){this.receiveFocus()},getTextValue:function(){return this.get_$1_1().LabelText},receiveFocus:function(){this.onBeginFocus();var $v_0=this.get_displayedComponent();if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;$v_0.set_$1H_2(true);!CUI.ScriptUtility.isNullOrUndefined(this.$i_1)&&this.$i_1.focus();!CUI.ScriptUtility.isNullOrUndefined(this.$1a_1)&&this.$1a_1.focus()},onMenuClosed:function(){this.$Y_0()},onClick:function($p0){!CUI.ScriptUtility.isNullOrUndefined(CUI.PMetrics)&&CUI.PMetrics.perfMark(7704);this.$Y_0();$p0.preventDefault();if(!this.get_enabled())return;this.$0_0.set_$45_1(this);var $v_0=1,$v_1=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1==="OptionSelection"){$v_0=3;this.get_stateProperties()["CommandValueId"]=this.$16_1}this.get_stateProperties()["On"]=!this.get_stateProperties()["On"];this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().Command,$v_0,this.get_stateProperties());if(this.$0_0.get_$55_1())this.$Ef_0();else this.setState(this.get_stateProperties()["On"]);!CUI.ScriptUtility.isNullOrUndefined(CUI.PMetrics)&&CUI.PMetrics.perfMark(7705)},setState:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined(this.$9_1))if($p0)CUI.Utility.ensureCSSClassOnElement(this.$9_1,"ms-cui-ctl-on");else CUI.Utility.removeCSSClassFromElement(this.$9_1,"ms-cui-ctl-on");if(!CUI.ScriptUtility.isNullOrUndefined(this.$8_1))if($p0)CUI.Utility.ensureCSSClassOnElement(this.$8_1,"ms-cui-ctl-on");else CUI.Utility.removeCSSClassFromElement(this.$8_1,"ms-cui-ctl-on");if(!CUI.ScriptUtility.isNullOrUndefined(this.$G_1))if($p0)CUI.Utility.ensureCSSClassOnElement(this.$G_1,"ms-cui-ctl-on");else CUI.Utility.removeCSSClassFromElement(this.$G_1,"ms-cui-ctl-on");if(!CUI.ScriptUtility.isNullOrUndefined(this.$1z_1))if($p0)CUI.Utility.ensureCSSClassOnElement(this.$1z_1,"ms-cui-ctl-on");else CUI.Utility.removeCSSClassFromElement(this.$1z_1,"ms-cui-ctl-on");if(!CUI.ScriptUtility.isNullOrUndefined(this.$i_1))if($p0)CUI.Utility.ensureCSSClassOnElement(this.$i_1,"ms-cui-ctl-on");else CUI.Utility.removeCSSClassFromElement(this.$i_1,"ms-cui-ctl-on");if(!CUI.ScriptUtility.isNullOrUndefined(this.$1a_1))if($p0)CUI.Utility.ensureCSSClassOnElement(this.$1a_1,"ms-cui-ctl-on");else CUI.Utility.removeCSSClassFromElement(this.$1a_1,"ms-cui-ctl-on")},$3J_1:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$1z_1)&&CUI.Utility.removeCSSClassFromElement(this.$1z_1,"ms-cui-ctl-disabledHoveredOver");!CUI.ScriptUtility.isNullOrUndefined(this.$i_1)&&CUI.Utility.removeCSSClassFromElement(this.$i_1,"ms-cui-ctl-disabledHoveredOver");!CUI.ScriptUtility.isNullOrUndefined(this.$1a_1)&&CUI.Utility.removeCSSClassFromElement(this.$1a_1,"ms-cui-ctl-disabledHoveredOver")},$E9_1:function($p0){this.$0_0.set_$p_1(this);this.$48_1($p0)},$48_1:function($p0){this.onBeginFocus();if(!this.get_enabled()){this.$3J_1();return}var $v_0=this.get_displayedComponent();CUI.MenuItem.isInstanceOfType($v_0)&&$v_0.set_$1H_2(true);if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandPreview))return;var $v_1=5,$v_2=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_2==="OptionSelection"){$v_1=7;this.get_stateProperties()["CommandValueId"]=this.$16_1}$v_0.raiseCommandEvent(this.get_$1_1().CommandPreview,$v_1,this.get_stateProperties())},$6D_1:function($p0){this.onBeginFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandPreview))return;var $v_0=5,$v_1=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1==="OptionSelection"){$v_0=7;this.get_stateProperties()["CommandValueId"]=this.$16_1}this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().CommandPreview,$v_0,this.get_stateProperties())},$53_1:function($p0){this.onEndFocus();if(!this.get_enabled())return;var $v_0=this.get_displayedComponent();CUI.MenuItem.isInstanceOfType($v_0)&&$v_0.set_$1H_2(false);if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandRevert))return;var $v_1=6,$v_2=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_2)&&$v_2==="OptionSelection"){$v_1=8;this.get_stateProperties()["CommandValueId"]=this.$16_1}$v_0.raiseCommandEvent(this.get_$1_1().CommandRevert,$v_1,this.get_stateProperties())},$6C_1:function($p0){this.onEndFocus();if(!this.get_enabled())return;if(CUI.ScriptUtility.isNullOrUndefined(this.get_$1_1().CommandRevert))return;var $v_0=6,$v_1=this.get_$1_1().CommandType;if(!CUI.ScriptUtility.isNullOrUndefined($v_1)&&$v_1==="OptionSelection"){$v_0=8;this.get_stateProperties()["CommandValueId"]=this.$16_1}this.get_displayedComponent().raiseCommandEvent(this.get_$1_1().CommandRevert,$v_0,this.get_stateProperties())},$Ef_0:function(){var $v_0=this.pollForStateAndUpdateInternal(this.get_$1_1().Command,this.get_$1_1().QueryCommand,this.get_stateProperties(),false);$v_0&&this.setState(this.get_stateProperties()["On"])},addDisplayModes:function(){this.addDisplayMode("Small");this.addDisplayMode("Medium");this.addDisplayMode("Large");this.addDisplayMode("Menu");this.addDisplayMode("Menu16");this.addDisplayMode("Menu32")},dispose:function(){CUI.Control.prototype.dispose.call(this);this.$G_1=null;this.$9_1=null;this.$8_1=null;this.$i_1=null;this.$1a_1=null;this.$1z_1=null;this.$1x_1=null;this.$1Y_1=null},get_$1_1:function(){return this.$5_0}};CUI.Controls.JewelMenuLauncher=function($p0,$p1,$p2,$p3){this.$$d_onContextMenu=Function.createDelegate(this,this.onContextMenu);this.$$d_onKeyPress=Function.createDelegate(this,this.onKeyPress);this.$$d_onClick=Function.createDelegate(this,this.onClick);this.$$d_onBlur=Function.createDelegate(this,this.onBlur);this.$$d_onFocus=Function.createDelegate(this,this.onFocus);CUI.Controls.JewelMenuLauncher.initializeBase(this,[$p0,$p1,$p2,$p3]);this.addDisplayMode("Default")};CUI.Controls.JewelMenuLauncher.prototype={$F_2:null,$J_2:null,$1l_2:null,$4Q_2:null,$1D_2:null,$1O_2:null,$1F_2:null,$2b_2:null,$31_2:false,$7I_2:null,$7B_2:null,$7H_2:null,$77_2:null,$78_2:null,$7C_2:null,$7A_2:null,createDOMElementForDisplayMode:function($p0){if($p0!=="Default"){this.ensureValidDisplayMode($p0);return null}var $v_0=CUI.ScriptUtility.isNullOrUndefined(this.get_properties().Alt)?"":this.get_properties().Alt;this.$F_2=CUI.Utility.$3("span");this.$F_2.id=this.get_properties().Id+"-Default";this.$F_2.className="ms-cui-jewel-jewelMenuLauncher";this.$J_2=CUI.Utility.$3("a");CUI.Utility.$1v(this.$J_2);this.$J_2.title=$v_0;this.$31_2=!CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().LabelText);if(!this.$31_2){this.$1l_2=CUI.Utility.$3("img");this.$4Q_2=CUI.Utility.$k(2,10,this.get_properties().Image,this.get_properties().ImageClass,this.$1l_2,true,false,this.get_properties().ImageTop,this.get_properties().ImageLeft);this.$1l_2.alt=$v_0;this.$J_2.appendChild(this.$4Q_2)}else{var $v_1=!CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().ImageLeftSide),$v_2=!CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().ImageRightSide);if($v_1){this.$1D_2=CUI.Utility.$3("span");this.$1D_2.className="ms-cui-jewel-left";this.$1D_2.id=this.get_properties().Id+"-Default-left";CUI.Utility.$1h(this.$1D_2,this.get_properties().ImageLeftSide,this.get_properties().ImageLeftSideClass,this.get_properties().ImageLeftSideTop,this.get_properties().ImageLeftSideLeft,null,this.get_properties().Height);this.$1D_2.style.width=this.get_properties().ImageLeftSideWidth+"px";this.$1D_2.style.height=this.get_properties().Height+"px";this.$J_2.appendChild(this.$1D_2)}this.$1O_2=CUI.Utility.$3("span");this.$1O_2.className="ms-cui-jewel-middle";this.$1O_2.id=this.get_properties().Id+"-Default-middle";CUI.Utility.$1h(this.$1O_2,this.get_properties().Image,this.get_properties().ImageClass,this.get_properties().ImageTop,this.get_properties().ImageLeft,null,this.get_properties().Height);this.$2b_2=CUI.Utility.$3("span");if(!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().LabelCss))this.$2b_2.style.cssText=this.get_properties().LabelCss;this.$2b_2.className="ms-cui-jewel-label";if(!CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().Height))this.$2b_2.style.marginTop=Math.floor(parseInt(this.get_properties().Height)-14)/2+"px";CUI.UIUtility.setInnerText(this.$2b_2,this.get_properties().LabelText);this.$1O_2.appendChild(this.$2b_2);this.$J_2.appendChild(this.$1O_2);if($v_2){this.$1F_2=CUI.Utility.$3("span");this.$1F_2.className="ms-cui-jewel-right";this.$1F_2.id=this.get_properties().Id+"-Default-right";CUI.Utility.$1h(this.$1F_2,this.get_properties().ImageRightSide,this.get_properties().ImageRightSideClass,this.get_properties().ImageRightSideTop,this.get_properties().ImageRightSideLeft,null,this.get_properties().Height);this.$1F_2.style.width=this.get_properties().ImageRightSideWidth+"px";this.$1F_2.style.height=this.get_properties().Height+"px";this.$J_2.appendChild(this.$1F_2)}}this.$Bm_0($p0);this.$F_2.appendChild(this.$J_2);return this.$F_2},$Bl_0:function($p0){this.ensureValidDisplayMode($p0);var $v_0=$get(this.$4_0+"-"+$p0);this.storeElementForDisplayMode($v_0,$p0);var $v_1=$v_0.childNodes[0];this.$F_2=$v_0;this.$J_2=$v_1;this.$31_2=!CUI.ScriptUtility.isNullOrEmptyString(this.get_properties().LabelText);if(!this.$31_2){this.$4Q_2=this.$J_2.childNodes[0];this.$1l_2=this.$4Q_2.childNodes[0]}else{this.$1D_2=$get(this.$4_0+"-"+$p0+"-left");this.$1O_2=$get(this.$4_0+"-"+$p0+"-middle");if(this.$1O_2)this.$2b_2=this.$1O_2.firstChild;this.$1F_2=$get(this.$4_0+"-"+$p0+"-right")}},$Bm_0:function($p0){this.ensureValidDisplayMode($p0);this.$7I_2=this.$$d_onFocus;this.$7B_2=this.$$d_onFocus;this.$7H_2=this.$$d_onBlur;this.$77_2=this.$$d_onBlur;this.$78_2=this.$$d_onClick;this.$7C_2=this.$$d_onKeyPress;$addHandler(this.$J_2,"mouseover",this.$7I_2);$addHandler(this.$J_2,"focus",this.$7B_2);$addHandler(this.$J_2,"mouseout",this.$7H_2);$addHandler(this.$J_2,"blur",this.$77_2);$addHandler(this.$J_2,"click",this.$78_2);$addHandler(this.$J_2,"keypress",this.$7C_2);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){this.$7A_2=this.$$d_onContextMenu;$addHandler(this.$J_2,"contextmenu",this.$7A_2)}},dispose:function(){!CUI.ScriptUtility.isNullOrUndefined(this.$J_2)&&$clearHandlers(this.$J_2);this.$7I_2=null;this.$7B_2=null;this.$7H_2=null;this.$77_2=null;this.$78_2=null;this.$7C_2=null;this.$7A_2=null;CUI.MenuLauncher.prototype.dispose.call(this);this.$F_2=null;this.$J_2=null;this.$1l_2=null;this.$4Q_2=null;this.$1D_2=null;this.$1O_2=null;this.$1F_2=null;this.$2b_2=null},onEnabledChanged:function($p0){CUI.Utility.setEnabledOnElement(this.$J_2,$p0)},onFocus:function($p0){if(!this.get_enabled()||this.$j_1)return;this.$3J_2()},onBlur:function($p0){if(!this.get_enabled()||this.$j_1)return;this.$1L_2()},onClick:function($p0){$p0.preventDefault();if(!this.get_enabled()||CUI.ScriptUtility.isNullOrUndefined($p0)||$p0.button)return;if(this.$j_1){this.$41_1();return}this.$Ab_2()},onKeyPress:function($p0){if(!this.get_enabled())return;if(!$p0||!$p0.rawEvent)return;var $v_0=$p0.rawEvent.keyCode;if($v_0===13||$v_0===32||$v_0===40){this.$18_1=true;if(this.$j_1)this.$41_1();else this.$Ab_2();$p0.preventDefault()}},onContextMenu:function($p0){!CUI.ScriptUtility.isNullOrUndefined($p0)&&$p0.preventDefault()},$Ab_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ImageDown))return;if(!this.$31_2){this.$1l_2.src=this.get_properties().ImageDown;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ImageDownClass))this.$1l_2.className=this.get_properties().ImageDownClass}else{this.$1D_2&&CUI.Utility.$1h(this.$1D_2,this.get_properties().ImageLeftSideDown,this.get_properties().ImageLeftSideDownClass,this.get_properties().ImageLeftSideDownTop,this.get_properties().ImageLeftSideDownLeft,null,this.get_properties().Height);CUI.Utility.$1h(this.$1O_2,this.get_properties().ImageDown,this.get_properties().ImageDownClass,this.get_properties().ImageDownTop,this.get_properties().ImageDownLeft,null,this.get_properties().Height);this.$1F_2&&CUI.Utility.$1h(this.$1F_2,this.get_properties().ImageRightSideDown,this.get_properties().ImageRightSideDownClass,this.get_properties().ImageRightSideDownTop,this.get_properties().ImageRightSideDownLeft,null,this.get_properties().Height)}this.launchMenuInternal(this.$J_2)},onLaunchedMenuClosed:function(){this.$1L_2();this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandMenuClose,10,null)},launchMenuInternal:function($p0){this.launchMenu($p0);this.get_displayedComponent().raiseCommandEvent(this.get_properties().CommandMenuOpen,4,null)},$3J_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ImageHover))return;if(!this.$31_2){this.$1l_2.src=this.get_properties().ImageHover;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ImageHoverClass))this.$1l_2.className=this.get_properties().ImageHoverClass}else{this.$1D_2&&CUI.Utility.$1h(this.$1D_2,this.get_properties().ImageLeftSideHover,this.get_properties().ImageLeftSideHoverClass,this.get_properties().ImageLeftSideHoverTop,this.get_properties().ImageLeftSideHoverLeft,null,this.get_properties().Height);CUI.Utility.$1h(this.$1O_2,this.get_properties().ImageHover,this.get_properties().ImageHoverClass,this.get_properties().ImageHoverTop,this.get_properties().ImageHoverLeft,null,this.get_properties().Height);this.$1F_2&&CUI.Utility.$1h(this.$1F_2,this.get_properties().ImageRightSideHover,this.get_properties().ImageRightSideHoverClass,this.get_properties().ImageRightSideHoverTop,this.get_properties().ImageRightSideHoverLeft,null,this.get_properties().Height)}},$1L_2:function(){if(CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ImageHover))return;if(!this.$31_2){this.$1l_2.src=this.get_properties().Image;if(!CUI.ScriptUtility.isNullOrUndefined(this.get_properties().ImageClass))this.$1l_2.className=this.get_properties().ImageClass}else{this.$1D_2&&CUI.Utility.$1h(this.$1D_2,this.get_properties().ImageLeftSide,this.get_properties().ImageLeftSideClass,this.get_properties().ImageLeftSideTop,this.get_properties().ImageLeftSideLeft,null,this.get_properties().Height);CUI.Utility.$1h(this.$1O_2,this.get_properties().Image,this.get_properties().ImageClass,this.get_properties().ImageTop,this.get_properties().ImageLeft,null,this.get_properties().Height);this.$1F_2&&CUI.Utility.$1h(this.$1F_2,this.get_properties().ImageRightSide,this.get_properties().ImageRightSideClass,this.get_properties().ImageRightSideTop,this.get_properties().ImageRightSideLeft,null,this.get_properties().Height)}},get_properties:function(){return this.$5_0},$DO_2:function(){this.$J_2.focus()}};Type.registerNamespace("CUI.Page");CUI.Page.CommandDispatcher=function(){this.$2S_0={}};CUI.Page.CommandDispatcher.prototype={$2S_0:null,$AW_0:function(){},$5o_0:0,getNextSequenceNumber:function(){if(this.$5o_0+1<0)throw Error.create("Command Dispatcher sequence numbers overflowed into negative numbers.");return ++this.$5o_0},peekNextSequenceNumber:function(){return this.$5o_0+1},getLastSequenceNumber:function(){return this.$5o_0},executeCommand:function(commandId,properties){return this.$DE_0(commandId,properties,this.getNextSequenceNumber())},$DE_0:function($p0,$p1,$p2){var $v_0=this.$2S_0[$p0];if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;else if(Array.isInstanceOfType($v_0)){for(var $v_1=$v_0,$v_2=false,$v_3=0;$v_3<$v_1.length;$v_3++){var $v_4=$v_1[$v_3];if(this.callCommandHandler($v_4,$p0,$p1,$p2))$v_2=true}return $v_2}else return this.callCommandHandler($v_0,$p0,$p1,$p2)},isCommandEnabled:function(commandId){var $v_0=this.$2S_0[commandId];if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;else if(Array.isInstanceOfType($v_0)){for(var $v_1=$v_0,$v_2=0;$v_2<$v_1.length;$v_2++){var $v_3=$v_1[$v_2];if(this.callCommandHandlerForEnabled($v_3,commandId))return true}return false}else return this.callCommandHandlerForEnabled($v_0,commandId)},$AE_0:function($p0){return this.$2S_0[$p0]},registerCommandHandler:function(commandId,handler){if(CUI.ScriptUtility.isNullOrUndefined(commandId)||CUI.ScriptUtility.isNullOrUndefined(handler))throw Error.create("commandId and handler may not be null or undefined");var $v_0=this.$2S_0[commandId];if(CUI.ScriptUtility.isNullOrUndefined($v_0))this.$2S_0[commandId]=handler;else if(Array.isInstanceOfType($v_0))!Array.contains($v_0,handler)&&Array.add($v_0,handler);else{if($v_0===handler)return;var $v_1=[];Array.add($v_1,$v_0);Array.add($v_1,handler);this.$2S_0[commandId]=$v_1}},unregisterCommandHandler:function(commandId,handler){if(CUI.ScriptUtility.isNullOrUndefined(commandId)||CUI.ScriptUtility.isNullOrUndefined(handler))throw Error.create("commandId and handler may not be null or undefined");var $v_0=this.$2S_0[commandId];if(CUI.ScriptUtility.isNullOrUndefined($v_0))return;else if(Array.isInstanceOfType($v_0))Array.remove($v_0,handler);else if($v_0===handler)this.$2S_0[commandId]=null},registerMultipleCommandHandler:function(component,commands){for(var $v_0=0;$v_0<commands.length;$v_0++)this.registerCommandHandler(commands[$v_0],component)},unregisterMultipleCommandHandler:function(component,commands){for(var $v_0=0;$v_0<commands.length;$v_0++)this.unregisterCommandHandler(commands[$v_0],component)},callCommandHandler:function(handler,commandId,properties,sequenceNumber){return handler.handleCommand(commandId,properties,sequenceNumber)},callCommandHandlerForEnabled:function(handler,commandId){return handler.canHandleCommand(commandId)}};CUI.Page.FocusManager=function($p0){CUI.Page.FocusManager.initializeBase(this);this.$25_1=$p0;this.$l_1=[];this.$2i_1={};this.$1M_1=[];this.$2e_1={}};CUI.Page.FocusManager.prototype={$1M_1:null,$2i_1:null,$25_1:null,$2e_1:null,$AW_0:function(){},$AN_1:function(){this.$2e_1={};for(var $v_0=this.$1M_1.length,$v_1=0;$v_1<$v_0;$v_1++){var $v_2=this.$1M_1[$v_1];this.$2e_1[$v_2]=$v_2}},requestFocusForComponent:function(component){if(CUI.ScriptUtility.isNullOrUndefined(component))return false;if(Array.contains(this.$1M_1,component))return true;Array.add(this.$1M_1,component);this.$AN_1();component.receiveFocus();return true},releaseFocusFromComponent:function(component){if(CUI.ScriptUtility.isNullOrUndefined(component))return false;if(!Array.contains(this.$1M_1,component))return true;Array.remove(this.$1M_1,component);this.$AN_1();component.yieldFocus();return true},releaseAllFoci:function(){this.$2e_1={};for(var $v_0=this.$1M_1.length,$v_1=$v_0-1;$v_1>=0;$v_1--){var $v_2=this.$1M_1[$v_1];Array.remove(this.$1M_1,$v_2);$v_2.yieldFocus()}return true},getFocusedComponents:function(){return Array.clone(this.$1M_1)},handleCommand:function(commandId,properties,sequenceNumber){var $v_0=this.$AE_0(commandId);if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;else if(Array.isInstanceOfType($v_0)){for(var $v_1=$v_0,$v_2=0;$v_2<$v_1.length;$v_2++){var $v_3=$v_1[$v_2];if(CUI.ScriptUtility.isNullOrUndefined(this.$2e_1[$v_3]))continue;if(this.callCommandHandler($v_3,commandId,properties,sequenceNumber))return true}return false}else{if(CUI.ScriptUtility.isNullOrUndefined(this.$2e_1[$v_0]))return false;return this.callCommandHandler($v_0,commandId,properties,sequenceNumber)}},canHandleCommand:function(commandId){var $v_0=this.$AE_0(commandId);if(CUI.ScriptUtility.isNullOrUndefined($v_0))return false;else if(Array.isInstanceOfType($v_0)){for(var $v_1=$v_0,$v_2=0;$v_2<$v_1.length;$v_2++){var $v_3=$v_1[$v_2];if(CUI.ScriptUtility.isNullOrUndefined(this.$2e_1[$v_3]))continue;if(this.callCommandHandlerForEnabled($v_3,commandId))return true}return false}else{if(CUI.ScriptUtility.isNullOrUndefined(this.$2e_1[$v_0]))return false;return this.callCommandHandlerForEnabled($v_0,commandId)}},$l_1:null,$9U_1:function($p0){if(Array.contains(this.$l_1,$p0))return;this.registerMultipleCommandHandler($p0,$p0.getFocusedCommands());Array.add(this.$l_1,$p0)},$Ey_1:function($p0){if(!Array.contains(this.$l_1,$p0))return;this.unregisterMultipleCommandHandler($p0,$p0.getFocusedCommands());this.releaseFocusFromComponent($p0);Array.remove(this.$l_1,$p0)},executeCommand:function(commandId,properties){throw Error.create("ExecuteCommand should not be called on the main CommandDispatcher of the page, not the FocusManager")},registerCommandHandler:function(commandId,handler){CUI.Page.CommandDispatcher.prototype.registerCommandHandler.call(this,commandId,handler);if(CUI.ScriptUtility.isNullOrUndefined(this.$2i_1[commandId])){this.$25_1.$10_1.registerCommandHandler(commandId,this);this.$2i_1[commandId]=0}var $v_0=this.$2i_1[commandId];this.$2i_1[commandId]=$v_0+1},unregisterCommandHandler:function(commandId,handler){CUI.Page.CommandDispatcher.prototype.unregisterCommandHandler.call(this,commandId,handler);var $v_0=this.$2i_1[commandId];if(!CUI.ScriptUtility.isNullOrUndefined($v_0)&&$v_0>0){this.$2i_1[commandId]=--$v_0;if($v_0<=0){this.$25_1.$10_1.unregisterCommandHandler(commandId,this);delete this.$2i_1[commandId]}}},getNextSequenceNumber:function(){throw Error.create("The FocusManager does not issue command sequence numbers.  This is only done by the main CommandDispatcher of the page.")},peekNextSequenceNumber:function(){throw Error.create("The FocusManager does not issue command sequence numbers.  This is only done by the main CommandDispatcher of the page.")},getLastSequenceNumber:function(){throw Error.create("The FocusManager does not issue command sequence numbers.  This is only done by the main CommandDispatcher of the page.")},callCommandHandler:function(handler,commandId,properties,sequenceNumber){if(!Array.contains(this.$1M_1,handler))return false;return handler.handleCommand(commandId,properties,sequenceNumber)},callCommandHandlerForEnabled:function(handler,commandId){if(!Array.contains(this.$1M_1,handler))return false;return handler.canHandleCommand(commandId)}};CUI.Page.PageManager=function(){this.$$d_$8M_1=Function.createDelegate(this,this.$8M_1);CUI.Page.PageManager.initializeBase(this);this.$l_1=[];this.$4H_1={};this.$10_1=new CUI.Page.CommandDispatcher;this.$3j_1=new CUI.Page.FocusManager(this);this.$5v_1=new CUI.Page.UndoManager(this);this.$1d_1=[];this.$2R_1=this.$$d_$8M_1;$addHandler(window,"unload",this.$2R_1)};CUI.Page.PageManager.initialize=function(){if(!CUI.ScriptUtility.isNullOrUndefined(CUI.Page.PageManager._instance))return;CUI.Page.PageManager._instance=CUI.Page.PageManager.createPageManager();CUI.Page.PageManager._instance.initializeInternal()};CUI.Page.PageManager.createPageManager=function(){return new CUI.Page.PageManager};CUI.Page.PageManager.get_instance=function(){!CUI.Page.PageManager._instance&&CUI.Page.PageManager.initialize();return CUI.Page.PageManager._instance};CUI.Page.PageManager.prototype={$2R_1:null,initializeInternal:function(){this.$10_1.$AW_0();this.$5v_1.$AW_0();this.$3j_1.$AW_0();this.$10_1.registerCommandHandler("appstatechanged",this)},$8M_1:function($p0){this.dispose()},dispose:function(){!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbon())&&this.get_ribbon().$DL_1();this.$3j_1=null;this.$5v_1=null;this.$10_1=null;this.$1d_1=null;this.$l_1=null;$removeHandler(window,"unload",this.$2R_1)},$10_1:null,get_commandDispatcher:function(){return this.$10_1},$3j_1:null,get_focusManager:function(){return this.$3j_1},$5v_1:null,get_undoManager:function(){return this.$5v_1},$6i_1:null,get_$7v_1:function(){if(!this.$6i_1)this.$6i_1=new Sys.EventHandlerList;return this.$6i_1},$36_1:null,get_ribbon:function(){return this.$36_1},set_ribbon:function(value){if(value===this.$36_1)return value;if(CUI.ScriptUtility.isNullOrUndefined(value)&&!CUI.ScriptUtility.isNullOrUndefined(this.$36_1)){this.removeRoot(this.$36_1);this.$36_1=null}else if(!Array.contains(this.$1d_1,value)){this.addRoot(value);this.$36_1=value}return value},add_ribbonInited:function(value){this.get_$7v_1().addHandler("RibbonInited",value)},remove_ribbonInited:function(value){this.get_$7v_1().removeHandler("RibbonInited",value)},onComponentBuilt:function(root,componentId){this.pollRootState(root);if(CUI.Ribbon.isInstanceOfType(root)){var $v_0=this.get_$7v_1().getHandler("RibbonInited");$v_0&&$v_0(this,Sys.EventArgs.Empty)}},onComponentCreated:function(root,componentId){if(CUI.Ribbon.isInstanceOfType(root)&&CUI.ScriptUtility.isNullOrUndefined(this.get_ribbon()))this.set_ribbon(root);else this.addRoot(root)},$1d_1:null,addRoot:function(root){if(Array.contains(this.$1d_1,root))throw Error.create("This Root has already been added to the PageManager");Array.add(this.$1d_1,root);root.set_rootUser(this)},removeRoot:function(root){if(!Array.contains(this.$1d_1,root))throw Error.create("This Root has not been added to the PageManager.");Array.remove(this.$1d_1,root);root.set_rootUser(null)},disposeAllRoots:function(){this.$36_1=null;for(var $v_0=0;$v_0<this.$1d_1.length;$v_0++){var $v_1=this.$1d_1[$v_0];$v_1.dispose()}this.$1d_1=[]},$l_1:null,$4H_1:null,getPageComponentById:function(id){return this.$4H_1[id]},addPageComponent:function(component){!CUI.ScriptUtility.isNullOrUndefined(this.$4H_1[component.getId()])&&Error.create("A PageComponent with id: "+component.getId()+" has already been added to the PageManger.");if(!CUI.ScriptUtility.isNullOrUndefined(this.$l_1)&&!Array.contains(this.$l_1,component)){this.$4H_1[component.getId()]=component;component.init();this.$10_1.registerMultipleCommandHandler(component,component.getGlobalCommands());Array.add(this.$l_1,component);component.isFocusable()&&this.$3j_1.$9U_1(component)}},removePageComponent:function(component){if(CUI.ScriptUtility.isNullOrUndefined(this.$l_1)||!Array.contains(this.$l_1,component))return;this.$10_1.unregisterMultipleCommandHandler(component,component.getGlobalCommands());Array.remove(this.$l_1,component);component.isFocusable()&&this.$3j_1.$Ey_1(component);this.$4H_1[component.getId()]=null},executeRootCommand:function(commandId,properties,commandInfo,root){return this.$10_1.executeCommand(commandId,properties)},isRootCommandEnabled:function(commandId,root){return this.$10_1.isCommandEnabled(commandId)},onRootRefreshed:function(root){!CUI.ScriptUtility.isNullOrUndefined(root)&&this.pollRootState(root)},handleCommand:function(commandId,properties,sequenceNumber){if(commandId==="appstatechanged"){for(var $v_0=0;$v_0<this.$1d_1.length;$v_0++){var $v_1=this.$1d_1[$v_0];this.pollRootState($v_1);$v_1.$h_0&&$v_1.$1i_0()}return true}return false},$7P_1:false,get_rootPollingInProgress:function(){return this.$7P_1},pollRootState:function(root){try{this.$7P_1=true;root.pollForStateAndUpdate()}finally{this.$7P_1=false}},changeCommandContext:function(commandContextId){if(!CUI.ScriptUtility.isNullOrUndefined(this.get_ribbon()))return this.get_ribbon().selectTabByCommand(commandContextId);return false},canHandleCommand:function(commandId){return commandId==="appstatechanged"},restoreFocusToRibbon:function(){!this.get_ribbon().restoreFocus()&&this.get_ribbon().setFocus()}};CUI.Page.UndoManager=function($p0){this.$7O_0=CUI.Page.UndoManager.$2B;this.$25_0=$p0;this.$1G_0=[];this.$14_0=[];this.$27_0={}};CUI.Page.UndoManager.prototype={$25_0:null,$27_0:null,$1G_0:null,$14_0:null,$AW_0:function(){this.$25_0.$10_1.registerCommandHandler("GlobalUndo",this);this.$25_0.$10_1.registerCommandHandler("GlobalRedo",this);this.$25_0.$10_1.registerCommandHandler("grpedit",this)},addUndoSequenceNumber:function(sequenceNumber){this.$Er_0(sequenceNumber);sequenceNumber!==this.$7O_0&&this.$Cm_0()},addRedoSequenceNumber:function(sequenceNumber){this.$Eq_0(sequenceNumber)},get_oldestSequenceNumber:function(){if(!this.$1G_0.length)return CUI.Page.UndoManager.$2B;var $v_0=CUI.Page.UndoManager.$2B,$v_1=CUI.Page.UndoManager.$2B;if(this.$1G_0.length>0)$v_0=this.$1G_0[this.$1G_0.length-1];if(this.$14_0.length>0)$v_1=this.$14_0[0];if($v_0===CUI.Page.UndoManager.$2B)return $v_0;else return $v_0},$Ck_0:function(){var $v_0=this.$Ei_0();if($v_0===CUI.Page.UndoManager.$2B)return;var $v_1={};$v_1["SequenceNumber"]=$v_0;this.$25_0.$10_1.executeCommand("Undo",$v_1)},$Cj_0:function(){var $v_0=this.$Eg_0();if($v_0===CUI.Page.UndoManager.$2B)return;var $v_1={};$v_1["SequenceNumber"]=$v_0;this.$7O_0=this.$25_0.$10_1.peekNextSequenceNumber();this.$25_0.$10_1.executeCommand("Redo",$v_1)},$Eg_0:function(){if(!this.$14_0.length)return CUI.Page.UndoManager.$2B;var $v_0=this.$14_0[0];Array.removeAt(this.$14_0,0);this.$27_0[$v_0.toString()]=null;return $v_0},$Eq_0:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined(this.$27_0[$p0.toString()])){if(this.$1G_0[0]!==$p0)throw Error.create("This command sequence number is already on the undo or the redo stack but it is not ontop of the redo stack.  Pushing it would result in out of sequence redo and undo stacks.");return}Array.insert(this.$14_0,0,$p0);this.$27_0[$p0.toString()]=$p0},$Ei_0:function(){if(!this.$1G_0.length)return CUI.Page.UndoManager.$2B;var $v_0=this.$1G_0[0];Array.removeAt(this.$1G_0,0);this.$27_0[$v_0.toString()]=null;return $v_0},$Er_0:function($p0){if(!CUI.ScriptUtility.isNullOrUndefined(this.$27_0[$p0.toString()])){if(this.$1G_0[0]!==$p0)throw Error.create("This command sequence number is already on the stack and not on top.  Pushing it would result in an out of sequence undo stack.");return}Array.insert(this.$1G_0,0,$p0);this.$27_0[$p0.toString()]=$p0},$Cm_0:function(){for(var $v_0=0;$v_0<this.$14_0.length;$v_0++){this.$27_0[this.$14_0[$v_0].toString()]=null;Array.remove(this.$14_0,this.$14_0[$v_0])}Array.clear(this.$14_0)},invalidateUndoSequenceNumber:function(sequenceNumber){for(var $v_0=this.$1G_0.length-1;$v_0>-1;$v_0--){var $v_1=this.$1G_0[$v_0];if($v_1<=sequenceNumber){Array.removeAt(this.$1G_0,$v_0);this.$27_0[$v_1.toString()]=null}}while(this.$14_0.length>0&&this.$14_0[0]<=sequenceNumber){this.$27_0[this.$14_0[0].toString()]=null;Array.removeAt(this.$14_0,0)}},canHandleCommand:function(commandId){if(commandId==="GlobalUndo")return this.$1G_0.length>0;else if(commandId==="GlobalRedo")return this.$14_0.length>0;else if(commandId==="grpedit")return true;return false},handleCommand:function(commandId,properties,sequenceNumber){switch(commandId){case "GlobalUndo":this.$Ck_0();return true;case "GlobalRedo":this.$Cj_0();return true}return false}};Type.registerNamespace("Commands");Commands.CommandIds=function(){};Commands.GlobalRedoProperties=function(){};Commands.RedoProperties=function(){};Commands.GlobalUndoProperties=function(){};Commands.UndoProperties=function(){};Mscrm.CommandInformation.registerClass("Mscrm.CommandInformation");Mscrm.ContextualGroupInfo.registerClass("Mscrm.ContextualGroupInfo");Mscrm.CommandHandler.registerClass("Mscrm.CommandHandler",CUI.Page.PageComponent);Mscrm.CommandHandlerWrapper.registerClass("Mscrm.CommandHandlerWrapper",CUI.Page.PageComponent);Mscrm.AlwaysEnabledCommandHandler.registerClass("Mscrm.AlwaysEnabledCommandHandler",CUI.Page.PageComponent);CUI.DataSource.registerClass("CUI.DataSource",null,Sys.IDisposable);Mscrm.CrmDataSource.registerClass("Mscrm.CrmDataSource",CUI.DataSource);Mscrm.DynamicMenuCommandHandler.registerClass("Mscrm.DynamicMenuCommandHandler",Mscrm.CommandHandler);Mscrm.RibbonData.registerClass("Mscrm.RibbonData",Mscrm.CrmUIComponent);Mscrm.RibbonHeaderScaling.registerClass("Mscrm.RibbonHeaderScaling");Mscrm.RibbonManager.registerClass("Mscrm.RibbonManager",Mscrm.CrmUIControl);Mscrm.RibbonNavigationModel.registerClass("Mscrm.RibbonNavigationModel");CUI.QueryRecord.registerClass("CUI.QueryRecord");CUI.DeclarativeTemplateBuildContext.registerClass("CUI.DeclarativeTemplateBuildContext");CUI.CommandInformation.registerClass("CUI.CommandInformation");CUI.DisabledCommandInfoProperties.registerClass("CUI.DisabledCommandInfoProperties");CUI.BuildOptions.registerClass("CUI.BuildOptions");CUI.BuildContext.registerClass("CUI.BuildContext");CUI.DataNodeWrapper.registerClass("CUI.DataNodeWrapper");CUI.Builder.registerClass("CUI.Builder",null,Sys.IDisposable);CUI.CommandEventArgs.registerClass("CUI.CommandEventArgs",Sys.EventArgs);CUI.Component.registerClass("CUI.Component",null,CUI.IMenuItem,Sys.IDisposable);CUI.Menu.registerClass("CUI.Menu",CUI.Component);CUI.ContextMenu.registerClass("CUI.ContextMenu",CUI.Menu);CUI.ContextMenuDock.registerClass("CUI.ContextMenuDock",CUI.Component);CUI.Control.registerClass("CUI.Control",null,Sys.IDisposable,CUI.IMenuItem);CUI.MenuLauncher.registerClass("CUI.MenuLauncher",CUI.Control,CUI.IModalController);CUI.ContextMenuLauncher.registerClass("CUI.ContextMenuLauncher",CUI.MenuLauncher);CUI.RootProperties.registerClass("CUI.RootProperties");CUI.ContextMenuRootProperties.registerClass("CUI.ContextMenuRootProperties",CUI.RootProperties);CUI.Root.registerClass("CUI.Root",CUI.Component,Sys.IDisposable);CUI.ContextMenuRoot.registerClass("CUI.ContextMenuRoot",CUI.Root);CUI.ControlProperties.registerClass("CUI.ControlProperties");CUI.ControlComponent.registerClass("CUI.ControlComponent",CUI.Component);CUI.DataQueryResult.registerClass("CUI.DataQueryResult");CUI.DataQuery.registerClass("CUI.DataQuery");CUI.Gallery.registerClass("CUI.Gallery",CUI.Component);CUI.Jewel.registerClass("CUI.Jewel",CUI.Root);CUI.JewelBuildContext.registerClass("CUI.JewelBuildContext",CUI.BuildContext);CUI.JewelBuildOptions.registerClass("CUI.JewelBuildOptions",CUI.BuildOptions);CUI.JewelBuilder.registerClass("CUI.JewelBuilder",CUI.Builder);CUI.MenuItem.registerClass("CUI.MenuItem",CUI.ControlComponent);CUI.MenuLauncherControlProperties.registerClass("CUI.MenuLauncherControlProperties",CUI.ControlProperties);CUI.BrowserUtility.registerClass("CUI.BrowserUtility");CUI.MenuSection.registerClass("CUI.MenuSection",CUI.Component);CUI.QAT.registerClass("CUI.QAT",CUI.Root);CUI.QATBuildContext.registerClass("CUI.QATBuildContext",CUI.BuildContext);CUI.QATBuildOptions.registerClass("CUI.QATBuildOptions",CUI.BuildOptions);CUI.QATBuilder.registerClass("CUI.QATBuilder",CUI.Builder);CUI.RibbonPeripheralSection.registerClass("CUI.RibbonPeripheralSection");CUI.ContextualGroup.registerClass("CUI.ContextualGroup",null,Sys.IDisposable);CUI.Template.registerClass("CUI.Template");CUI.DeclarativeTemplate.registerClass("CUI.DeclarativeTemplate",CUI.Template);CUI.RibbonComponent.registerClass("CUI.RibbonComponent",CUI.Component);CUI.Group.registerClass("CUI.Group",CUI.RibbonComponent);CUI.GroupPopup.registerClass("CUI.GroupPopup",CUI.Component);CUI.Layout.registerClass("CUI.Layout",CUI.RibbonComponent);CUI.GroupPopupLayout.registerClass("CUI.GroupPopupLayout",CUI.Layout);CUI.RootEventCommandProperties.registerClass("CUI.RootEventCommandProperties");CUI.RibbonEventCommandProperties.registerClass("CUI.RibbonEventCommandProperties",CUI.RootEventCommandProperties);CUI.CommandContextSwitchCommandProperties.registerClass("CUI.CommandContextSwitchCommandProperties");CUI.Ribbon.registerClass("CUI.Ribbon",CUI.Root);CUI.RibbonCommand.registerClass("CUI.RibbonCommand");CUI.RibbonBuildContext.registerClass("CUI.RibbonBuildContext",CUI.BuildContext);CUI.RibbonBuildOptions.registerClass("CUI.RibbonBuildOptions",CUI.BuildOptions);CUI.RibbonBuilder.registerClass("CUI.RibbonBuilder",CUI.Builder);CUI.Row.registerClass("CUI.Row",CUI.Component);CUI.ScalingStep.registerClass("CUI.ScalingStep");CUI.Scaling.registerClass("CUI.Scaling");CUI.Section.registerClass("CUI.Section",CUI.RibbonComponent);CUI.Strip.registerClass("CUI.Strip",CUI.RibbonComponent);CUI.Tab.registerClass("CUI.Tab",CUI.RibbonComponent);CUI.TemplateManager.registerClass("CUI.TemplateManager");CUI.RootUser.registerClass("CUI.RootUser");CUI.ButtonDock.registerClass("CUI.ButtonDock",CUI.Component);CUI.Toolbar.registerClass("CUI.Toolbar",CUI.Root);CUI.ToolbarBuildContext.registerClass("CUI.ToolbarBuildContext",CUI.BuildContext);CUI.ToolbarBuildOptions.registerClass("CUI.ToolbarBuildOptions",CUI.BuildOptions);CUI.ToolbarBuilder.registerClass("CUI.ToolbarBuilder",CUI.Builder);CUI.ToolTip.registerClass("CUI.ToolTip",CUI.Component);CUI.Unit.registerClass("CUI.Unit");CUI.Utility.registerClass("CUI.Utility");CUI.ScriptUtility.registerClass("CUI.ScriptUtility");CUI.UIUtility.registerClass("CUI.UIUtility");CUI.ListNode.registerClass("CUI.ListNode");CUI.List.registerClass("CUI.List",null,IEnumerable);CUI.ListEnumerator.registerClass("CUI.ListEnumerator",null,IEnumerator);CUI.JsonXmlElement.registerClass("CUI.JsonXmlElement");CUI.Controls.ColorStyle.registerClass("CUI.Controls.ColorStyle");CUI.Controls.ColorPickerResult.registerClass("CUI.Controls.ColorPickerResult");CUI.Controls.ContextMenuControlProperties.registerClass("CUI.Controls.ContextMenuControlProperties",CUI.MenuLauncherControlProperties);CUI.Controls.ContextMenuControl.registerClass("CUI.Controls.ContextMenuControl",CUI.ContextMenuLauncher);CUI.Controls.Button.registerClass("CUI.Controls.Button",CUI.Control,CUI.IMenuItem,CUI.ISelectableControl);CUI.Controls.CheckBoxCommandProperties.registerClass("CUI.Controls.CheckBoxCommandProperties");CUI.Controls.ToggleButton.registerClass("CUI.Controls.ToggleButton",CUI.Control,CUI.IMenuItem,CUI.ISelectableControl);CUI.Controls.CheckBox.registerClass("CUI.Controls.CheckBox",CUI.Controls.ToggleButton);CUI.Controls.ColorPickerCommandProperties.registerClass("CUI.Controls.ColorPickerCommandProperties");CUI.Controls.ColorPicker.registerClass("CUI.Controls.ColorPicker",CUI.Control,CUI.IMenuItem);CUI.Controls.ComboBoxCommandProperties.registerClass("CUI.Controls.ComboBoxCommandProperties");CUI.Controls.DropDown.registerClass("CUI.Controls.DropDown",CUI.MenuLauncher);CUI.Controls.ComboBox.registerClass("CUI.Controls.ComboBox",CUI.Controls.DropDown);CUI.Controls.DropDownCommandProperties.registerClass("CUI.Controls.DropDownCommandProperties");CUI.Controls.FlyoutAnchor.registerClass("CUI.Controls.FlyoutAnchor",CUI.MenuLauncher);CUI.Controls.GalleryButtonCommandProperties.registerClass("CUI.Controls.GalleryButtonCommandProperties");CUI.Controls.GalleryButton.registerClass("CUI.Controls.GalleryButton",CUI.Control,CUI.ISelectableControl);CUI.Controls.InsertTableCommandProperties.registerClass("CUI.Controls.InsertTableCommandProperties");CUI.Controls.InsertTable.registerClass("CUI.Controls.InsertTable",CUI.Control);CUI.Controls.LabelCommandProperties.registerClass("CUI.Controls.LabelCommandProperties");CUI.Controls.Label.registerClass("CUI.Controls.Label",CUI.Control);CUI.Controls.MRUSplitButton.registerClass("CUI.Controls.MRUSplitButton",CUI.Controls.DropDown);CUI.Controls.Separator.registerClass("CUI.Controls.Separator",CUI.Control);CUI.Controls.SpinnerCommandProperties.registerClass("CUI.Controls.SpinnerCommandProperties");CUI.Controls.Spinner.registerClass("CUI.Controls.Spinner",CUI.Control);CUI.Controls.SplitButton.registerClass("CUI.Controls.SplitButton",CUI.MenuLauncher);CUI.Controls.TextBoxCommandProperties.registerClass("CUI.Controls.TextBoxCommandProperties");CUI.Controls.TextBox.registerClass("CUI.Controls.TextBox",CUI.Control);CUI.Controls.ToggleButtonCommandProperties.registerClass("CUI.Controls.ToggleButtonCommandProperties");CUI.Controls.JewelMenuLauncher.registerClass("CUI.Controls.JewelMenuLauncher",CUI.MenuLauncher);CUI.Page.CommandDispatcher.registerClass("CUI.Page.CommandDispatcher");CUI.Page.FocusManager.registerClass("CUI.Page.FocusManager",CUI.Page.CommandDispatcher,CUI.Page.ICommandHandler);CUI.Page.PageManager.registerClass("CUI.Page.PageManager",CUI.RootUser,CUI.Page.ICommandHandler,CUI.IRootBuildClient);CUI.Page.UndoManager.registerClass("CUI.Page.UndoManager",null,CUI.Page.ICommandHandler);Commands.CommandIds.registerClass("Commands.CommandIds");Commands.GlobalRedoProperties.registerClass("Commands.GlobalRedoProperties");Commands.RedoProperties.registerClass("Commands.RedoProperties");Commands.GlobalUndoProperties.registerClass("Commands.GlobalUndoProperties");Commands.UndoProperties.registerClass("Commands.UndoProperties");Mscrm.RibbonHeaderScaling.$B2=["ms-cui-tts","ms-cui-tts-scale-1","ms-cui-tts-scale-2","ms-cui-tts-scale-2"];Mscrm.RibbonManager.$9M=0;Mscrm.RibbonManager.$5h=null;Mscrm.RibbonManager.$4h=false;Mscrm.RibbonNavigationModel.$9L=new RegExp("Mscrm\\.SubGrid\\.[^.]+\\.ContextualTabs");Mscrm.RibbonNavigationModel.$7b=new RegExp("^[^|]+\\|[^|]+\\|"+Mscrm.RibbonContexts.subGridStandard+"\\|Mscrm\\.SubGrid\\.[^.]+\\.ContextualTabs$");Mscrm.RibbonNavigationModel.$5s=new RegExp("^[^|]+\\|[^|]+\\|"+Mscrm.RibbonContexts.subGridAssociated+"\\|Mscrm\\.SubGrid\\.[^.]+\\.ContextualTabs$");CUI.DataNodeWrapper.ATTRIBUTES="attrs";CUI.DataNodeWrapper.CHILDREN="children";CUI.DataNodeWrapper.NAME="name";CUI.DataNodeWrapper.ALIGNMENT="Alignment";CUI.DataNodeWrapper.ALT="Alt";CUI.DataNodeWrapper.CLASSNAME="Classname";CUI.DataNodeWrapper.COLOR="Color";CUI.DataNodeWrapper.COMMAND="Command";CUI.DataNodeWrapper.CONTEXTUALGROUPID="ContextualGroupId";CUI.DataNodeWrapper.CSSCLASS="CssClass";CUI.DataNodeWrapper.DARKBLUE="DarkBlue";CUI.DataNodeWrapper.DECIMALDIGITS="DecimalDigits";CUI.DataNodeWrapper.DESCRIPTION="Description";CUI.DataNodeWrapper.DISPLAYCOLOR="DisplayColor";CUI.DataNodeWrapper.DISPLAYMODE="DisplayMode";CUI.DataNodeWrapper.DIVIDER="Divider";CUI.DataNodeWrapper.ELEMENTDIMENSIONS="ElementDimensions";CUI.DataNodeWrapper.GREEN="Green";CUI.DataNodeWrapper.GROUPID="GroupId";CUI.DataNodeWrapper.id="Id";CUI.DataNodeWrapper.INDEX="Index";CUI.DataNodeWrapper.INTERVAL="Interval";CUI.DataNodeWrapper.LABELTEXT="LabelText";CUI.DataNodeWrapper.LAYOUTTITLE="LayoutTitle";CUI.DataNodeWrapper.LIGHTBLUE="LightBlue";CUI.DataNodeWrapper.LOWSCALEWARNING="LowScaleWarning";CUI.DataNodeWrapper.MAGENTA="Magenta";CUI.DataNodeWrapper.MAXHEIGHT="MaxHeight";CUI.DataNodeWrapper.MAXIMUMVALUE="MaximumValue";CUI.DataNodeWrapper.MAXWIDTH="MaxWidth";CUI.DataNodeWrapper.MENUITEMID="MenuItemId";CUI.DataNodeWrapper.MESSAGE="Message";CUI.DataNodeWrapper.MINIMUMVALUE="MinimumValue";CUI.DataNodeWrapper.namE_CAPS="Name";CUI.DataNodeWrapper.ONEROW="OneRow";CUI.DataNodeWrapper.ORANGE="Orange";CUI.DataNodeWrapper.POPUP="Popup";CUI.DataNodeWrapper.POPUPSIZE="PopupSize";CUI.DataNodeWrapper.PURPLE="Purple";CUI.DataNodeWrapper.SCROLLABLE="Scrollable";CUI.DataNodeWrapper.SEQUENCE="Sequence";CUI.DataNodeWrapper.SIZE="Size";CUI.DataNodeWrapper.STYLE="Style";CUI.DataNodeWrapper.TEAL="Teal";CUI.DataNodeWrapper.TEMPLATEALIAS="TemplateAlias";CUI.DataNodeWrapper.THREEROW="ThreeRow";CUI.DataNodeWrapper.TITLE="Title";CUI.DataNodeWrapper.TWOROW="TwoRow";CUI.DataNodeWrapper.TYPE="Type";CUI.DataNodeWrapper.VALUE="Value";CUI.DataNodeWrapper.YELLOW="Yellow";CUI.DataNodeWrapper.RIBBON="Ribbon";CUI.DataNodeWrapper.QAT="QAT";CUI.DataNodeWrapper.JEWEL="Jewel";CUI.DataNodeWrapper.TABS="Tabs";CUI.DataNodeWrapper.CONTEXTUALTABS="ContextualTabs";CUI.DataNodeWrapper.CONTEXTUALGROUP="ContextualGroup";CUI.DataNodeWrapper.TAB="Tab";CUI.DataNodeWrapper.SCALING="Scaling";CUI.DataNodeWrapper.MAXSIZE="MaxSize";CUI.DataNodeWrapper.SCALE="Scale";CUI.DataNodeWrapper.GROUP="Group";CUI.DataNodeWrapper.GROUPS="Groups";CUI.DataNodeWrapper.LAYOUT="Layout";CUI.DataNodeWrapper.SECTION="Section";CUI.DataNodeWrapper.OVERFLOWSECTION="OverflowSection";CUI.DataNodeWrapper.ROW="Row";CUI.DataNodeWrapper.CONTROL="ControlRef";CUI.DataNodeWrapper.OVERFLOWAREA="OverflowArea";CUI.DataNodeWrapper.STRIP="Strip";CUI.DataNodeWrapper.CONTROLS="Controls";CUI.DataNodeWrapper.MENU="Menu";CUI.DataNodeWrapper.MENUSECTION="MenuSection";CUI.DataNodeWrapper.TEMPLATE="Template";CUI.DataNodeWrapper.TEMPLATES="Templates";CUI.DataNodeWrapper.RIBBONTEMPLATES="RibbonTemplates";CUI.DataNodeWrapper.GROUPTEMPLATE="GroupTemplate";CUI.DataNodeWrapper.GALLERY="Gallery";CUI.DataNodeWrapper.colors="Colors";CUI.DataNodeWrapper.color="Color";CUI.DataNodeWrapper.toggleButton="ToggleButton";CUI.DataNodeWrapper.comboBox="ComboBox";CUI.DataNodeWrapper.dropDown="DropDown";CUI.DataNodeWrapper.button="Button";CUI.DataNodeWrapper.splitButton="SplitButton";CUI.DataNodeWrapper.flyoutAnchor="FlyoutAnchor";CUI.DataNodeWrapper.galleryButton="GalleryButton";CUI.DataNodeWrapper.insertTable="InsertTable";CUI.DataNodeWrapper.label="Label";CUI.DataNodeWrapper.mruSplitButton="MRUSplitButton";CUI.DataNodeWrapper.spinner="Spinner";CUI.DataNodeWrapper.textBox="TextBox";CUI.DataNodeWrapper.checkBox="CheckBox";CUI.DataNodeWrapper.colorPicker="ColorPicker";CUI.DataNodeWrapper.separator="Separator";CUI.DataNodeWrapper.jewelMenuLauncher="JewelMenuLauncher";CUI.DataNodeWrapper.BUTTONDOCK="ButtonDock";CUI.DataNodeWrapper.BUTTONDOCKS="ButtonDocks";CUI.DataNodeWrapper.CENTERALIGN="Center";CUI.DataNodeWrapper.LEFTALIGN="Left";CUI.DataNodeWrapper.RIGHTALIGN="Right";CUI.DataNodeWrapper.TOOLBAR="Toolbar";CUI.DataNodeWrapper.LARGE="Large";CUI.DataNodeWrapper.MEDIUM="Medium";CUI.DataNodeWrapper.SMALL="Small";CUI.DataNodeWrapper.DIVIDERAFTER="DividerAfter";CUI.DataNodeWrapper.DIVIDERBEFORE="DividerBefore";CUI.DataNodeWrapper.$6H=null;CUI.RibbonPeripheralSection.tabRowLeft="TabRowLeft";CUI.RibbonPeripheralSection.tabRowRight="TabRowRight";CUI.RibbonPeripheralSection.qatRowCenter="QATRowCenter";CUI.RibbonPeripheralSection.qatRowRight="QATRowRight";CUI.TemplateManager.$5X=null;CUI.Unit.$8E=-1;CUI.Utility.$AU=["","ms-cui-img-5by3","ms-cui-img-13by13","ms-cui-img-16by16","ms-cui-img-32by32","ms-cui-img-48by48","ms-cui-img-64by48","ms-cui-img-72by96","ms-cui-img-96by72","ms-cui-img-96by96","ms-cui-img-56by24","ms-cui-img-2by16"];CUI.Utility.$A6=["","Size16by16","Size32by32","Size48by48","Size64by48","Size72by96","Size96by72","Size96by96","Size128by128","Size190by30","Size190by40","Size190by50","Size190by60"];CUI.Utility.$AS=[0,0,0,0,0,0,0,0,0,0,7,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,1,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,5,0];CUI.Utility.$1A=["","&quot;","&amp;","&#39;","&lt;","&gt;"," ","<br>","&nbsp;","<b>","<i>","<p>","<u>","</b>","</i>","</p>","</u>"];CUI.Utility.$BZ=false;CUI.Utility.$BY=false;CUI.Utility.$6v=false;CUI.Utility.$6t=false;CUI.Utility.$6w=false;CUI.Utility.$6p=false;CUI.Utility.$6x=false;CUI.Utility.$6q=false;CUI.Utility.$3k=0;CUI.Utility.$6n=false;CUI.Utility.$5W=0;CUI.Utility.$6m=false;CUI.Utility.$6r=false;CUI.Utility.$6s=false;CUI.Utility.$5l=null;CUI.ScriptUtility.emptyString="";CUI.Controls.CheckBoxCommandProperties.On="On";CUI.Controls.CheckBoxCommandProperties.CommandValueId="CommandValueId";CUI.Controls.ColorPickerCommandProperties.Color="Color";CUI.Controls.ColorPickerCommandProperties.Style="Style";CUI.Controls.ColorPicker.$7=-10;CUI.Controls.ComboBoxCommandProperties.SelectedItemId="SelectedItemId";CUI.Controls.ComboBoxCommandProperties.IsFreeForm="IsFreeForm";CUI.Controls.ComboBoxCommandProperties.Value="Value";CUI.Controls.DropDownCommandProperties.SelectedItemId="SelectedItemId";CUI.Controls.DropDownCommandProperties.Value="Value";CUI.Controls.GalleryButtonCommandProperties.On="On";CUI.Controls.GalleryButtonCommandProperties.CommandValueId="CommandValueId";CUI.Controls.InsertTableCommandProperties.Rows="Rows";CUI.Controls.InsertTableCommandProperties.Columns="Columns";CUI.Controls.LabelCommandProperties.Value="Value";CUI.Controls.SpinnerCommandProperties.ChangedByMouse="ChangedByMouse";CUI.Controls.SpinnerCommandProperties.ChangeType="ChangeType";CUI.Controls.SpinnerCommandProperties.Value="Value";CUI.Controls.SpinnerCommandProperties.Unit="Unit";CUI.Controls.Spinner.$7p=-1;CUI.Controls.TextBoxCommandProperties.Value="Value";CUI.Controls.ToggleButtonCommandProperties.On="On";CUI.Controls.ToggleButtonCommandProperties.CommandValueId="CommandValueId";CUI.Page.PageManager._instance=null;CUI.Page.UndoManager.$2B=-1;Commands.CommandIds.ApplicationStateChanged="appstatechanged";Commands.CommandIds.GlobalRedo="GlobalRedo";Commands.CommandIds.Redo="Redo";Commands.CommandIds.GlobalUndo="GlobalUndo";Commands.CommandIds.Undo="Undo";Commands.GlobalRedoProperties.SequenceNumber="SequenceNumber";Commands.RedoProperties.SequenceNumber="SequenceNumber";Commands.GlobalUndoProperties.SequenceNumber="SequenceNumber";Commands.UndoProperties.SequenceNumber="SequenceNumber";var g_cuiXMLDOMDocument=null,g_cuiXMLParser=null;CUI.NativeUtility=function(){};CUI.NativeUtility.createXMLDocFromString=function(xml){return CUI.NativeUtility.createXMLDocFromStringCore(xml,false)};CUI.NativeUtility.createXMLDocFromStringCore=function(xml,newObj){if(window.ActiveXObject){var msxmlDomDoc=newObj?null:g_cuiXMLDOMDocument;if(!msxmlDomDoc)try{msxmlDomDoc=new ActiveXObject("MSXML.DomDocument");if(!newObj)g_cuiXMLDOMDocument=msxmlDomDoc}catch(e){}msxmlDomDoc!=null&&msxmlDomDoc.loadXML(xml);return msxmlDomDoc}else if(DOMParser){var domParser=newObj?null:g_cuiXMLParser;if(!domParser){domParser=new DOMParser;if(!newObj)g_cuiXMLParser=domParser}return domParser.parseFromString(xml,"text/xml")}else if(window.XMLHttpRequest){var request=new XMLHttpRequest;request.open("GET","data:text/xml;charset=utf-8,"+xml,false);request.send(null);return request.responseXML()}return null};typeof Sys!="undefined"&&Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded();CUI.NativeUtility.setInnerText=function(elem,text){var doc=elem.ownerDocument;if(doc.createTextNode){var textNode=doc.createTextNode(text);elem.innerHTML="";elem.appendChild(textNode)}else elem.innerText=text};CUI.NativeUtility.ecmaScriptStringLiteralEncode=function(str){if(null==str||typeof str=="undefined")return "";for(var strIn=new String(str),strOut=[],ix=0,max=strIn.length,ix=0;ix<max;ix++){var charCode=strIn.charCodeAt(ix);if(charCode>4095)strOut.push("\\u"+charCode.toString(16).toUpperCase());else if(charCode>255)strOut.push("\\u0"+charCode.toString(16).toUpperCase());else if(charCode>127)strOut.push("\\u00"+charCode.toString(16).toUpperCase());else{var c=strIn.charAt(ix);switch(c){case "\n":strOut.push("\\n");break;case "\r":strOut.push("\\r");break;case '"':strOut.push("\\u0022");break;case "%":strOut.push("\\u0025");break;case "&":strOut.push("\\u0026");break;case "'":strOut.push("\\u0027");break;case "(":strOut.push("\\u0028");break;case ")":strOut.push("\\u0029");break;case "+":strOut.push("\\u002b");break;case "/":strOut.push("\\u002f");break;case "<":strOut.push("\\u003c");break;case ">":strOut.push("\\u003e");break;case "\\":strOut.push("\\\\");break;default:strOut.push(c)}}}return strOut.join("")};CUI.NativeUtility.ffClick=function(elm){var evt=document.createEvent("MouseEvents");evt.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null);elm.dispatchEvent(evt)};CUI.NativeUtility.getAttribute=function(attributes,index){return attributes[index]};CUI.NativeUtility.returnFalse=function(){return false};var g_records=[];CUI.PMetrics=function(){};CUI.PMetrics.perfMark=function(marker){var r={};r.m=marker;r.mt=new Date;if(g_records){if(g_records.length==1e3)g_records=[];g_records.push(r)}};CUI.PMetrics.perfReport=function(){if(!g_records)return;var l=g_records.length;if(l>0){var _elmResults=document.getElementById("perf-markers");if(!_elmResults){_elmResults=document.createElement("div");_elmResults.id="perf-markers";_elmResults.style.display="none"}var r,rstr="";for(i=0;i<l;i++){r=g_records[i];if(r)rstr+="<p><span class='time'>"+r.mt.format("MM/dd/yyyy HH:mm:ss.fffffff")+"</span><span class='marker'>"+r.m+"</span><var class='milliseconds'>"+r.mt.getTime()+"</var></p>"}_elmResults.innerHTML+=rstr;document.body.appendChild(_elmResults);g_records=[]}};CUI.PMetrics.perfClear=function(){g_records=[]};typeof Sys!="undefined"&&Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded();typeof NotifyScriptLoadedAndExecuteWaitingJobs!="undefined"&&NotifyScriptLoadedAndExecuteWaitingJobs("CUI.js")

Open in new window

0
 
LVL 1

Author Comment

by:apollo7
ID: 41742783
If I inspect this with IE, F12 I get the following under Console

viewCodeSnippet.jsp?codeSnippetId=20-41742773-1:19 Uncaught TypeError: Cannot read property 'addEventListener' of null
0
 
LVL 1

Author Comment

by:apollo7
ID: 41743155
Here is where I am at:

I looked at the SDK example and used it to create the following to populate the Freight Terms lookup on the Quote form with Lookup value of 'Collect'.  I used SSMS to get the guid

function populate() {
    function FreightTermsLookupValue(LookupId, Type, Id, Name) {
        setFreightTermsLookupValue("csc_lookupitemid", "quote", "{16F711C2-5C9C-E411-8DC3-005056897092}", "Collect");
    }
}

Open in new window


It doesn't populate the Freight Terms with the "Collect" value.

Can you see what I am doing wrong?

Thanks
0
 
LVL 1

Author Comment

by:apollo7
ID: 41743236
I ran these two SQL queries to get the values so I can populate the Freight Term lookup field with the value of 'Collect'

SELECT [createdby]
      ,[csc_lookup]
      ,[csc_lookupitemid]
      ,[csc_lookupname]
      ,[csc_name]      
  FROM [CobhamWiPro_MSCRM].[dbo].[Filteredcsc_lookupitem]
  where csc_lookupname like 'Freight Term'
  --where csc_name like 'Collect'

Open in new window


createdby                                                                 csc_lookup                                                              csc_lookupitemid                                          csc_lookupname    csc_name
3A4E706A-179C-E411-8DC3-005056897092      15F711C2-5C9C-E411-8DC3-005056897092      16F711C2-5C9C-E411-8DC3-005056897092      Freight Term      Collect
3A4E706A-179C-E411-8DC3-005056897092      15F711C2-5C9C-E411-8DC3-005056897092      17F711C2-5C9C-E411-8DC3-005056897092      Freight Term      Prepay & Add with cost conversion
3A4E706A-179C-E411-8DC3-005056897092      15F711C2-5C9C-E411-8DC3-005056897092      18F711C2-5C9C-E411-8DC3-005056897092      Freight Term      Prepay & Add
3A4E706A-179C-E411-8DC3-005056897092      15F711C2-5C9C-E411-8DC3-005056897092      19F711C2-5C9C-E411-8DC3-005056897092      Freight Term      Prepaid
3A4E706A-179C-E411-8DC3-005056897092      15F711C2-5C9C-E411-8DC3-005056897092      1AF711C2-5C9C-E411-8DC3-005056897092      Freight Term      To Be Determined
3A4E706A-179C-E411-8DC3-005056897092      15F711C2-5C9C-E411-8DC3-005056897092      1BF711C2-5C9C-E411-8DC3-005056897092      Freight Term      Third Party Billing

/****** Script for Lookup from SSMS  ******/
SELECT [csc_lookupid]
      ,[csc_name]
      FROM [CobhamWiPro_MSCRM].[dbo].[Filteredcsc_lookup]

Open in new window


csc_lookupid                                                            csc_name
DFDF3F46-209C-E411-8DC3-005056897092      Project Billing Event Type
15F711C2-5C9C-E411-8DC3-005056897092      Freight Term
1CF711C2-5C9C-E411-8DC3-005056897092      Shipment Priority
1FF711C2-5C9C-E411-8DC3-005056897092      Shipping Method
FBA36839-5E9C-E411-8DC3-005056897092      Warranty Type
FEA36839-5E9C-E411-8DC3-005056897092      Inco Term
6705AD3F-5E9C-E411-8DC3-005056897092      Order Reason
99460F9B-7BA5-E411-B608-005056897092      Jurisdiction
A2460F9B-7BA5-E411-B608-005056897092      Export Code
596245A1-7BA5-E411-B608-005056897092      Protectively Marked
606245A1-7BA5-E411-B608-005056897092      Product Contract Type
0
 
LVL 1

Author Comment

by:apollo7
ID: 41743268
In the first query of the csc_lookupitem filteredview columns
csc_lookup  csc_lookupitemid  csc_lookupname   csc_name
the first row of values shows the Freight Term 'Collect'

15F711C2-5C9C-E411-8DC3-005056897092      16F711C2-5C9C-E411-8DC3-005056897092      Freight Term      Collect

From there it looks like I need to get csc_name 'Collect' from csc_lookupname 'Freight Term' in the csc_lookup filteredview
0
 
LVL 1

Author Comment

by:apollo7
ID: 41744259
I am trying to use the SDK - setSimpleLookupValue helper function that sets the value for simple lookup attributes.

I have the guids, Lookupid, Type and name (above) but dont think they are in the right order.

I am trying to populate Freight Terms with  "Collect"

Advice?

function populate() {
    function FreightTermsLookupValue(LookupId, Type, Id, Name) {
        setFreightTermsLookupValue("16F711C2-5C9C-E411-8DC3-005056897092", "quote", "{16F711C2-5C9C-E411-8DC3-005056897092}", "Collect");
    }
}

Open in new window



Example from SDK:
function setSimpleLookupValue(LookupId, Type, Id, Name) {
   /// <summary>
   /// Sets the value for lookup attributes that accept only a single entity reference.
   /// Use of this function to set lookups that allow for multiple references,
   /// a.k.a 'partylist' lookups, will remove any other existing references and
   /// replace it with just the single reference specified.
   /// </summary>
   /// <param name="LookupId" type="String" mayBeNull="false" optional="false" >
   /// The lookup attribute logical name
   /// </param>
   /// <param name="Type" type="String" mayBeNull="false" optional="false" >
   /// The logical name of the entity being set.
   /// </param>
   /// <param name="Id" type="String" mayBeNull="false" optional="false" >
   /// A string representation of the GUID value for the record being set.
   /// The expected format is "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}".
   /// </param>
   /// <param name="Name" type="String" mayBeNull="false" optional="false" >
   /// The text to be displayed in the lookup.
   /// </param>
   var lookupReference = [];
   lookupReference[0] = {};
   lookupReference[0].id = Id;
   lookupReference[0].entityType = Type;
   lookupReference[0].name = Name;
   Xrm.Page.getAttribute(LookupId).setValue(lookupReference);
  }
The following is an example using the setSimpleLookupValue function to set the primarycontactid attribute value on an account form:
JavaScript
setSimpleLookupValue("primarycontactid", "contact", "{6D9D4FCF-F4D3-E011-9D26-00155DBA3819}", "Brian Lamee");
0
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 41744288
Let me simplify-

setSimpleLookupValue(<lookup field logical name>, <entity logical name>, id, Name)
0
 
LVL 1

Author Comment

by:apollo7
ID: 41744301
Thanks, but I am trying to add values that are shown in the SDK and it is not working
SDK example
setSimpleLookupValue("primarycontactid", "contact", "{6D9D4FCF-F4D3-E011-9D26-00155DBA3819}", "Brian Lamee");

Open in new window

My function
setSimpleLookupValue("16F711C2-5C9C-E411-8DC3-005056897092", "quote", "{16F711C2-5C9C-E411-8DC3-005056897092}", "Collect");

Open in new window

I copied all the values from the FilteredViews csc_lookupitem and csc_lookup (listed above) but cant seem to get the right combination.

Thanks
0
 
LVL 19

Accepted Solution

by:
Rikin Shah earned 500 total points
ID: 41744346
Try this-
setSimpleLookupValue("csc_freightterm", "csc_freightterm", "{16F711C2-5C9C-E411-8DC3-005056897092}", "Collect");

Open in new window

0
 
LVL 1

Author Comment

by:apollo7
ID: 41752710
Thanks, I am still working on this, just had an emergency issue that took priority.  Back on this now
0
 
LVL 1

Author Comment

by:apollo7
ID: 41753048
Getting the error below, I searched the internet and did not help.

Unable to get property '0' of undefined or null reference

Any help would be appreciated.

The error appears when I click the button and get to line 38
0
 
LVL 1

Author Closing Comment

by:apollo7
ID: 41754201
Rikin, thanks for the massive amount of help and basically writing the set lookup function for me.  This is very helpful because I have other lookups that also need to be populated by this button so I am hoping I can you use your solution as a template for these.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now