<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<!--Template for a Background frame-->

    <Frame name="DugisPreloader" hidden="true" virtual="true">
        <Frames>
            <Frame setAllPoints="true" parentKey="TexWrapper" visible="false">
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture parentKey="Background">
                            <Anchors>
                                <Anchor point="LEFT" relativeTo="$parent">
                                    <Offset>
                                        <AbsDimension x="0" y="0"/>
                                    </Offset>
                                </Anchor>
                                <Anchor point="RIGHT" relativeTo="$parent">
                                    <Offset>
                                        <AbsDimension x="0" y="0"/>
                                    </Offset>
                                </Anchor>
                                <Anchor point="TOP" relativeTo="$parent">
                                    <Offset>
                                        <AbsDimension x="0" y="0"/>
                                    </Offset>
                                </Anchor>
                                <Anchor point="BOTTOM" relativeTo="$parent">
                                    <Offset>
                                        <AbsDimension x="0" y="0"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                            <Color a="0.9" />
                        </Texture>
                    </Layer>
                    <Layer level="ARTWORK">
                        <FontString parentKey="Text" wordwrap="false" wraponspaces="true"  inherits="GameFontNormal" justifyH="LEFT"  visible="false" text="Preparing 2%..">
                            <Size x="159" y="40"/>
                            <Anchors>
                                <Anchor point="TOPLEFT" x="5" y="-2"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <Frame  parentKey="Icon"  visible="false">
                <Anchors>
                   <Anchor point="TOPRIGHT" relativeTo="$parent">
                        <Offset>
                            <AbsDimension x="0" y="0"/>
                        </Offset>
                    </Anchor>
               </Anchors>
                <Size x="45" y="45"/>
                <Frames>
                    <Frame  parentKey="Frame"  setAllPoints="true" >
                        <Layers>
                            <Layer level="BACKGROUND">
                                <Texture file="Interface\COMMON\StreamBackground" parentKey="Background" setAllPoints="true" />
                            </Layer>
                            <Layer level="ARTWORK">
                                <Texture file="Interface\COMMON\StreamFrame" parentKey="Alpha" setAllPoints="true" />
                            </Layer>
                        </Layers>
                    </Frame>
                    <Frame   parentKey="Spin"  setAllPoints="true" >
                        <Layers>
                            <Layer level="BACKGROUND">
                                <Texture file="Interface\COMMON\StreamCircle" parentKey="Spinner" setAllPoints="true" />
                            </Layer>
                            <Layer level="OVERLAY" >
                                <Texture file="Interface\COMMON\StreamSpark" setAllPoints="true" />
                            </Layer>
                        </Layers>
                    </Frame>
                </Frames>
                <Scripts>
                    <OnLoad>
                        self.Spin.Spinner:SetVertexColor(1,.82,0);
                        self.Frame.Background:SetVertexColor(1,0.82,0);
                    </OnLoad>
                </Scripts>
            </Frame>
        </Frames>
    </Frame>

	<Frame name ="DugisSmallFrameTemplate"  parent = "UIParent" movable="true" virtual="true">
			<Scripts>
				<OnMouseDown>
					if DugisGuideViewer.Modules.SmallFrame then
						DugisGuideViewer.Modules.SmallFrame:OnClick(self, button)
					end
				</OnMouseDown>
				<OnEnter>
					if DugisGuideViewer.Modules.SmallFrame then
						DugisGuideViewer.Modules.SmallFrame:OnEnter(self, event)
					end
                    if DugisGuideViewer.Modules.SmallFrame.mouseEnterCounter == nil then
                        DugisGuideViewer.Modules.SmallFrame.mouseEnterCounter = 1
                    end
                    if LuaUtils:isInTable(DugisGuideViewer.Modules.SmallFrame.mouseEnterCounter, {1, 2, 3, 4}) then
                        DugisGuideViewer:UpdateSmallFrame()
                        DugisGuideViewer.Modules.SmallFrame.mouseEnterCounter = DugisGuideViewer.Modules.SmallFrame.mouseEnterCounter + 1
                    end
				</OnEnter>
				<OnLeave>
					if DugisGuideViewer.Modules.SmallFrame then
						DugisGuideViewer.Modules.SmallFrame:OnLeave(self, event)
					end
				</OnLeave>
			</Scripts>
		<Layers>
			<Layer >
			<FontString name="$parentText" parentKey="Text" inherits="GameFontNormal"  justifyH="LEFT" text="">

					<Size>
					<!-- <AbsDimension x="75" y="14"/> -->
					<Size x="200" y="50"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo = "$parent">
							<Offset>
								<AbsDimension x="65" y="0"/>
							</Offset>
						</Anchor>
						<Anchor point="TOP" relativeTo = "$parent"/>
					</Anchors>
				</FontString>
				<FontString name="$parentDesc" parentKey="Desc" inherits="GameFontHighlightSmall" wraponspaces="true" wordwrap="true" justifyH="LEFT" frameLevel="10" enableMouse='false' justifyV="TOP" text="" visible ="false">
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
							<Offset>
								<AbsDimension x="16" y="0"/>
							</Offset>
						</Anchor>
						<Anchor point="TOP" relativeTo="$parentText" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="-8"/>
							</Offset>
						</Anchor>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-16" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentDescEventHandler" parentKey="DescEventHandler" frameLevel="11" inherits="GameFontHighlightSmall" wraponspaces="true" alpha="0"  wordwrap="true" justifyH="LEFT" justifyV="TOP" text="" visible ="true">
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
							<Offset>
								<AbsDimension x="16" y="0"/>
							</Offset>
						</Anchor>
						<Anchor point="TOP" relativeTo="$parentText" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="-8"/>
							</Offset>
						</Anchor>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-16" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name ="$parentIcon" parentKey="Icon">
				<Size x="22" y="22"/>
				<NormalTexture  setAllPoints ="true"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentText" relativePoint = "LEFT"/>
				</Anchors>
				 <Scripts>
					<OnEnter>
						DugisGuideViewer:Button_OnEnter(self)
					</OnEnter>
					<OnLeave>
						 GameTooltip:Hide();
					</OnLeave>
                    <OnMouseUp>
                        if DugisGuideViewer:UserSetting(DGV_SHOW_EXTRA_WAYPOINT_ICON) then return end
                        local texture = self:GetNormalTexture()
                        texture:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0)
                        texture:SetPoint("BOTTOMLEFT", self, "BOTTOMLEFT", 0, 0)
                    </OnMouseUp>
                    <OnMouseDown>
                        if DugisGuideViewer:UserSetting(DGV_SHOW_EXTRA_WAYPOINT_ICON) then return end
                        local texture = self:GetNormalTexture()
                        texture:SetPoint("TOPLEFT", self, "TOPLEFT", -1, -2)
                        texture:SetPoint("BOTTOMLEFT", self, "BOTTOMLEFT", -1, -2)
                    </OnMouseDown>
                    <OnClick>
                        if DugisGuideViewer:UserSetting(DGV_SHOW_EXTRA_WAYPOINT_ICON) then return end
                        DugisGuideViewer:WayPoint_OnClick(self:GetParent().Waypoint)
                    </OnClick>					
				</Scripts>
			</Button>
			<Button name ="$parentWayPoint" parentKey="Waypoint">
				<Size x="22" y="22"/>
				<NormalTexture file ="Interface\AddOns\DugisGuideViewerZ\Artwork\waypoint.tga"/>
				<Disabledtexture file="Interface\AddOns\DugisGuideViewerZ\Artwork\blank.tga"/>
				<HighlightTexture alphaMode ="ADD" file ="Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight"/>
				<pushedtexture file = "Interface\AddOns\DugisGuideViewerZ\Artwork\waypoint_pressed.tga"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentIcon" relativePoint = "LEFT">
					<Offset> <AbsDimension x="3" y="0"/> </Offset>
					</Anchor>
				</Anchors>
				<Scripts> <OnClick>
					DugisGuideViewer:WayPoint_OnClick(self)
				</OnClick></Scripts>
			</Button>
			<CheckButton name = "$parentChk" inherits ="UICheckButtonTemplate" parentKey="Chk" >
				<Size x="15" y="15"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentIcon" relativePoint="LEFT" >
						<Offset> <AbsDimension x="0" y="0"/> </Offset>
					</Anchor>
				</Anchors>
				<Scripts>
				<OnClick>
					if DugisGuideViewer.Modules.SmallFrame then
						DugisGuideViewer.Modules.SmallFrame:CheckButton_OnEvent(self, event)
					end
				</OnClick>
				</Scripts>
			</CheckButton>
            <SimpleHTML name="$parentHtmlText" inherits="" parentKey="HtmlText" >
            </SimpleHTML>
			<SimpleHTML name="$parentHtmlDesc" inherits="" parentKey="HtmlDesc" >
            </SimpleHTML>
			<Button name ="$parentModelButton" parentKey="ModelButton" visible ="true">
				<Size x="22" y="22"/>
				<NormalTexture file ="Interface\AddOns\DugisGuideViewerZ\Artwork\y_waypoint.tga"/>
				<Disabledtexture file="Interface\AddOns\DugisGuideViewerZ\Artwork\blank.tga"/>
				<HighlightTexture alphaMode ="ADD" file ="Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight"/>
				<pushedtexture file = "Interface\AddOns\DugisGuideViewerZ\Artwork\y_waypoint_pressed.tga"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="-9" y="0"/>
						</Offset>
					</Anchor>
					<Anchor point="TOP" relativeTo="$parentWayPoint"/>
				</Anchors>
				<Scripts>
				<OnClick> DugisGuideViewer.Modules.ModelViewer:ModelButton_OnClick(self, button, down); </OnClick>
					<OnEnter>
						GameTooltip:SetOwner( self, "ANCHOR_TOPLEFT")
						GameTooltip:AddLine("Show / Hide Model Viewer", 1, 1, 1, 1, true)
						GameTooltip:Show()
						GameTooltip:ClearAllPoints()
					</OnEnter>
					<OnLeave>
						 GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Frame name="$parentObjectives" parentKey="Objectives" visible ="true">
				<Size x="0" y="0"/>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="40" y="0"/>
						</Offset>
					</Anchor>
					<Anchor point="RIGHT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="-16" y="0"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOM" relativeTo="$parent"/>
				</Anchors>
			</Frame>
		</Frames>
	</Frame>
	<!--Template for a row with checkbox, picture and quest text -->
	<Button name = "DugisQuestRowTemplate" virtual="true" >
		<Size>
			<!-- <AbsDimension x="545" y="35" /> -->
			<AbsDimension x="800" y="35" />
		</Size>
		<Scripts>
			<OnEnter>
				DugisGuideViewer:Tooltip_OnEnter(self, event)
			</OnEnter>
			<OnLeave>
				DugisGuideViewer:Tooltip_OnLeave(self, event)
			</OnLeave>
			<OnClick>
				if IsShiftKeyDown() then DugisGuideViewer.Modules.StickyFrame:AddRow(self.guestStepIndex) end
				if DGV_SearchBox then
					DGV_SearchBox:SetAutoFocus(false)
					DGV_SearchBox:ClearFocus()
				end
			</OnClick>
		</Scripts>
			<Frames>
				<CheckButton parentKey="Chk" inherits ="UICheckButtonTemplate" visible ="false">
					<Size x="25" y="25"/>
					<Anchors>
					<Anchor point = "TOPLEFT">
					<Offset>
					<AbsDimension x="0" y = "-5"/>
					</Offset>
					</Anchor>
					</Anchors>
					<Scripts>
					<OnClick function="DugisGuideViewer_CheckButton_OnEvent">
					</OnClick>
					</Scripts>
				</CheckButton>
				<Button parentKey="WayPoint">
					<Size x="25" y="25"/>
					<NormalTexture file ="Interface\AddOns\DugisGuideViewerZ\Artwork\waypoint.tga"/>
					<Disabledtexture file="Interface\AddOns\DugisGuideViewerZ\Artwork\blank.tga"/>
					<HighlightTexture alphaMode ="ADD" file ="Interface\BUTTONS\UI-Panel-MinimizeButton-Highlight"/>
					<pushedtexture file = "Interface\AddOns\DugisGuideViewerZ\Artwork\waypoint_pressed.tga"/>
					<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.Chk" relativePoint="RIGHT" >
						<Offset> <AbsDimension x="-7" y="0"/> </Offset>
					</Anchor>
					</Anchors>
					<Scripts> <OnClick> DugisGuideViewer:WayPoint_OnClick(self) </OnClick></Scripts>
				</Button>
				<Button  parentKey="Button">
					<Size x="32" y="32"/>
					<NormalTexture  setAllPoints ="true"/>
					<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.WayPoint" relativePoint="RIGHT" >
						<Offset> <AbsDimension x="-3" y="0"/> </Offset>
					</Anchor>
					</Anchors>
					 <Scripts>
						<OnEnter>
							DugisGuideViewer:Button_OnEnter(self)
						</OnEnter>
						<OnLeave>
							 GameTooltip:Hide();
						</OnLeave>
					</Scripts>
				</Button>
			</Frames>
		<Layers>
			<Layer >
				<FontString  parentKey="Name" inherits="GameFontNormal" wraponspaces="false" justifyH="LEFT" text=""> <!--GameFontHighlight-->
					<Size>
					<AbsDimension x="415" y="14"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.Button" relativePoint="RIGHT" >
						<!-- <Anchor point="LEFT"  > -->
						<Offset>
						<AbsDimension x="1" y="5"/>
						</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString  parentKey="Opt" inherits="GameFontNormal" wraponspaces="false" justifyH="LEFT"  > <!--GameFontHighlight-->
					<Size>
					<AbsDimension x="475" y="14"/>
					</Size>
					<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.Name" relativePoint="RIGHT" >
					<Offset>
					<AbsDimension x="0" y="0"/>
					</Offset>
					</Anchor>
					</Anchors>
				</FontString>
                <FontString  parentKey="StepNumber" inherits="GameFontHighlightSmall"  justifyH="LEFT" text="56.">
                   <Color r="1.0" g="0.82" b="0"/>
					<Size>
                        <Size x="40" y="60"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT" relativeTo = "$parent">
							<Offset>
								<AbsDimension x="-90" y="0"/>
							</Offset>
                        </Anchor>
					</Anchors>
				</FontString>	
				<FontString  parentKey="Desc" inherits="GameFontHighlightSmall" wraponspaces="false" justifyH="LEFT" text="">
					<Size>
					<!-- <AbsDimension x="475" y="14"/> -->
					<AbsDimension x="915" y="14"/>
					</Size>
					<Anchors>
					<!--<Anchor point="TOP" relativeTo="$parentName" relativePoint="BOTTOM"/>-->
					<Anchor point="LEFT" relativeKey="$parent.Name" relativePoint="LEFT">
					<Offset>
					<AbsDimension x="0" y="-14"/>
					</Offset>
					</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>


	</Button> ><!--End of virutual button row-->

	<!--Template for the small window with icon and text -->
	<Button name = "IconReferenceTemplate" virtual="true" >
		<Size>
			<AbsDimension x="300" y="35" />
		</Size>
		<Frames>
		<Button name ="$parentButton" parentKey="Button">
			<Size x="22" y="22"/>
			<NormalTexture  setAllPoints ="true"/>
			<Anchors>
			<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" />
			</Anchors>
		</Button>
			</Frames>

		<Layers>
			<Layer >
				<FontString name="$parentName" parentKey="Name" inherits="GameFontNormal" wraponspaces="false" text=""> <!--GameFontHighlight-->
					<Size>
					<AbsDimension x="75" y="14"/>
					</Size>
					<Anchors>
					<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentButton">
					<Offset>
					<AbsDimension x="0" y="0"/>
					</Offset>
					</Anchor>
					</Anchors>
				</FontString>

			</Layer>
		</Layers>
	</Button> ><!--End of virutual button row-->

	<Button name="DugisGuideListingTemplate" virtual="true">
        <Size x="400" y="16"/>
        <Layers>
            <Layer level="BACKGROUND">
				<FontString name="$parentPercent" parentKey="Percent" inherits="GameFontHighlight" wraponspaces="false" justifyH="RIGHT" text="">
					<Size>
					<AbsDimension x="105" y="14"/>
					</Size>
					<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-10" y="0"/>
						</Offset>
					</Anchor>
					</Anchors>
				</FontString>
            </Layer>
        </Layers>
        <Scripts>
            <OnClick function="DugisGuideViewer_TabRow_OnEvent">
			</OnClick>
			<OnUpdate>
				self:SetWidth(self:GetParent():GetWidth()) --Anchoring right is not performant, but for some reason this is fine.
			</OnUpdate>
        </Scripts>
        <NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
            <Size x="16" y="16"/>
            <Anchors>
                <Anchor point="LEFT" x="3" y="0"/>
            </Anchors>
        </NormalTexture>
        <HighlightTexture name="$parentHighlight" parentKey="highlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
            <Size x="16" y="16"/>
            <Anchors>
                <Anchor point="LEFT" x="3" y="0"/>
            </Anchors>
        </HighlightTexture>
        <ButtonText name="$parentTitle" nonspacewrap="true" parentKey="Title">
            <Size x="0" y="10"/>
            <Anchors>
                <Anchor point="LEFT" x="20" y="0"/>
            </Anchors>
        </ButtonText>
        <NormalFont style="GameFontHighlightLeft"/>
        <HighlightFont style="GameFontHighlightLeft"/>
        <DisabledFont style="GameFontHighlightLeft"/>
    </Button>
	<Button name="DugisGuideTreeNodeTemplate" virtual="true">
        <Size x="400" y="26"/>
        <Scripts>
            <OnClick>
                if self.expanded then
                    self.expanded = false
                else
                    self.expanded = true
                end

                self.TreeFrame:UpdateTreeVisualization()

                if self.TreeFrame.onNodeClick then
                    self.TreeFrame.onNodeClick()
                end

                if self.extraOnClickFunction then
                    self:extraOnClickFunction(self)
                end

                if self.onLeafClickFunction then
                    self:onLeafClickFunction()
                end
			</OnClick>
			<OnDragStart>
                if self.onDragFunction then
                    self:onDragFunction()
                end
			</OnDragStart>
              <OnLoad>self:RegisterForDrag("LeftButton");</OnLoad>
        </Scripts>
        <NormalTexture  parentKey="normal" file="Interface\Buttons\UI-MinusButton-UP">
            <Size x="16" y="16"/>
            <Anchors>
                <Anchor point="LEFT" x="3" y="0"/>
            </Anchors>
        </NormalTexture>
        <HighlightTexture name="$parentHighlight" parentKey="highlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
            <Size x="16" y="16"/>
            <Anchors>
                <Anchor point="LEFT" x="3" y="0"/>
            </Anchors>
        </HighlightTexture>
        <ButtonText name="$parentTitle" nonspacewrap="true" parentKey="Title">
            <Size x="0" y="10"/>
            <Anchors>
                <Anchor point="LEFT" x="20" y="0"/>
            </Anchors>
        </ButtonText>
        <NormalFont style="GameFontHighlightLeft"/>
        <HighlightFont style="GameFontHighlightLeft"/>
        <DisabledFont style="GameFontHighlightLeft"/>
    </Button>
    <Frame name="DugisGuideTreeLeafTemplate" enableMouse='true' virtual="true" visible ="true">
        <Size x="400" y="16"/>
        <Frames>
            <Button parentKey="Button"  enableMouse='true' virtual="true"  visible ="true">
                <Size x="400" y="16"/>
                <HighlightTexture parentKey="highlight" alphaMode ="ADD" file ="Interface\FriendsFrame\UI-FriendsFrame-HighlightBar">
                    <Size x="400" y="16"/>

                    <TexCoords left="0" right="1" top="0" bottom="1"/>
                </HighlightTexture>
                <ButtonText name="$parentText" nonspacewrap="true"  Text="EEEE" visible ="true" parentKey="Text">
                    <Size x="0" y="0"/>
                    <Anchors>
                        <Anchor point="LEFT" x="0" y="0"/>
                    </Anchors>
                </ButtonText>
                <NormalFont style="GameFontHighlightLeft"/>
                <HighlightFont style="GameFontHighlightLeft"/>
                <DisabledFont style="GameFontHighlightLeft"/>
            </Button>


        </Frames>
            <Layers>
                <Layer level="BACKGROUND">
                    <FontString  parentKey="TextRight" inherits="GameFontHighlight" visible ="true" wraponspaces="false" justifyH="RIGHT" text="">
                        <Size>
                        <AbsDimension x="505" y="14"/>
                        </Size>
                        <Anchors>
                        <Anchor point="RIGHT">
                            <Offset>
                                <AbsDimension x="-25" y="0"/>
                            </Offset>
                        </Anchor>
                        </Anchors>
                    </FontString>
                </Layer>
            </Layers>
    </Frame>
    
   <Button name="IconicButtonTemplate" hidden="false" virtual="true">
        <Size>
            <AbsDimension x="14" y="16"/>
        </Size>
        <Anchors>
            <Anchor point="RIGHT" relativePoint = "RIGHT" >
                <Offset>
                <AbsDimension x="-35" y="0"/>
                </Offset>
            </Anchor>
        </Anchors>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture parentKey="Icon" file="Interface/AddOns/DugisGuideViewerZ/Artwork/check16px" alphaMode="ADD">
                   <Size>
                        <AbsDimension x="10" y="10"/>
                    </Size>
                     <Anchors>
                        <Anchor point="RIGHT"/>
                    </Anchors>
                </Texture>
            </Layer>
              <Layer level="BACKGROUND">
                <FontString parentKey="Text" text="Accept"
                    inherits="GameFontNormal" wraponspaces="true" justifyH="RIGHT" 
                    font="GameFontNormal">
                    <Color a="1" r="1" g="1" b="1" />
                    <Anchors>
                        <Anchor point="RIGHT">
                            <Offset>
                                <AbsDimension x="-18" y="0"/>
                            </Offset>                                
                        </Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Scripts>
            <OnLoad>
                self.Icon:SetVertexColor(1,.82,0);
            </OnLoad>
            <OnEnter>
                self:GetParent():GetScript("OnEnter")(self:GetParent())
            </OnEnter> 
            <OnLeave>
                self:GetParent():GetScript("OnLeave")(self:GetParent())
            </OnLeave>
        </Scripts>
	</Button>

	<Frame name="NotificationItemTemplate" virtual="true"  hidden="true">
		<Layers>
			<Layer>
				<FontString  parentKey="Title" wordwrap="true" text="title"
                inherits="GameFontHighlightSmall" wraponspaces="true" justifyH="LEFT" 
                font="GameFontHighlightSmall">
					<Size>
						<AbsDimension x="165" y="12"/>
					</Size>                
                    <Color a="1" r="0.1" g="1" b="0" />
					<Anchors>
						<Anchor point="LEFT" >
                            <Offset>
                                <AbsDimension x="4" y="0"/>
                            </Offset>
                        </Anchor>
					</Anchors>
				</FontString>
			</Layer>
            <Layer  level="BACKGROUND">
                <Texture parentKey="Background" visible="true"  alpha="0.3">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="0" y="0"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                   <Color r="0" g="0" b="0" />
                </Texture>
            </Layer>
		</Layers>
        <Frames>
            <Button parentKey="Dismiss" hidden="false" inherits="IconicButtonTemplate">
                <Anchors>
                    <Anchor point="RIGHT" relativePoint = "RIGHT" >
                        <Offset>
                        <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        self.Icon:SetTexture("Interface/AddOns/DugisGuideViewerZ/Artwork/x16px")
                        self.Text:Hide()
                    </OnLoad>
                    <OnClick>
                        local parent = self:GetParent()
                        DugisGuideViewer:OnNotificationDismissClicked(DugisGuideViewer:GetNotification(parent.id))
                        DugisGuideViewer:RemoveNotificationWithAnimation(parent.id)
                    </OnClick>
                </Scripts>
            </Button>
        </Frames>
        
        <Scripts>
            <OnEnter>
                self.Background:SetAlpha(1)
                self.Background:SetColorTexture(0.2, 0.2, 0.2)
                LibDugi_DropDownList1.showTimer = 10000
			</OnEnter>       
            <OnLeave>
                self.Background:SetAlpha(0.3)
                self.Background:SetColorTexture(0, 0, 0)
			    --To prevent menu hide
                LibDugi_DropDownList1.showTimer = 3
			</OnLeave>
            <OnClick>
                DugisGuideViewer:OnNotificationClicked(DugisGuideViewer:GetNotification(self.id))
			</OnClick>
			<OnDragStart>
			</OnDragStart>
            <OnLoad>
            </OnLoad>
        </Scripts>
    </Frame>
    
	<Button name="DugisOnOffButton" parent = "UIParent"  movable="true" enableMouse='true' frameStrata="MEDIUM"  frameLevel = "3" hidden="true" >
		<Size x="32" y="32"/>
		<Layers>
			<Layer level="OVERLAY">
				<Texture alphaMode ="ADD" alpha="1" visible="false"
					file="Interface\AddOns\DugisGuideViewerZ\Artwork\iconbutton_share.tga" parentKey="shareHighlight" >
				</Texture>
			</Layer>
		</Layers>		
		<NormalTexture file ="Interface\AddOns\DugisGuideViewerZ\Artwork\iconbutton.tga"/>
		<HighlightTexture alphaMode ="ADD" file ="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
		<Anchors>
			<Anchor point="RIGHT" relativeTo="Minimap" relativePoint = "LEFT" >
				<Offset>
				<AbsDimension x="13" y="35"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				self:RegisterForDrag("LeftButton");
				self:SetClampedToScreen(true);
				self:RegisterForClicks("AnyUp")
			</OnLoad>
			<OnClick>
				lastOnOffButtonClickedTime = GetTime()
				DugisGuideViewer:OnOff_OnClick(self, button)
			</OnClick>
			<OnDragStart>
				DugisGuideViewer:OnDragStart(self);
			</OnDragStart>
			<OnDragStop>
				DugisGuideViewer:OnDragStop(self);
			</OnDragStop>
			<OnUpdate>DugisGuideViewer:OnModeButtonUpdate(self)</OnUpdate>
		</Scripts>
		<Frames>
			<Frame name="NotificationsMark" frameLevel="4"  visible="false" hidden="true">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="DugisOnOffButton" relativePoint = "TOPLEFT" >
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>		
				<Layers>
					<Layer >
						<Texture file="Interface\AddOns\DugisGuideViewerZ\Artwork\notification.tga"/>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
	</Button>

    <Button name='GearOptionButtonTemplate' virtual='true' >
		<Size>
			<AbsDimension x="180" y="68"/>
		</Size>
		<Layers>
			<!--<Layer level="BACKGROUND">
				<Texture file="Interface\Buttons\ButtonHilight-Square" />
			</Layer>-->
			<Layer>
				<FontString name="$parentTitleFont" parentKey="titleFont" inherits="GameFontHighlight" wraponspaces="true" justifyH="LEFT" font="GameFontNormal">
					<Size>
						<AbsDimension x="180" y="12"/>
					</Size>
					<Anchors>
						<Anchor point="TOP" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<!--<HighlightTexture alphaMode="ADD" file="Interface\Buttons\UI-ActionButton-Border"/>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>-->
		<Frames>
			<Button name="$parentItemButton" parentKey="itemButton" inherits="LargeItemButtonTemplate" objectType="item">
				<Size>
					<AbsDimension x="147" y="41"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTitleFont" relativePoint="bottomleft">
						<Offset>
							<AbsDimension y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnShow>
						local item = self:GetParent().item
						local name, texture, _
						if item then
							name, _, _, _, _, _, _, _, _, texture = GetItemInfo(item)

						else
							 name, texture = DugisGuideViewer.Modules.GearAdvisorEquip:GetSlotBackgroundInfo(DugisEquipPromptFrame.slot)
						end
						self.Name:SetText(name);
						SetItemButtonTexture(self, texture)
						SetItemButtonNameFrameVertexColor(self, 1.0, 1.0, 1.0);
					</OnShow>
					<OnEnter>
						local item = self:GetParent().item
						if item then
							GameTooltip:SetOwner(self, "ANCHOR_BOTTOM");
							GameTooltip:SetHyperlink(item)
							if GetInventoryItemLink("player", self:GetParent():GetParent().slot)~=item then
								GameTooltip_ShowCompareItem(GameTooltip)
							end
							CursorUpdate(self)
						end
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
						ResetCursor()
					</OnLeave>
					<OnUpdate>
						CursorOnUpdate(self, elapsed)
					</OnUpdate>
					<OnClick>
						--DugisGuideViewer.Modules.GearAdvisorEquip:OnGearOptionClicked(DugisEquipPromptFrame.compare)
						--DugisEquipItemHighlight:SetPoint("TOPLEFT", self, "TOPLEFT", -8, 7)
						--DugisEquipItemHighlight:Show()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				self.titleFont:SetText(self.title)
			</OnShow>
        </Scripts>
	</Button>

    <Button name='TrainSuggestionLine' virtual='true' >
		<Size><AbsDimension x="237" y="38"/></Size>
		<Layers>
			<Layer>
				<FontString parentKey="title" inherits="GameFontHighlight"  wraponspaces="true" justifyH="LEFT" font="GameFontNormal">
					<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="33" y="-5" /></Offset></Anchor></Anchors>
				</FontString>
		
			</Layer>
		</Layers>
		<Frames>
			<Frame parentKey="skill" >
			<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0" /></Offset></Anchor></Anchors>
				<Size><AbsDimension x="25" y="25"/></Size>
				<Layers>
					<Layer>
						<Texture parentKey="icon">
							<Size>
								<AbsDimension x="25" y="25"/>
							</Size>
							<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="3" /></Offset></Anchor></Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(TrainPromptFrame, "ANCHOR_LEFTTOP", -3, -150);
						GameTooltip:SetHyperlink("|Hspell:" .. self.abilityId .. "|hLinktext|h")
						GameTooltip:Show()
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Frame>
			<Button inherits="UIPanelButtonTemplate" text="Dismiss">
				<Size>
					<AbsDimension x='78' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="85" y="10"/>
						</Offset>
					</Anchor>
				</Anchors>
					<Scripts>
					<OnClick>
						self:GetParent().abilityInfo.ignored = true
						DugisGuideViewer.UpdateTrainSuggestionsUI()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Button>
	<Frame name='TrainPromptFrame' parent='UIParent' movable='true' enableMouse='true' hidden='true' inherits='BackdropTemplate'>
		<Size> <AbsDimension x="460" y="270"/> </Size>
		<Anchors>
			<Anchor point="CENTER"></Anchor>
		</Anchors>
		<Layers>
			<Layer>
				<FontString text="You can train the following abilities:" inherits="GameFontHighlight" justifyH="LEFT" font="GameFontNormalLarge">
					<Size> <AbsDimension x="320" y="12"/></Size>
					<Anchors><Anchor point="TOPLEFT"> <Offset><AbsDimension x="25" y="-30"/></Offset></Anchor></Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button inherits="UIPanelButtonTemplate" text = "Find Trainer">
				<Size>
					<AbsDimension x='95' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="25" y="20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						DugisGuideViewer.FindNearest(4)
					</OnClick>
				</Scripts>
			</Button>
			<Button inherits="UIPanelButtonTemplate" text = "Remind Later">
				<Size>
					<AbsDimension x='105' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
								<AbsDimension x="130" y="20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						TrainPromptFrame:Hide()
						if DugisGuideViewer:CountNotificationsByType("training-suggestion") == 0 then
							DugisGuideViewer:AddNotification({title = "New train suggestion.", notificationType = "training-suggestion"})
						end
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				self:RegisterForDrag("LeftButton")
				self:SetClampedToScreen(true);
			</OnLoad>
			<OnDragStart>
				self:StartMoving()
			</OnDragStart>
			<OnDragStop>
				self:StopMovingOrSizing()
			</OnDragStop>
        </Scripts>
	</Frame>




	<Frame name='DugisEquipPromptFrame' parent='UIParent' movable='true' enableMouse='true' hidden='true' inherits='BackdropTemplate' >
		<Size> <AbsDimension x="410" y="270"/> </Size>
		<Anchors>
			<Anchor point="CENTER"></Anchor>
		</Anchors>
		<Frames>
			<Frame name="DugisEquipItemHighlight" hidden="true">
                <Size>
                    <AbsDimension x="256" y="64"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture file="Interface\QuestFrame\UI-QuestItemHighlight" alphaMode="ADD">
                            <Size>
                                <AbsDimension x="256" y="64"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT"/>
                            </Anchors>
                        </Texture>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnLoad function="RaiseFrameLevel"/>
                </Scripts>
            </Frame>
			<Button name="$parentRecommendedGearOption" parentKey="recommended" inherits="GearOptionButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="25" y="-20"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentExistingGearOption" parentKey="existing" inherits="GearOptionButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRecommendedGearOption" relativePoint="bottomleft">
						<Offset>
							<AbsDimension y="-10" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentOKButton" inherits="UIPanelButtonTemplate" text ="Okay">
				<Size>
					<AbsDimension x='75' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="25" y="20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide()
                        DugisGuideViewer:RemoveNotificationWithAnimation(DugisEquipPromptFrame.notificationId)
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentCancelButton" inherits="UIPanelButtonTemplate" text ="Cancel">
				<Size>
					<AbsDimension x='75' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentOKButton" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="5" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local parent = self:GetParent()
						parent.action = "CANCEL"
						parent.blacklist:SetChecked(false)
						parent:Hide()
						
						if DugisEquipPromptFrame.dontRemoveNotificationOnCancel ~= true then
							DugisGuideViewer:RemoveNotificationWithAnimation(DugisEquipPromptFrame.notificationId)
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentResetBanButton" inherits="UIPanelButtonTemplate" text ="Reset Ban List">
				<Size>
					<AbsDimension x='115' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-20" y="20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if DugisGuideViewer.chardb.GA_Blacklist then
							wipe(DugisGuideViewer.chardb.GA_Blacklist)
							DugisGuideViewer.Modules.GearAdvisorEquip.ContinueEquip(true)
						end
						local parent = self:GetParent()
						parent.action = "CANCEL"
						parent.blacklist:SetChecked(false)
						parent:Hide()
					</OnClick>
				</Scripts>
			</Button>
			<CheckButton name = "$parentBlacklistChk" inherits ="UICheckButtonTemplate" parentKey="blacklist" >
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="$parentOKButton" relativePoint="topleft" >
						<Offset>
							<AbsDimension x="-3" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local checked = self:GetChecked()
						local forAll = self:GetParent().forAll
						if checked then
							forAll:SetChecked(false)
							forAll:Disable()
							forAll.text:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b)
							DugisGuideViewer.Modules.GearAdvisorEquip:OnGearOptionClicked(DugisEquipPromptFrameExistingGearOptionItemButton:GetParent())
							DugisEquipItemHighlight:SetPoint("TOPLEFT", DugisEquipPromptFrameExistingGearOptionItemButton, "TOPLEFT", -8, 7)
							DugisEquipItemHighlight:Show()
						else
							forAll:Enable()
							forAll.text:SetTextColor(1.0, 0.82, 0)
							DugisGuideViewer.Modules.GearAdvisorEquip:OnGearOptionClicked(DugisEquipPromptFrameRecommendedGearOptionItemButton:GetParent())
							DugisEquipItemHighlight:SetPoint("TOPLEFT", DugisEquipPromptFrameRecommendedGearOptionItemButton, "TOPLEFT", -8, 7)
							DugisEquipItemHighlight:Show()
						end
					</OnClick>
					<OnShow>
						self.text:SetFont((self.text:GetFont()), 12)
					</OnShow>
				</Scripts>
			</CheckButton>
			<CheckButton name = "$parentForAllChk" inherits ="UICheckButtonTemplate" parentKey="forAll" >
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="$parentBlacklistChk" relativePoint="topleft" >
						<Offset>
							<AbsDimension y="-5"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnShow>
						self.text:SetFont((self.text:GetFont()), 12)
					</OnShow>
				</Scripts>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				self:RegisterForDrag("LeftButton")
				self:SetClampedToScreen(true);
			</OnLoad>
			<OnDragStart>
				self:StartMoving()
			</OnDragStart>
			<OnDragStop>
				self:StopMovingOrSizing()
			</OnDragStop>
			<OnHide>
				DugisGuideViewer.Modules.GearAdvisorEquip:OnPromptHidden(self)
			</OnHide>
        </Scripts>
	</Frame>

	<Frame name='DugisGuideSuggestFrame'  parent='UIParent' movable='true' enableMouse='true' hidden='true' inherits="BackdropTemplate" >
		 <Size> <AbsDimension x="340" y="120"/> </Size>

			<Anchors>
			<Anchor point="CENTER"></Anchor>
			</Anchors>
		 <Layers>
			<Layer>
				<FontString name="$parentTitle" parentKey="Title" inherits="GameFontHighlight" justifyH="CENTER" font="GameFontNormal">
					<Size>
					<AbsDimension x="300" y="20"/>
					</Size>
					<Anchors>
					<Anchor point="TOP" >
					<Offset>
					<AbsDimension x="0" y="-15"/>
					</Offset>
					</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentGuideTitle" parentKey="GuideTitle" inherits="GameFontHighlight" justifyH="LEFT" font="GameFontNormal">
					<Size>
					<AbsDimension x="240" y="25"/>
					</Size>
					<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle" relativePoint="bottom">
					</Anchor>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
					<Offset> <AbsDimension x='20' /> </Offset>
					</Anchor>
					</Anchors>
				</FontString>
                <Texture name="$parentImage" parentKey="GuideImage" setAllPoints="true" >
                    <Size>
                        <AbsDimension x="283" y="140"/>
                    </Size>
                    <Anchors>
                        <Anchor point="LEFT" />
                    </Anchors>
                </Texture>
				<FontString name="$parentOr" parentKey="Or" text="Alternative Leveling Guides:" inherits="GameFontHighlight" justifyH="CENTER" font="GameFontNormal">
					<Size>
					<AbsDimension x="340" y="20"/>
					</Size>
					<Anchors>
					<Anchor point="TOP" relativeTo="$parentGuideTitle" relativePoint="bottom">
					<Offset>
						<AbsDimension y="-5" />
					</Offset>
					</Anchor>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
					</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentTitle2" parentKey="Title2" inherits="GameFontHighlight" wraponspaces="true" justifyH="CENTER" text="OR complete Quests in Log first" font="GameFontNormal">
					<Size>
					<AbsDimension x="300" y="30"/>
					</Size>
					<Anchors>
					<Anchor point="TOP" relativeTo="$parent" relativePoint="bottom">
					<Offset>
					<AbsDimension x="0" y="70"/>
					</Offset>
					</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name='$parentYesButton' inherits='UIPanelButtonTemplate' text = 'Go'>
				<Size> <AbsDimension x='55' y='23'/> </Size>
				<Anchors> <Anchor point='LEFT' relativeTo="$parentGuideTitle" relativePoint="right" ><Offset><AbsDimension x="5"/></Offset></Anchor> </Anchors>
				<Scripts> <OnClick> DugisGuideViewer:SuggestButtonOnClick() </OnClick> </Scripts>
			</Button>
			<Button name='$parentCompleteYesButton' parentKey="CompleteYesButton" inherits='UIPanelButtonTemplate' text = 'Complete'>
				<Size> <AbsDimension x='95' y='23'/> </Size>
				<Anchors> <Anchor point='TOPRIGHT' relativeTo="$parentTitle2" relativePoint="bottom"><Offset><AbsDimension x="-5"/></Offset></Anchor> </Anchors>
				<Scripts> <OnClick> DugisGuideViewer:CompleteCurrentQuest() </OnClick> </Scripts>
			</Button>
			<Button name='$parentNoButton' inherits='UIPanelButtonTemplate' text = 'Not Now'>
				<Size> <AbsDimension x='95' y='23'/> </Size>
				<Anchors> <Anchor point='LEFT' relativeTo="$parentCompleteYesButton" relativePoint="right"><Offset><AbsDimension x="5"/></Offset></Anchor> </Anchors>
				<Scripts> <OnClick> self:GetParent():Hide() </OnClick> </Scripts>
			</Button>
		</Frames>

		<Scripts>
			 <OnLoad>

				self:RegisterForDrag("LeftButton")
				self:SetClampedToScreen(true);

				self:SetBackdrop({
					bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
                                            tile = true, tileSize = 16, edgeSize = 16,
                                            insets = { left = 4, right = 4, top = 4, bottom = 4 }});
				
				self:SetBackdropColor(0,0,0,1);
			</OnLoad>
			<OnDragStart>
				self:StartMoving()
			</OnDragStart>
			<OnDragStop>
				self:StopMovingOrSizing()
			</OnDragStop>

		</Scripts>
	</Frame>

	<Frame name='DugisCoinRewardAdornment' parent='QuestInfoRewardsFrame' hidden='true' >
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga" >
					<TexCoords left="0" right=".5" top=".5" bottom="1" />
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Frame name='DugisGreenArrowRewardAdornment' parent='QuestInfoRewardsFrame' hidden='true' >
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga" >
					<TexCoords left=".5" right="1" top="0" bottom=".5" />
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Frame name='DugisYellowArrowRewardAdornment' parent='QuestInfoRewardsFrame' hidden='true' >
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga" >
					<TexCoords left="0" right=".5" top="0" bottom=".5" />
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Frame name='DugisGreenArrowAdornmentTemplate' virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga" >
					<TexCoords left=".5" right="1" top="0" bottom=".5" />
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Frame name='DugisYellowArrowAdornmentTemplate' virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<Texture file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga" >
					<TexCoords left="0" right=".5" top="0" bottom=".5" />
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Button name = "DugisArrowLFGFrameTemplate" virtual="true" >
		<Size>
			<AbsDimension x="100" y="50" />
		</Size>
		<Layers>
			<Layer >
				<FontString name="$parentOr" parentKey="Or" inherits="GameFontNormal" wraponspaces="false" justifyH="CENTER" text=" Or "> <!--GameFontHighlight-->
					<Size>
						<AbsDimension x="40" y="14"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="DugisArrowFrame" relativePoint="RIGHT" >
							<Offset><AbsDimension x="5" /></Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name ="$parentButton" parentKey="button">
				<HighlightTexture alphaMode ="BLEND" file ="Interface\AddOns\DugisGuideViewerZ\Artwork\Micro-Highlight.tga"/>
				<Size x="38.46" y="50"/>
				<NormalTexture file ="INTERFACE\BUTTONS\UI-MicroButton-LFG-Up">
					<TexCoords left="0" right="1" top=".35" bottom="1" />
				</NormalTexture>
				<pushedtexture file ="INTERFACE\BUTTONS\UI-MicroButton-LFG-Down">
					<TexCoords left="0" right="1" top=".35" bottom="1" />
				</pushedtexture>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentOr" relativePoint="RIGHT" >
						<Offset> <AbsDimension x="5" /> </Offset>
					</Anchor>
				</Anchors>
				<Scripts><OnClick> DugisGuideViewer:LFGSelected(self.queue) </OnClick></Scripts>
			</Button>
		</Frames>
	</Button>

	<Frame name="DugisOrderedListItemTemplate" virtual="true" hidden="true">
		<Size x="280" y="20"></Size>
		<Frames>
			<Button name="$parentRemove" parentKey="remove" hidden="true">
				<NormalTexture  file="Interface\RaidFrame\ReadyCheck-NotReady" />
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-10" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local parent = self:GetParent()
						local container = parent:GetParent()
						local index = parent:GetID()
						local options = DugisGuideViewer.chardb[container.optionIndex].options
						tremove(options, index)
						for i=3,math.min(3,#options),-1 do
							options[i] = options[i] or false
						end
						DugisGuideViewer:UpdateOrderedListView(container.optionIndex, {container:GetChildren()}, true)
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentDown" parentKey="down" hidden="true">
				<NormalTexture  file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga" >
					<TexCoords left=".5" right="1" top=".5" bottom="0" />
				</NormalTexture>
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local parent = self:GetParent()
						local container = parent:GetParent()
						local options = DugisGuideViewer.chardb[container.optionIndex].options
						local index = parent:GetID()
						if index~=#options then
							local value = tremove(options, index)
							tinsert(options, index+1, value)
							DugisGuideViewer:UpdateOrderedListView(container.optionIndex, {container:GetChildren()})
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentUp" parentKey="up" hidden="true">
				<NormalTexture  file="Interface\AddOns\DugisGuideViewerZ\Artwork\GearAdvisor.tga">
					<TexCoords left=".5" right="1" top="0" bottom=".5" />
				</NormalTexture>
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-50" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local parent = self:GetParent()
						local container = parent:GetParent()
						local options = DugisGuideViewer.chardb[container.optionIndex].options
						local index = parent:GetID()
						if index~=1 then
							local value = tremove(options, index)
							tinsert(options, index-1, value)
							DugisGuideViewer:UpdateOrderedListView(container.optionIndex, {container:GetChildren()})
						end
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		
		<Anchors>
			<Anchor point="LEFT"/>
		</Anchors>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormal" justifyH="LEFT" justifyV="CENTER" font="GameFontNormal">
					<Color a="1" r="1" g="1" b="1" />
					<Size>
						<AbsDimension x="12" />
					</Size>
					<Anchors>
						<Anchor point="RIGHT"/>
						<Anchor point="LEFT"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter>
				local container = self:GetParent()
				local options = DugisGuideViewer.chardb[container.optionIndex].options
				local index = self:GetID()
				if index~=#options then
					self.down:Show()
				end
				if index~=1 then
					self.up:Show()
				end
				self.remove:Show()
			</OnEnter>
			<OnUpdate>
				local focusFrame = GetMouseFocus()
				if focusFrame and focusFrame~=self and focusFrame:GetParent()~=self then
					self.up:Hide()
					self.down:Hide()
					self.remove:Hide()
				end
			</OnUpdate>
		</Scripts>
	</Frame>

	<Frame name="DugisProgressIcon" toplevel="true" parent="UIParent" hidden="true">
        <Animations>
            <AnimationGroup parentKey="Loop" looping="REPEAT" >
                <Rotation target="DugisProgressIconSpin" order="1" duration="1" degrees="-360" />
            </AnimationGroup>
        </Animations>
        <Size x="80" y="80"/>
        <Frames>
            <Frame name="$parentFrame" setAllPoints="true" >
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture file="Interface\COMMON\StreamBackground" name="$parentBackground" setAllPoints="true" />
                    </Layer>
                    <Layer level="ARTWORK">
                        <Texture file="Interface\COMMON\StreamFrame" name="$parentAlpha" setAllPoints="true" />
                    </Layer>
                </Layers>
            </Frame>
            <Frame name="$parentSpin" setAllPoints="true" >
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture file="Interface\COMMON\StreamCircle" name="$parentSpinner" setAllPoints="true" />
                    </Layer>
                    <Layer level="OVERLAY" >
                        <Texture file="Interface\COMMON\StreamSpark" setAllPoints="true" />
                    </Layer>
                </Layers>
            </Frame>
        </Frames>
		<Scripts>
            <OnLoad>
				DugisProgressIconSpinSpinner:SetVertexColor(1,.82,0);
				DugisProgressIconFrameBackground:SetVertexColor(1,0.82,0);
				DugisProgressIcon.Loop:Play()
			</OnLoad>
        </Scripts>
    </Frame>

	<Frame name="DugisSelectionPanelTemplate" virtual="true" hidden="true">
		<Size x="206" y="32" />
		<Layers>
			<Layer level="OVERLAY">
				<Texture name="$parentIcon" parentKey="icon">
					<Size>
						<AbsDimension x="32" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" />
					</Anchors>
				</Texture>
				<FontString name="$parentText" inherits="QuestFont_Super_Huge" justifyH="LEFT" parentKey="text">
					<Size x="0" y="0"/>
					<Anchors>
						<Anchor point="LEFT" x="5" relativePoint="RIGHT" relativeTo="$parentIcon" />
					</Anchors>
					<Color r="0.961" g="0.824" b="0.412"/>
				</FontString>
			</Layer>
		</Layers>
	</Frame>

	<CheckButton name = "DugisSelectionTemplate" inherits="DugisSelectionPanelTemplate" virtual="true" hidden="false">
		<HighlightTexture alphaMode ="ADD" file ="Interface\AddOns\DugisGuideViewerZ\Artwork\highlight"/>
		<CheckedTexture alphaMode ="ADD" file ="Interface\AddOns\DugisGuideViewerZ\Artwork\highlight"/>

		<Scripts>
			<OnClick>
				DugisGuideViewer.OnSettingsMenuClick(self.tabInfo)
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
				GameTooltip:SetText(self.tooltip);
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
	</CheckButton>

	<Button name="TopTabTemplate" virtual="true">
        <Size x="120" y="36"/>
        <HitRectInsets>
            <AbsInset left="-12" right="-12" top="0" bottom="0"/>
        </HitRectInsets>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture name="$parentMid" file="Interface\EncounterJournal\UI-EncounterJournalTextures_Tile" virtual="true" parentKey="mid" horizTile="true">
					<Size x="64" y="36"/>
					<TexCoords left="0.00000000" right="1.00000000" top="0.67382813" bottom="0.74414063"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="0" y="0"/>
                        <Anchor point="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentLeft" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="left">
					<Size x="12" y="36"/>
					<TexCoords left="0.81835938" right="0.84179688" top="0.02246094" bottom="0.05761719"/>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" x="0" y="0"/>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentRight" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="right">
					<Size x="12" y="36"/>
					<TexCoords left="0.84570313" right="0.86914063" top="0.05957031" bottom="0.09472656"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="0" y="0"/>
                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="OVERLAY">
                <Texture name="$parentMidSelect" file="Interface\EncounterJournal\UI-EncounterJournalTextures_Tile" virtual="true" horizTile="true" parentKey="midSelect" hidden="true">
					<Size x="64" y="36"/>
					<TexCoords left="0.00000000" right="1.00000000" top="0.59960938" bottom="0.66992188"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="0" y="0"/>
                        <Anchor point="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentLeftSelect" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="leftSelect" hidden="true">
					<Size x="12" y="36"/>
					<TexCoords left="0.84570313" right="0.86914063" top="0.02246094" bottom="0.05761719"/>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" x="0" y="0"/>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentRightSelect" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="rightSelect" hidden="true">
					<Size x="12" y="36"/>
					<TexCoords left="0.87304688" right="0.89648438" top="0.05957031" bottom="0.09472656"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="0" y="0"/>
                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentSelectedGlow" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="selectedGlow" hidden="true">
					<Size x="64" y="15"/>
					<TexCoords left="0.52343750" right="0.64843750" top="0.00097656" bottom="0.01562500"/>
                    <Anchors>
                        <Anchor point="BOTTOMLEFT" x="-18" y="0"/>
                        <Anchor point="BOTTOMRIGHT" x="18" y="0"/>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="HIGHLIGHT">
                <Texture name="$parentMidHighlight" file="Interface\EncounterJournal\UI-EncounterJournalTextures_Tile" virtual="true" horizTile="true" parentKey="midHighlight">
					<Size x="64" y="36"/>
					<TexCoords left="0.00000000" right="1.00000000" top="0.52539063" bottom="0.59570313"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="0" y="0"/>
                        <Anchor point="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentLeftHighlight" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="leftHighlight">
					<Size x="12" y="36"/>
					<TexCoords left="0.81835938" right="0.84179688" top="0.05957031" bottom="0.09472656"/>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" x="0" y="0"/>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
                <Texture name="$parentRightHighlight" file="Interface\EncounterJournal\UI-EncounterJournalTextures" virtual="true" parentKey="rightHighlight">
					<Size x="12" y="36"/>
					<TexCoords left="0.87304688" right="0.89648438" top="0.02246094" bottom="0.05761719"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="0" y="0"/>
                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Frame enableMouse="true" parentKey="grayBox" hidden="true">
                <Size x="140" y="55"/>
                <Anchors>
                    <Anchor point="BOTTOM"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture>
                            <Size x="134" y="26"/>
                            <Anchors>
                                <Anchor point="BOTTOM"/>
                            </Anchors>
                            <Color a="0.6"/>
                        </Texture>
                    </Layer>
                </Layers>
            </Frame>
        </Frames>
        <NormalFont style="GameFontNormalLarge"/>
        <ButtonText>
            <Anchors>
                <Anchor point="CENTER" x="0" y="-3"/>
            </Anchors>
        </ButtonText>
        <Scripts>
            <OnLoad>
                self.storedHeight = self:GetHeight();
                self:SetHeight(self.storedHeight-4);
            </OnLoad>
            <OnEnable>
                self.leftSelect:Hide();
                self.midSelect:Hide();
                self.rightSelect:Hide();
                self:SetHeight(self.storedHeight-4);
            </OnEnable>
            <OnDisable>
                self.leftSelect:Show();
                self.midSelect:Show();
                self.rightSelect:Show();
                self:SetHeight(self.storedHeight);
            </OnDisable>
			<OnClick>

                if _G["searchThread"] ~= nil or _G["searchDelayTimer"] ~= nil or not self.tabInfo then
                    return
                end

				DugisGuideViewer.DeselectTopTabs()

				self:Disable();
				self:GetFontString():SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
				self.selectedGlow:SetVertexColor(1.0, 0.8, 0);
				self.selectedGlow:Show();
                DugisGuideViewer.currentTabText = self.tabInfo.text
				self.tabInfo:Activate()
				LuaUtils:PlaySound("igCharacterInfoTab");
			</OnClick>
        </Scripts>
    </Button>

	<Frame name="DugisMainBorder" parent='UIParent' movable ="true" visible="false" frameStrata="DIALOG" inherits="BackdropTemplate">
		<Size x="818" y="420"/>
		<Anchors>
            <Anchor point="CENTER" x="0" y="0"/>
        </Anchors>
			<Layers>
				<Layer level="BACKGROUND">
					<Texture name="$parentBG" file="Interface\AddOns\DugisGuideViewerZ\Artwork\bg_home.tga" parentKey="bg">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-10"/>
							<Anchor point="BOTTOMRIGHT" x="-3" y="5"/>
						</Anchors>
					</Texture>
				</Layer>
			</Layers>
		<Frames>
            <Button name = "DugisCloseButton" inherits="UIPanelCloseButton">
                <Size>
                    <AbsDimension x="24" y="24"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPRIGHT" relativeTo="DugisMainBorder" >
                    <Offset>
                            <AbsDimension x="-3" y="-7"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>DugisGuideViewer.DugisGuideViewer_Close_ButtonClick();</OnClick>
                </Scripts>
            </Button>
			<Frame name="DugisMain"  clipChildren = "true">
				<Anchors>
					<Anchor point="TOPLEFT" x="10" y="-12"/>
					<Anchor point="BOTTOMRIGHT" x="-8" y="8"/>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentTitle" inherits="QuestFont_Super_Huge" justifyH="CENTER" parentKey="title">
							<Size x="400" y="44" />
							<Anchors>
								<Anchor point="TOPRIGHT" x="-25"/>
							</Anchors>
							<Color r="0.961" g="0.824" b="0.412"/>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
                   <!--   <Frame  parentKey="MacrosWrapper"  setAllPoints="true" visible="true">
                        <Frames>
                            <Frame  parentKey="MacroInfo"  setAllPoints="true" visible="true">
                                <Layers>
                                    <Layer level="BACKGROUND" visible="true">

                                        <Texture  parentKey="CategoryIcon"  file ="Interface/Icons/INV_Misc_Orb_05" >
                                            <Size x="32" y="32" />
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="12" y="-49"/>
                                            </Anchors>
                                            <TexCoords left="0" right="1" top="0" bottom="1"/>
                                        </Texture>
                                        <FontString parentKey="CategoryName"  inherits="QuestFont_Super_Huge" justifyH="LEFT"  visible="true" text="Macros">
                                            <Size x="289"/>
                                            <Anchors>
                                                <Anchor relativeKey="$parent.CategoryIcon" point="TOPLEFT" x="40" y="-5"/>
                                            </Anchors>
                                        </FontString>
                                    </Layer>
                                </Layers>
                             </Frame>
                            <Button parentKey="BackToCategoriesButton" frameLevel="1000" hidden="true">
                                <Size x="32" y="32"/>
                                <Anchors>
                                    <Anchor relativeKey="$parent.MacroInfo.CategoryIcon" point="TOPLEFT" x="-40" y="-2"/>
                                </Anchors>
                                <Scripts>
                                    <OnClick>
                                        self:Hide()
                                        DugisGuideViewer.Modules.Guides.macrolist.frame:Hide()
                                        macrocategorieswrapper:Show()

                                        local MacroInfo = self:GetParent().MacroInfo

                                        MacroInfo.CategoryIcon:SetTexture("Interface/Icons/INV_Misc_Orb_05")
                                        MacroInfo.CategoryIcon:ClearAllPoints()
                                        MacroInfo.CategoryIcon:SetPoint("TOPLEFT", 12, -49)
                                        MacroInfo.CategoryName:SetText("Macros")

                                        DugisGuideViewer.Modules.Guides.macrolist.scrollBar:Hide()

                                        self:GetParent().MacroEditor:Hide()

                                        DugisGuideViewer.Modules.Guides.textEditor.frame:Hide()

                                    </OnClick>
                                </Scripts>
                                <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
                                <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
                                <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
                                <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
                            </Button>
                            <Frame  parentKey="MacroEditor"  setAllPoints="true" visible="true">
                                <Layers>
                                    <Layer level="BACKGROUND" visible="true">
                                        <FontString parentKey="MacroName"  maxLines="1"  wordwrap="true" wraponspaces="true"  inherits="GameFontNormal" justifyH="LEFT"  visible="true" text="Macro name">
                                            <Size x="289"/>
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="384" y="-51"/>
                                            </Anchors>
                                        </FontString>

                                        <FontString parentKey="MacroDescription" maxLines="2"  wordwrap="true" wraponspaces="true"  inherits="GameFontNormal" justifyH="LEFT"  visible="true" text="Macro description">
                                            <Size x="289"/>
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="384" y="-71"/>
                                            </Anchors>
                                            <Color r="1" g="1" b="1"/>
                                        </FontString>

                                        <FontString wordwrap="true" wraponspaces="true"  inherits="GameFontNormal" justifyH="LEFT"  visible="true" text="Macro code:">
                                            <Size x="289"/>
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="384" y="-111"/>
                                            </Anchors>
                                        </FontString>
                                        <FontString name="MacroCode" maxLines="13" parentKey="MacroCode"  wordwrap="true" wraponspaces="true"  inherits="GameFontNormal" justifyH="LEFT"  visible="true" text="Macro code /run...; end">
                                            <Size x="289"/>
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="384" y="-131"/>
                                            </Anchors>
                                            <Color r="1" g="1" b="1"/>
                                        </FontString>
                                    </Layer>
                                </Layers>
                                <Frames>
                                    <Button parentKey = "AddToSlotButton" inherits="UIPanelButtonTemplate" text = "Add this macro to slot" hidden="false">
                                         <Size>
                                            <AbsDimension x="155" y="23"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="BOTTOMLEFT" relativeTo="MacroCode">
                                                <Offset>
                                                    <AbsDimension x="0" y="-40"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button parentKey = "ResetToDefault" inherits="UIPanelButtonTemplate" text = "Reset" hidden="false">
                                         <Size>
                                            <AbsDimension x="155" y="23"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="BOTTOMLEFT" relativeTo="MacroCode">
                                                <Offset>
                                                    <AbsDimension x="160" y="-40"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                </Frames>
                            </Frame>
                        </Frames>
                    </Frame>-->
					<Frame name="DGVHomeFrame" >
						<Size x="350" y="356"/>
						<Frames>
                            <Frame setAllPoints="true" visible="false">
                                <Layers>
                                    <Layer level="ARTWORK">
                                        <FontString name="SearchingInfoText"  wordwrap="false" wraponspaces="true"  inherits="GameFontNormal" justifyH="LEFT"  visible="false" text="Searching...">
                                            <Size x="189" y="40"/>
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="544" y="41"/>
                                            </Anchors>
                                        </FontString>
                                    </Layer>
                                </Layers>
                            </Frame>
                            <Frame name="DugisSearchProgressIcon"  visible="false">
                                <Anchors>
								   <Anchor point="TOPRIGHT" relativeTo="DGVHomeFrame">
										<Offset>
											<AbsDimension x="430" y="44"/>
										</Offset>
									</Anchor>
							   </Anchors>
                                <Size x="45" y="45"/>
                                <Frames>
                                    <Frame name="$parentFrame" setAllPoints="true" >
                                        <Layers>
                                            <Layer level="BACKGROUND">
                                                <Texture file="Interface\COMMON\StreamBackground" name="$parentBackground" setAllPoints="true" />
                                            </Layer>
                                            <Layer level="ARTWORK">
                                                <Texture file="Interface\COMMON\StreamFrame" name="$parentAlpha" setAllPoints="true" />
                                            </Layer>
                                        </Layers>
                                    </Frame>
                                    <Frame name="$parentSpin" setAllPoints="true" >
                                        <Layers>
                                            <Layer level="BACKGROUND">
                                                <Texture file="Interface\COMMON\StreamCircle" name="$parentSpinner" setAllPoints="true" />
                                            </Layer>
                                            <Layer level="OVERLAY" >
                                                <Texture file="Interface\COMMON\StreamSpark" setAllPoints="true" />
                                            </Layer>
                                        </Layers>
                                    </Frame>
                                </Frames>
                                <Scripts>
                                    <OnLoad>
                                        SearchingInfoText:Hide()
                                        DugisSearchProgressIcon:Hide()
                                        DugisSearchProgressIconSpinSpinner:SetVertexColor(1,.82,0);
                                        DugisSearchProgressIconFrameBackground:SetVertexColor(1,0.82,0);
                                    </OnLoad>
                                </Scripts>
                            </Frame>
                            <Button  inherits="DugisSelectionTemplate" parentKey="selection1" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>
                           <Button  inherits="DugisSelectionTemplate" parentKey="selection2" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>
                           <Button  inherits="DugisSelectionTemplate" parentKey="selection3" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>
                           <Button  inherits="DugisSelectionTemplate" parentKey="selection4" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>
                           <Button  inherits="DugisSelectionTemplate" parentKey="selection5" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>
						    <Button  inherits="DugisSelectionTemplate" parentKey="selection6" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>
						    <Button  inherits="DugisSelectionTemplate" parentKey="selection7" visible="true">
							   <Anchors>
								   <Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="12" y="-10"/>
										</Offset>
									</Anchor>
							   </Anchors>
						   </Button>						   
						</Frames>
					</Frame>

					<Frame name ="DGVSearchFrame"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame3"  movable ="true">
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame4"  movable ="true" >
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame5"  movable ="true" >
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame6"  movable ="true" >
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame7"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame8"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame9"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame10"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>

					<Frame name ="DGVScrollFrame11"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
                    <Frame name ="DGVScrollFrame12"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
                    <Frame name ="DGVScrollFrame13"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
                    <Frame name ="DGVScrollFrame14"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
                    <Frame name ="DGVScrollFrame15"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
					<Frame name ="DGVScrollFrame16"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
                    <Frame name ="DGVScrollFrame17"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>
                    <Frame name ="DGVScrollFrame18"  movable ="true" visible="true">
						<Size x="350" y="356"/>
					</Frame>

					<Button name="$parentHomeTab" inherits="TopTabTemplate" frameLevel="100" text="Home" parentKey="homeTab">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="20" y="-40"/>
						</Anchors>
					</Button>
					<Button name="$parentCurrentGuideTab" inherits="TopTabTemplate" frameLevel="101"  text="Current Guide" parentKey="currentGuideTab">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parentHomeTab" relativePoint="BOTTOMRIGHT" x="32" y="0"/>
						</Anchors>
					</Button>
					<CheckButton name="$parentSettingsTab" inherits="UIPanelSquareButton" frameLevel="102"  parentKey="settingsTab">
						<Size x="30" y="30"/>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parentCurrentGuideTab" relativePoint="BOTTOMRIGHT" x="18" y="0"/>
						</Anchors>
						<Layers>
							<Layer level="ARTWORK" textureSubLevel="1">
								<Texture name="$parentArt" file="Interface\Buttons\UI-OptionsButton" parentKey="art">
									<Size x="18" y="18"/>
									<Anchors>
										<Anchor point="CENTER" x="0" y="0"/>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
						<CheckedTexture file="Interface\Buttons\CheckButtonGlow" alphaMode="ADD">
							<TexCoords left="0.1" right="0.9" top="0.1" bottom="0.9"/>
						</CheckedTexture>
						<Scripts>
							<OnShow>
								self.icon:Hide()
							</OnShow>
							<OnClick>
								if not self.tabInfo then
									return
								end
								DugisGuideViewer.DeselectTopTabs()
								self:SetChecked(true)
								self.tabInfo:Activate()
								LuaUtils:PlaySound("igCharacterInfoTab");
                                DugisGuideViewer.currentTabText = "Settings"
                                DugisGuideViewer:UpdateCurrentGuideExpanded()
                                StaticPopup_Hide("SCORES_IMPORT_DIALOG")
							</OnClick>
						</Scripts>
					</CheckButton>

					<!--<Button name="$parentScrollDownButton" inherits="UIPanelScrollDownButtonTemplate">
						<Size x="32" y="32"/>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentTier" relativePoint="RIGHT" x="10" y="0"/>
						</Anchors>
						<Scripts>
							<OnClick>
								LuaUtils:PlaySound("igMainMenuOptionCheckBoxOn");
								ToggleDropDownMenu(1, nil, EJTierDropDown, self:GetName(), 74, 15);
							</OnClick>
						</Scripts>
						<NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"/>
						<PushedTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down"/>
						<DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>-->

					<Frame name="$parentLeftFrameHost" parentKey="leftFrameHost"  >
						<Size x="350"/>
						<Anchors>
							<Anchor point="TOPLEFT" y="-44"/>
							<Anchor point="BOTTOM"/>
						</Anchors>
					</Frame>



                    <Frame name ="CurrentGuideTabContent"  movable ="true" visible="true">
						<Size x="350" y="356"/>

                        <Frames>
                            <ScrollFrame name="DugisMainLeftScrollFrame" parentKey="leftScroll" inherits="UIPanelScrollFrameCodeTemplate" visible="true">
                                <Frames>
                                    <Slider name="$parentScrollBar" inherits="MinimalScrollBarTemplate" parentKey="bar">
                                        <Anchors>
                                            <Anchor point="TOPRIGHT" x="25" y="-14"/>
                                            <Anchor point="BOTTOMRIGHT" x="25" y="20"/>
                                        </Anchors>
                                        <Scripts>
                                            <OnLoad>
                                                self.trackBG:SetVertexColor(0.2, 0.13, 0.08, 0);
                                            </OnLoad>
                                        </Scripts>
                                    </Slider>
                                </Frames>
                                <Scripts>
                                    <OnMouseWheel>
                                        if Dugis_OnMouseWheel then
                                            Dugis_OnMouseWheel(self, delta);
                                        end
                                    </OnMouseWheel>
                                </Scripts>
                                <Layers>
                                    <Layer level="ARTWORK" >
                                        <Texture file="Interface\Buttons\UI-OptionsButton" parentKey="currentGuideIcon">
                                            <Size x="32" y="32"/>
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="23" y="10"/>
                                            </Anchors>
                                        </Texture>
                                        <FontString parentKey="guideType" inherits="QuestFont_Super_Huge" justifyH="LEFT" hidden="false" text="">
                                            <Anchors>
                                                <Anchor point="TOPLEFT" x="48" y="-10"/>
                                            </Anchors>
                                            <Color r="0.961" g="0.824" b="0.412"/>
                                        </FontString>
                                    </Layer>
                                </Layers>

                            </ScrollFrame>
                        </Frames>
					</Frame>



					<Frame name="$parentRightFrameHost" parentKey="rightFrameHost">
						<Anchors>
							<Anchor point="TOPLEFT" x="375" y="-44"/>
							<Anchor point="BOTTOMRIGHT" x="-25" />
						</Anchors>
					</Frame>

					<ScrollFrame name="$parentRightScrollFrame" parentKey="rightScroll" inherits="UIPanelScrollFrameCodeTemplate" visible="false">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentRightFrameHost"/>
							<Anchor point="LEFT" relativeTo="$parentRightFrameHost"/>
							<Anchor point="RIGHT" relativeTo="$parentRightFrameHost"/>
							<Anchor point="BOTTOM" relativeTo="$parentRightFrameHost"/>
						</Anchors>
						<Frames>
							<Slider name="$parentScrollBar" inherits="MinimalScrollBarTemplate" parentKey="bar">
								<Anchors>
									<Anchor point="TOPRIGHT" x="25" y="-14"/>
									<Anchor point="BOTTOMRIGHT" x="25" y="-10"/>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.trackBG:SetVertexColor(0.2, 0.13, 0.08, 0);
									</OnLoad>
								</Scripts>
							</Slider>
						</Frames>
						<Scripts>
							<OnMouseWheel>
                                if Dugis_OnMouseWheel then
                                    Dugis_OnMouseWheel(self, delta);
                                end
							</OnMouseWheel>	
                            
                            <OnVerticalScroll>
                                DugisGuideViewer.UpdateGuideVisualRows()
							</OnVerticalScroll>
						</Scripts>
					</ScrollFrame>

					<Button name="DugisResetButton" inherits="UIPanelButtonTemplate"  frameLevel="100" text="Reset" hidden="false">
						<Size>
							<AbsDimension x="70" y="23"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="DugisMainRightFrameHost">
								<Offset>
									<AbsDimension x="13" y="3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>DugisGuideViewer.ResetButtonOnClick()</OnClick>
						</Scripts>
					</Button>
					<Button name="DugisReloadButton" inherits="UIPanelButtonTemplate"  frameLevel="101" text="Reload" hidden="false">
						<Size>
							<AbsDimension x="70" y="23"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="DugisResetButton" relativePoint ="RIGHT" >
								<Offset>
									<AbsDimension x="2" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>DugisGuideViewer.ReloadButtonOnClick()</OnClick>
						</Scripts>
					</Button>
					<Button name = "DugisPercentButton"  hidden="false">
						<Size>
							<AbsDimension x="100" y="20"/>
						</Size>
						<Layers>
							<Layer >
								<FontString name="$parentName" inherits="GameFontNormal" wraponspaces="false" justifyH="LEFT" > <!--GameFontHighlight-->
									<Size>
									<AbsDimension x="114" y="20"/>
									</Size>
									<Anchors>
									<Anchor point="BOTTOMRIGHT" relativeTo="DugisMain" relativePoint ="BOTTOMRIGHT" >
									<Offset>
									<AbsDimension x="-20" y="4"/>
									</Offset>
									</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</Button>
                    <Button name="CurrentGuideExpandButton" hidden="false" frameStrata="DIALOG" frameLevel="100">
                        <Size x="32" y="32"/>
                        <Anchors>
                            <Anchor point="BOTTOMLEFT" relativeTo="DugisMainRightFrameHost" x="-52" y="-1"/>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                DugisGuideViewer:ToggleCurrentGuide()
                            </OnClick>
                        </Scripts>
                        <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
                        <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
                        <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
                        <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
                    </Button>
					<Button name = "DugisPreloadButton" inherits="UIPanelButtonTemplate" text = "Preload" hidden="true">
						 <Size>
							<AbsDimension x="95" y="23"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="DugisMainRightFrameHost">
								<Offset>
									<AbsDimension x="13" y="3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>DugisGuideViewer:PreloadButtonOnClick()</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
		</Frames>
		<Scripts> <!--Mainframe scripts-->
			<OnLoad>
                tinsert(UISpecialFrames,self:GetName());self:SetClampedToScreen(true);
            </OnLoad>
			<OnMouseDown> self:StartMoving();  </OnMouseDown>
			<OnMouseUp>  self:StopMovingOrSizing(); </OnMouseUp>
			<OnDragStop> self:StopMovingOrSizing(); </OnDragStop>
		</Scripts>
	</Frame>
	
	<Frame name="DugisRecordFrame" parent='UIParent' movable ="true" visible="false" inherits="BackdropTemplate">
		<Size x="840" y="400"/>
		<Anchors>
            <Anchor point="CENTER" x="0" y="0"/>
        </Anchors>
		<Frames>
			<ScrollFrame name="$parentScrollFrame" parentKey="scroll" inherits="UIPanelScrollFrameCodeTemplate" visible="false">
				<Size x="840" y="360"/>
				<Anchors>
                       <Anchor point="CENTER" />
                </Anchors>
				<Frames>
					<Slider name="$parentScrollBar" inherits="MinimalScrollBarTemplate" parentKey="bar">
						<Anchors>
							<Anchor point="TOPRIGHT" x="-10" y="-10"/>
							<Anchor point="BOTTOMRIGHT" x="-10" y="10"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.trackBG:SetVertexColor(0.2, 0.13, 0.08, 0);
							</OnLoad>
						</Scripts>
					</Slider>
				</Frames>
				<ScrollChild >
					<Frame parentKey="child">
						<Size x="550" y="360"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="DugisRecordFrame"/>
						</Anchors>
					</Frame>
				</ScrollChild>
				<Scripts>
					<OnMouseWheel>
                        if Dugis_OnMouseWheel then
                            Dugis_OnMouseWheel(self, delta);
                        end
					</OnMouseWheel>
				</Scripts>
			</ScrollFrame>
		</Frames>
		<Scripts>
			<OnLoad> tinsert(UISpecialFrames,self:GetName());self:SetClampedToScreen(true); </OnLoad>
			<OnMouseDown> self:StartMoving();  </OnMouseDown>
			<OnMouseUp>  self:StopMovingOrSizing(); </OnMouseUp>
			<OnDragStop> self:StopMovingOrSizing(); </OnDragStop>
		</Scripts>
	</Frame>


	<Frame name = "DGVCurrentGuideFrame">
		<Size x="400" y="10000"/>
	</Frame>

	<Button name="DugisSecureQuestButtonTemplate" inherits="SecureActionButtonTemplate" virtual='true'>
		<Size x="26" y="26"/>
        <Layers>
            <Layer level="ARTWORK">
                <FontString parentKey="HotKey" inherits="NumberFontNormalSmallGray" justifyH="LEFT" text="">
                    <Size x="29" y="10"/>
                    <Anchors>
                        <Anchor point="TOPRIGHT" x="16" y="-2"/>
                    </Anchors>
                </FontString>
            </Layer>
			<Layer level="BORDER">
                <Texture parentKey="icon"/>
                <FontString parentKey="Count" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
                    <Anchors>
                        <Anchor point="BOTTOMRIGHT" x="-3" y="2"/>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <Cooldown parentKey="Cooldown" inherits="CooldownFrameTemplate"/>
        </Frames>
        <Scripts>
            <OnEvent>
                if DugisGuideViewer.Dugi_ItemButton_OnEvent then
                    DugisGuideViewer.Dugi_ItemButton_OnEvent(self, event, ...)
                end
			</OnEvent>
            <OnUpdate>
				if not self.questLogIndex then return end
				DugisGuideViewer.Dugi_ItemButton_OnUpdate(self, elapsed)
			</OnUpdate>
            <OnShow>
				self:RegisterEvent("PLAYER_TARGET_CHANGED")
				self:RegisterEvent("BAG_UPDATE_COOLDOWN")
			</OnShow>
            <OnHide>
				self:UnregisterEvent("PLAYER_TARGET_CHANGED")
				self:UnregisterEvent("BAG_UPDATE_COOLDOWN")
			</OnHide>
            <OnEnter>
				if not self.questLogIndex then return end
				GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
				GameTooltip:SetQuestLogSpecialItem(self.questLogIndex)
			</OnEnter>
            <OnLeave>
                GameTooltip:Hide();
            </OnLeave>
        </Scripts>
        <NormalTexture parentKey="NormalTexture" file="Interface\Buttons\UI-Quickslot2">
            <Size x="42" y="42"/>
            <Anchors>
                <Anchor point="CENTER"/>
            </Anchors>
        </NormalTexture>
        <PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
        <HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
	</Button>

    <Button name="DugisTargetButtonTemplate" inherits="SecureActionButtonTemplate" virtual='true' frameStrata="MEDIUM"  frameLevel = "3" >
        <Layers>
            <Layer level="ARTWORK">
                <FontString parentKey="HotKey" inherits="NumberFontNormalSmallGray" justifyH="LEFT" text="">
                    <Size x="29" y="10"/>
                    <Anchors>
                        <Anchor point="TOPRIGHT" x="16" y="-2"/>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
	</Button>

	<Button name="DugisSecureQuestButton" inherits="DugisSecureQuestButtonTemplate" parent="UIParent"  frameStrata="MEDIUM"  frameLevel = "3">
	</Button>

    <Script file="TutorialFrameDugis.lua"/>
    <Frame name="TutorialFrameDugis" toplevel="true" parent="UIParent" movable="true" clampedToScreen="true" enableMouse="true" frameLevel="100" frameStrata="TOOLTIP" hidden="true" inherits="BackdropTemplate" propagateKeyboardInput="true">
        <Animations>
            <AnimationGroup name="AnimateMouseDugis" looping="BOUNCE">
                <Alpha target="TutorialFrameDugisMouse" change="1" duration="0.8" smoothing="IN_OUT"/>
            </AnimationGroup>
            <AnimationGroup name="AnimateCalloutA" looping="BOUNCE">
                <Alpha target="TutorialFrameCallOut" change="-0.5" duration="0.8" smoothing="IN_OUT"/>
            </AnimationGroup>
        </Animations>
        <Anchors>
            <Anchor point="BOTTOM" x="0" y="100"/>
        </Anchors>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture name="TutorialFrameDugiTexture">
                    <Color a="1.0" r="1" g="1" b="1" />
                    <Anchors>
                        <Anchor point="TOPLEFT" x="5" y="-5" />
                        <Anchor point="BOTTOMRIGHT" x="-5" y="3" />
                    </Anchors>
                </Texture>
            </Layer>

            <Layer level="ARTWORK">
                <Texture name="$parentMouseLeftClick" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="76" y="101"/>
                    <TexCoords left="0.0019531" right="0.1484375" top="0.4257813" bottom="0.6210938"/>
                </Texture>
                <Texture name="$parentMouseRightClick" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="76" y="101"/>
                    <TexCoords left="0.0019531" right="0.1484375" top="0.6269531" bottom="0.8222656"/>
                </Texture>
                <Texture name="$parentMouseBothClick" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="76" y="101"/>
                    <TexCoords left="0.1542969" right="0.3007813" top="0.2246094" bottom="0.4199219"/>
                </Texture>
                <Texture name="$parentMouseWheel" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="76" y="101"/>
                    <TexCoords left="0.0019531" right="0.1484375" top="0.2246094" bottom="0.4199219"/>
                </Texture>

                <Texture name="$parentArrowUp" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="68" y="89"/>
                    <TexCoords left="0.1542969" right="0.2851563" top="0.6269531" bottom="0.7988281"/>
                </Texture>
                <Texture name="$parentArrowDown" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="68" y="89"/>
                    <TexCoords left="0.1542969" right="0.2851563" top="0.7988281" bottom="0.6269531"/>
                </Texture>
                <Texture name="$parentArrowRight" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="89" y="68"/>
                    <TexCoords left="0.3066406" right="0.4785156" top="0.2246094" bottom="0.3554688"/>
                </Texture>
                <Texture name="$parentArrowLeft" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="89" y="68"/>
                    <TexCoords left="0.4785156" right="0.3066406" top="0.2246094" bottom="0.3554688"/>
                </Texture>

                <Texture name="$parentArrowCurveUpRight" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="66" y="81"/>
                    <TexCoords left="0.3066406" right="0.4335938" top="0.3613281" bottom="0.5175781"/>
                </Texture>
                <Texture name="$parentArrowCurveUpLeft" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="66" y="81"/>
                    <TexCoords left="0.4335938" right="0.3066406" top="0.3613281" bottom="0.5175781"/>
                </Texture>
                <Texture name="$parentArrowCurveDownRight" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="66" y="81"/>
                    <TexCoords left="0.3066406" right="0.4335938" top="0.5175781" bottom="0.3613281"/>
                </Texture>
                <Texture name="$parentArrowCurveDownLeft" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="66" y="81"/>
                    <TexCoords left="0.4335938" right="0.3066406" top="0.5175781" bottom="0.3613281"/>
                </Texture>

                <Texture name="$parentArrowCurveRightDown" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="82" y="66"/>
                    <TexCoords left="0.4843750" right="0.6425781" top="0.2246094" bottom="0.3515625"/>
                </Texture>
                <Texture name="$parentArrowCurveRightUp" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="82" y="66"/>
                    <TexCoords left="0.4843750" right="0.6425781" top="0.3515625" bottom="0.2246094"/>
                </Texture>
                <Texture name="$parentArrowCurveLeftDown" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="82" y="66"/>
                    <TexCoords left="0.6425781" right="0.4843750" top="0.2246094" bottom="0.3515625"/>
                </Texture>
                <Texture name="$parentArrowCurveLeftUp" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="82" y="66"/>
                    <TexCoords left="0.6425781" right="0.4843750" top="0.3515625" bottom="0.2246094"/>
                </Texture>

                <FontString name="$parentTitle" inherits="GameFontHighlight" justifyH="LEFT" justifyV="TOP">
                    <Anchors>
                        <Anchor point="TOP" x="15" y="-22"/>
                    </Anchors>
                    <Color r="1.0" g="0.82" b="0"/>
                </FontString>
            </Layer>
            <Layer level="OVERLAY">
                <Texture name="TutorialFrameDugisMouse" file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <Size x="76" y="101"/>
                    <TexCoords left="0.1542969" right="0.3007813" top="0.4257813" bottom="0.6210938"/>
                    <Color r="1.0" g="1.0" b="1.0" a="0.0"/>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Frame name="Tutorial_PointerUp" virtual="true">
                <Size x="64" y="64" />
                <Anchors>
                    <Anchor point="TOP" y="0" />
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture atlas="NPE_ArrowUp" />
                    </Layer>
                    <Layer level="OVERLAY">
                        <Texture atlas="NPE_ArrowUpGlow" alpha="0.75" alphaMode="ADD" />
                    </Layer>
                </Layers>
                <Animations>
                    <AnimationGroup parentKey="Anim" ignoreFramerateThrottle="1">
                        <Translation offsetY="50" duration="1" order="1" smoothing="OUT"/>
                        <Alpha fromAlpha="0" toAlpha="1" duration="0.1" order="1"/>
                        <Alpha fromAlpha="1" toAlpha="0" duration="0.9" startDelay="0.1" order="1"/>
                        <Scripts>
                            <OnFinished>
                                self:Play();
                            </OnFinished>
                        </Scripts>
                    </AnimationGroup>
                </Animations>
            </Frame>
            <Frame name="Tutorial_PointerLeft" virtual="true">
                <Size x="64" y="64" />
                <Anchors>
                    <Anchor point="LEFT" x="0" />
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture atlas="NPE_ArrowLeft" />
                    </Layer>
                    <Layer level="OVERLAY">
                        <Texture atlas="NPE_ArrowLeftGlow" alpha="0.75" alphaMode="ADD" />
                    </Layer>
                </Layers>
                <Animations>
                    <AnimationGroup parentKey="Anim" ignoreFramerateThrottle="1">
                        <Translation offsetX="-50" duration="1" order="1" smoothing="OUT"/>
                        <Alpha fromAlpha="0" toAlpha="1" duration="0.1" order="1"/>
                        <Alpha fromAlpha="1" toAlpha="0" duration="0.9" startDelay="0.1" order="1"/>
                        <Scripts>
                            <OnFinished>
                                self:Play();
                            </OnFinished>
                        </Scripts>
                    </AnimationGroup>
                </Animations>
            </Frame>
            <Frame name="Tutorial_PointerDown" virtual="true">
                <Size x="64" y="64" />
                <Anchors>
                    <Anchor point="BOTTOM" y="0" />
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture atlas="NPE_ArrowDown" />
                    </Layer>
                    <Layer level="OVERLAY">
                        <Texture atlas="NPE_ArrowDownGlow" alpha="0.75" alphaMode="ADD" />
                    </Layer>
                </Layers>
                <Animations>
                    <AnimationGroup parentKey="Anim" ignoreFramerateThrottle="1">
                        <Translation offsetY="-50" duration="1" order="1" smoothing="OUT"/>
                        <Alpha fromAlpha="0" toAlpha="1" duration="0.1" order="1"/>
                        <Alpha fromAlpha="1" toAlpha="0" duration="0.9" startDelay="0.1" order="1"/>
                        <Scripts>
                            <OnFinished>
                                self:Play();
                            </OnFinished>
                        </Scripts>
                    </AnimationGroup>
                </Animations>
            </Frame>
            <Frame name="Tutorial_PointerRight" virtual="true">
                <Size x="64" y="64" />
                <Anchors>
                    <Anchor point="RIGHT" y="0" />
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture atlas="NPE_ArrowRight" />
                    </Layer>
                    <Layer level="OVERLAY">
                        <Texture atlas="NPE_ArrowRightGlow" alpha="0.75" alphaMode="ADD" />
                    </Layer>
                </Layers>
                <Animations>
                    <AnimationGroup parentKey="Anim" ignoreFramerateThrottle="1">
                        <Translation offsetX="50" duration="1" order="1" smoothing="OUT"/>
                        <Alpha fromAlpha="0" toAlpha="1" duration="0.1" order="1"/>
                        <Alpha fromAlpha="1" toAlpha="0" duration="0.9" startDelay="0.1" order="1"/>
                        <Scripts>
                            <OnFinished>
                                self:Play();
                            </OnFinished>
                        </Scripts>
                    </AnimationGroup>
                </Animations>
            </Frame>
            <Frame parentKey="Content" name="$parentContent" clampedToScreen="true" inherits="GlowBoxTemplate" >
                <Size x="240" y="100" />
                <Layers>
                    <Layer level="ARTWORK">
                        <FontString parentKey="Text" setAllPoints="true" inherits="GameFontNormalLarge" justifyH="LEFT">
                            <Size x="200" />
                            <Anchors>
                                <Anchor point="CENTER" />
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>


            <Frame parentKey="Glow">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeKey="$parent" x="-13" y="9"/>
                    <Anchor point="BOTTOMRIGHT" relativeKey="$parent" x="13" y="-11"/>
                </Anchors>
                <Animations>
                    <AnimationGroup looping="BOUNCE">
                        <Alpha fromAlpha="0.25" toAlpha="1" duration="0.5" />
                        <Scripts>
                            <OnLoad>
                                self:Play();
                            </OnLoad>
                        </Scripts>
                    </AnimationGroup>
                </Animations>
                <Backdrop edgeFile="Interface\TutorialFrame\UI-TutorialFrame-CalloutGlow" alphaMode="ADD">
                    <EdgeSize val="25"/>
                </Backdrop>
            </Frame>
            <Frame parentKey="Glow1">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeKey="$parent" x="-13" y="9"/>
                    <Anchor point="BOTTOMRIGHT" relativeKey="$parent" x="13" y="-11"/>
                </Anchors>
                <Animations>
                    <AnimationGroup looping="BOUNCE">
                        <Alpha fromAlpha="0" toAlpha="0.2" duration="0.5" />
                        <Scripts>
                            <OnLoad>
                                self:Play();
                            </OnLoad>
                        </Scripts>
                    </AnimationGroup>
                </Animations>
                <Backdrop edgeFile="Interface\TutorialFrame\UI-TutorialFrame-CalloutGlow" alphaMode="ADD">
                    <EdgeSize val="35"/>
                </Backdrop>
            </Frame>



            <!--

            <Frame parentKey="ArrowA_UP1" hidden="true" inherits="Tutorial_PointerUp" frameLevel="100"/>
            <Frame parentKey="ArrowA_UP2" hidden="true" inherits="Tutorial_PointerUp" frameLevel="100"/>
            <Frame parentKey="ArrowA_DOWN1" hidden="true" inherits="Tutorial_PointerDown" frameLevel="100"/>
            <Frame parentKey="ArrowA_DOWN2" hidden="true" inherits="Tutorial_PointerDown" frameLevel="100"/>
            <Frame parentKey="ArrowA_LEFT1" hidden="true" inherits="Tutorial_PointerLeft" frameLevel="100"/>
            <Frame parentKey="ArrowA_LEFT2" hidden="true" inherits="Tutorial_PointerLeft" frameLevel="100"/>
            <Frame parentKey="ArrowA_RIGHT1" hidden="true" inherits="Tutorial_PointerRight" frameLevel="100"/>
            <Frame parentKey="ArrowA_RIGHT2" hidden="true" inherits="Tutorial_PointerRight" frameLevel="100"/>
                    -->


            <Frame name="TutorialATextBorder" frameStrata="TOOLTIP" hidden="true">
                <Layers>
                    <Layer level="OVERLAY">
                        <Texture name="tomtestA" setAllPoints="true">
                            <Color r="1.0" g="0" b="0"/>
                        </Texture>
                    </Layer>
                </Layers>
            </Frame>
            <Frame name="$parentCallOut" frameStrata="TOOLTIP" frameLevel="99" hidden="true">
                <Animations>
                    <AnimationGroup looping="BOUNCE">
                        <Alpha name="$parentPulser" change="-.7" duration=".75"/>
                    </AnimationGroup>
                </Animations>
                <Backdrop edgeFile="Interface\TutorialFrame\UI-TutorialFrame-CalloutGlow" alphaMode="ADD">
                    <EdgeSize>
                        <AbsValue val="16"/>
                    </EdgeSize>
                </Backdrop>
            </Frame>

            <Button name="$parentOkayButton">
                <Size>
                    <AbsDimension x="108" y="22"/>
                </Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT">
                        <Offset>
                            <AbsDimension x="-9" y="13"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        DugisGuideViewer.TFD.TutorialFrameDugis_Hide()
                    </OnClick>
                </Scripts>
                <NormalTexture inherits="DialogButtonNormalTexture"/>
                <PushedTexture inherits="DialogButtonPushedTexture"/>
                <HighlightTexture inherits="DialogButtonHighlightTexture"/>
                <ButtonText text="CLOSE"/>
                <NormalFont style="GameFontNormal"/>
                <HighlightFont style="GameFontHighlight"/>
            </Button>

             <Button name="$parentOkayButton" parentKey="YesButton">
                <Size>
                    <AbsDimension x="58" y="22"/>
                </Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT">
                        <Offset>
                            <AbsDimension x="-179" y="23"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                       DugisGuideViewer.TFD.TutorialFrameDugis_NewTutorial(2, true)
                    </OnClick>
                </Scripts>
                <NormalTexture inherits="DialogButtonNormalTexture"/>
                <PushedTexture inherits="DialogButtonPushedTexture"/>
                <HighlightTexture inherits="DialogButtonHighlightTexture"/>
                <ButtonText text="Yes"/>
                <NormalFont style="GameFontNormal"/>
                <HighlightFont style="GameFontHighlight"/>
            </Button>
             <Button name="$parentOkayButton" parentKey="NoButton">
                <Size>
                    <AbsDimension x="58" y="22"/>
                </Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT">
                        <Offset>
                            <AbsDimension x="-110" y="23"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        DugisGuideViewer.TFD.TutorialFrameDugis_Hide(true)
                    </OnClick>
                </Scripts>
                <NormalTexture inherits="DialogButtonNormalTexture"/>
                <PushedTexture inherits="DialogButtonPushedTexture"/>
                <HighlightTexture inherits="DialogButtonHighlightTexture"/>
                <ButtonText text="No"/>
                <NormalFont style="GameFontNormal"/>
                <HighlightFont style="GameFontHighlight"/>
            </Button>
            <Button name="$parentPrevButton">
                <Size x="26" y="26"/>
                <Anchors>
                    <Anchor point="BOTTOMLEFT" x="30" y="10"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString inherits="GameFontHighlightSmall" justifyH="LEFT" text="PREV">
                            <Size x="60" y="10"/>
                            <Anchors>
                                <Anchor point="LEFT" relativePoint="RIGHT"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnClick>
                        DugisGuideViewer.TFD.TutorialFrameDugisPrevButton_OnClick(self);
                    </OnClick>
                </Scripts>
                <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
                <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
                <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
                <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
            </Button>
            <Button name="$parentNextButton">
                <Size x="26" y="26"/>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" x="-132" y="10"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString inherits="GameFontHighlightSmall" justifyH="RIGHT" text="NEXT">
                            <Size x="60" y="10"/>
                            <Anchors>
                                <Anchor point="RIGHT" relativePoint="LEFT"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                    <OnClick>
                        DugisGuideViewer.TFD.TutorialFrameDugisNextButton_OnClick(self);
                    </OnClick>
                </Scripts>
                <NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
                <PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
                <DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
                <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
            </Button>
            <PlayerModel name="TutorialANPCModel" hidden="true">
                <Size x="300" y="220"/>
                <Anchors>
                    <Anchor point="TOP" x="0" y="-35"/>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        self:SetPortraitZoom(0.6);
                        self:SetRotation(0);
                        self:RegisterEvent("DISPLAY_SIZE_CHANGED");
                    </OnLoad>
                    <OnEvent>
                        self:RefreshUnit();
                    </OnEvent>
                </Scripts>
            </PlayerModel>
        </Frames>
        <Scripts>
            <OnLoad> DugisGuideViewer.TFD.TutorialFrameDugis_OnLoad(self) </OnLoad>
            <OnEvent> DugisGuideViewer.TFD.TutorialFrameDugis_OnEvent(self) </OnEvent>
            <OnShow> DugisGuideViewer.TFD.TutorialFrameDugis_OnShow(self) </OnShow>
            <OnHide> DugisGuideViewer.TFD.TutorialFrameDugis_OnHide(self) </OnHide>
            
            <OnKeyDown> DugisGuideViewer.TFD.TutorialFrameDugis_OnKeyDown(self, key) </OnKeyDown>
            <OnMouseDown> DugisGuideViewer.TFD.TutorialFrameDugis_OnMouseDown(self, button) </OnMouseDown>
        </Scripts>
    </Frame>
    <Button name="TutorialFrameDugisAlertButton" parent="UIParent" frameStrata="DIALOG" hidden="true" >
        <Size x="116" y="71"/>
        <Anchors>
            <Anchor point="BOTTOM" x="0" y="0"/>
        </Anchors>
        <Scripts>
            <OnLoad>
                self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
            </OnLoad>
        </Scripts>
        <NormalTexture file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
            <TexCoords left="0.7167969" right="0.9414063" top="0.0019531" bottom="0.1386719"/>
        </NormalTexture>
        <HighlightTexture file="Interface\TutorialFrame\UI-TUTORIAL-FRAME" alphaMode="ADD">
            <Size x="51" y="50"/>
            <Anchors>
                <Anchor point="CENTER" x="2" y="4"/>
            </Anchors>
            <TexCoords left="0.7558594" right="0.853515625" top="0.2246094" bottom="0.3203125"/>
        </HighlightTexture>
    </Button>
    <Frame name="TutorialFrameDugisAlertButtonBadge" frameStrata="TOOLTIP" hidden="true">
        <Size x="53" y="52"/>
        <Anchors>
            <Anchor point="CENTER" relativeTo="TutorialFrameDugisAlertButton" x="30" y="20"/>
        </Anchors>
        <Layers>
            <Layer level="OVERLAY">
                <Texture file="Interface\TutorialFrame\UI-TUTORIAL-FRAME">
                    <TexCoords left="0.6484375" right="0.7500000" top="0.2246094" bottom="0.3242188"/>
                </Texture>
                <FontString name="TutorialFrameDugisAlertButtonBadgeText" inherits="GameFontNormal" justifyH="CENTER" justifyV="MIDDLE" hidden="true">
                    <Anchors>
                        <Anchor point="CENTER" relativeTo="TutorialFrameDugisAlertButtonBadge" x="0" y="1"/>
                    </Anchors>
                    <Color r="1.0" g="1.0" b="1.0"/>
                </FontString>
            </Layer>
        </Layers>
    </Frame>
    <StatusBar name="DugisStatusBarTemplate"   virtual="true">
        <Size x="122" y="10"/>
        <Anchors>
        <Anchor point="TOPLEFT" x="102" y="19"/>
        </Anchors>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture name="$parentBG">
                <Anchors>
                    <Anchor point="TOPLEFT"/>
                    <Anchor point="BOTTOMRIGHT"/>
                </Anchors>
                <Color r="0" g="0" b="0" a=".4"/>
                </Texture>
            </Layer>
            <Layer level="OVERLAY">
                <FontString name="$parentText" inherits="GameFontHighlightSmall" text="" justifyV="TOP" parentKey="text">
                <Size x="0" y="0"/>
                <Anchors>
                    <Anchor point="CENTER" x="0" y="0"/>
                </Anchors>
                </FontString>
            </Layer>
            <Layer level="ARTWORK">
                <Texture name="$parentBorderLeft" file="Interface\AchievementFrame\UI-Achievement-ProgressBar-Border">
                    <Size x="16" y="0"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="-6" y="5"/>
                        <Anchor point="BOTTOMLEFT" x="-6" y="-5"/>
                    </Anchors>
                    <TexCoords left="0" right="0.0625" top="0" bottom="0.75"/>
                </Texture>
                <Texture name="$parentBorderRight" file="Interface\AchievementFrame\UI-Achievement-ProgressBar-Border">
                    <Size x="16" y="0"/>
                    <Anchors>
                        <Anchor point="TOPRIGHT" x="6" y="5"/>
                        <Anchor point="BOTTOMRIGHT" x="6" y="-5"/>
                    </Anchors>
                    <TexCoords left="0.812" right="0.8745" top="0" bottom="0.75"/>
                </Texture>
                <Texture name="$parentBorderCenter" file="Interface\AchievementFrame\UI-Achievement-ProgressBar-Border">
                    <Size x="16"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentBorderLeft" relativePoint="TOPRIGHT"/>
                        <Anchor point="BOTTOMRIGHT" relativeTo="$parentBorderRight" relativePoint="BOTTOMLEFT"/>
                    </Anchors>
                    <TexCoords left="0.0625" right="0.812" top="0" bottom="0.75"/>
                </Texture>
            </Layer>
        </Layers>
        <Scripts>
            <OnLoad>
                self:SetStatusBarColor(0, .6, 0, 1);
                self:SetMinMaxValues(0, 100);
                self:SetValue(0);
                self:GetStatusBarTexture():SetDrawLayer("BORDER");
            </OnLoad>
        </Scripts>
        <BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
    </StatusBar>
    <Button name="GearFinderMoreTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="16" y="32"/>
		</Size>
		<Anchors>
			<Anchor point="LEFT" relativePoint="RIGHT"/>
		</Anchors>
		<Scripts>


		</Scripts>
		<NormalTexture file="Interface\PaperDollInfoFrame\UI-GearManager-FlyoutButton"/>
		<HighlightTexture file="Interface\PaperDollInfoFrame\UI-GearManager-FlyoutButton"/>
	</Button>
    
    <!--  SimpleHTML with improved hovering.  inherits="SimpleHTML"  Cannot inherit from SimpleHTML anymore -->
    <SimpleHTML name="InteractiveSimpleHTML"  enableMouse='false'  virtual="true">
        <Scripts>
            <OnLoad>
                local parent = self:GetParent()
                self.iconsFrame = CreateFrame("SimpleHTML",nil, parent)

                self.iconsFrame:SetFontObject(GameFontHighlight)
                self.iconsFrame:SetWidth(282)
                self.iconsFrame:SetHeight(510)
                self.iconsFrame:SetJustifyH("CENTER")
                self.iconsFrame:SetJustifyV("TOP")    
                self.iconsFrame:SetPoint("TOPLEFT", parent, "TOPLEFT", 0, -0) 
                self.iconsFrame:SetSpacing(2)
                
                --Make so only icons are visible. Text is hidden.
                self.iconsFrame:SetAlpha(0)
                
                self.iconsFrame:SetFrameLevel(self:GetFrameLevel() - 1)
                
                local buttonImage = "Interface\\AddOns\\DugisGuideViewerZ\\Artwork\\waypoint_16_t.tga"
                buttonImage = "Interface\\AddOns\\DugisGuideViewerZ\\Artwork\\waypoint_y_16_t.tga"
                
                function self:SetNewText(text)
                    text = text or ""
                    self.rawText = text
                    self:HighlightElement()
                end
                
                --elementId - if empty all icons will be unhighlighted
                --updateAlsoBaseText - if true then also base text (with transparent icons) will be updated.
                function self:HighlightElement(elementId, updateOnlyIconsHighlights)
                    
                    --Replacing mouse-hover interactive icons with transparent icon - to make for the top layer icons invisible.
                    local topText = self.rawText
                    topText = string.gsub(topText, "|NORMAL.-|e", "")
                    topText = string.gsub(topText, "|HOVER.-|e", "")
                    topText = string.gsub(topText, "|EMPTY.-|ID", "")
                    topText = string.gsub(topText, "|e", "")
                    
                    if not updateOnlyIconsHighlights then
                        self:SetText(topText)
                    end
                    
                    --Replacing mouse-hover interactive icons with highlighted or unhighlighted icon.
                    
                    elementId = tonumber(elementId)
                    local lowText = self.rawText
                    
                    --Showing hovered icons
                    lowText = string.gsub(lowText, "|EMPTY.-|e", "")
                    lowText = string.gsub(lowText, "|HOVER.-|e", function(text)
                        local id = string.gsub(text, "|ID.-|e", "")
                        id = string.gsub(id, "|HOVER", "")
                        id = tonumber(id)
                        if id and elementId and id == elementId then
                            text = string.gsub(text, "|HOVER.-|ID", "") 
                            text = string.gsub(text, "|e", "") 
                            return text
                        end
                        return ""
                    end)
                    
                    --Showing normal state icons
                    lowText = string.gsub(lowText, "|NORMAL.-|e", function(text)
                        local id = string.gsub(text, "|ID.-|e", "")
                        id = string.gsub(id, "|NORMAL", "")
                        id = tonumber(id)
                        if not (id and elementId and id == elementId) then
                            text = string.gsub(text, "|NORMAL.-|ID", "") 
                            text = string.gsub(text, "|e", "") 
                            return text
                        end
                        return ""
                    end)
                    
                    self.iconsFrame:SetText(lowText)
                end
                
                hooksecurefunc(self, "SetFontObject", function(frame, ...)  self.iconsFrame:SetFontObject(...) end)
                hooksecurefunc(self, "SetFont", function(frame, ...)  self.iconsFrame:SetFont(...) end)
                hooksecurefunc(self, "SetWidth", function(frame, ...)  self.iconsFrame:SetWidth(...) end)
                hooksecurefunc(self, "SetHeight", function(frame, ...)  self.iconsFrame:SetHeight(...) end)
                hooksecurefunc(self, "SetJustifyH", function(frame, ...)  self.iconsFrame:SetJustifyH(...) end)
                hooksecurefunc(self, "SetJustifyV", function(frame, ...)  self.iconsFrame:SetJustifyV(...) end)
                hooksecurefunc(self, "SetSpacing", function(frame, ...)  self.iconsFrame:SetSpacing(...) end)
                hooksecurefunc(self, "Show", function(frame, ...)  self.iconsFrame:Show(...) end)
                hooksecurefunc(self, "Hide", function(frame, ...)  self.iconsFrame:Hide(...) end)
                hooksecurefunc(self, "SetPoint", function(frame, ...)  self.iconsFrame:SetPoint(...) end)
                
                hooksecurefunc(self, "SetFrameLevel", function(frame, ...) 
                    self.iconsFrame:SetFrameLevel(self:GetFrameLevel() - 1) 
                end)
                
                self.iconsFrame:Show()
            </OnLoad>
        </Scripts>
    </SimpleHTML>  
	<Frame Name="HeaderMenuTemplate" hidden="true" virtual="true">
		<Size x="10" y="10"/>
		<Anchors>
			<Anchor point="TOPRIGHT"/>
		</Anchors>
		<Frames>
			<Button parentKey="MinimizeButton">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="0" y="-4"/>
				</Anchors>
				<NormalTexture file="Interface\Buttons\UI-Panel-QuestHideButton">
					<TexCoords left="0" right="0.5" top="0.5" bottom="1"/>
				</NormalTexture>
				<PushedTexture file="Interface\Buttons\UI-Panel-QuestHideButton">
					<TexCoords left="0.5" right="1" top="0.5" bottom="1"/>
				</PushedTexture>
				<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD" />
				<DisabledTexture file="Interface\Buttons\UI-Panel-QuestHideButton-disabled" />
			</Button>
		</Frames>
		<Layers>
			<Layer level="ARTWORK">
				<FontString parentKey="Title" inherits="GameFontNormal" hidden="false" text="OBJECTIVES_TRACKER_LABEL">
					<Anchors>
						<Anchor point="RIGHT" relativeKey="$parent.MinimizeButton" relativePoint="LEFT" x="-3" y="1"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>
    
    <Button Name="SmallFrameTabTemplate" hidden="true" virtual="true"  >
		<Size x="33" y="35"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\PaperDollInfoFrame\PaperDollSidebarTabs" parentKey="TabBg">
					<Size x="50" y="43"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="-9" y="-2"/>
					</Anchors>
					<TexCoords left="0.01562500" right="0.79687500" top="0.61328125" bottom="0.78125000"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture parentKey="Icon">
					<Size x="33" y="35"/>
					<Anchors>
						<Anchor point="BOTTOM" x="1" y="-2"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<Texture parentKey="Hider" file="Interface\PaperDollInfoFrame\PaperDollSidebarTabs">
					<Size x="34" y="19"/>
					<Anchors>
						<Anchor point="BOTTOM"/>
					</Anchors>
					<TexCoords left="0.01562500" right="0.54687500" top="0.11328125" bottom="0.18750000"/>
				</Texture>
			</Layer>
			<Layer level="HIGHLIGHT">
				<Texture parentKey="Highlight" file="Interface\PaperDollInfoFrame\PaperDollSidebarTabs">
					<Size x="31" y="31"/>	
					<Anchors>
						<Anchor point="TOPLEFT" x="2" y="-3"/>
					</Anchors>
					<TexCoords left="0.01562500" right="0.50000000" top="0.19531250" bottom="0.31640625"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
			</OnLoad>
			<OnEnable>
			</OnEnable>
			<OnDisable>
			</OnDisable>
			<OnEnter>
                DugisGuideViewer.SmallFrame.FadeInFadeOutTabs()
				GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
                if self.tab then
                    if self.tab.guide then
                        local title = DugisGuideViewer:GetFormattedTitle(self.tab.guide)
                        GameTooltip:SetText(title, 1, 1, 1);
                    else
                        GameTooltip:SetText("No Guide Loaded", 1, 1, 1);
                    end
                    
                    GameTooltip:AddLine("[Right click for more options]");
                end
				GameTooltip:Show();
			</OnEnter>
			<OnLeave>
                DugisGuideViewer.SmallFrame.FadeInFadeOutTabs()
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
	</Button>
    <Frame name="DugisProgressBarTemplate" virtual="true" hidden="true">
		<Size x="192" y="25"/>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Frames>
			<StatusBar parentKey="Bar" drawLayer="BACKGROUND" minValue="0" maxValue="100" defaultValue="0" enableMouse="true">
				<Size x="180" y="15"/>
				<Anchors>
					<Anchor point="RIGHT" x="15" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture parentKey="BorderLeft" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder">
							<Size x="9" y="22"/>
							<TexCoords left="0.007843" right="0.043137" top="0.193548" bottom="0.774193"/>
							<Anchors>
								<Anchor point="LEFT" x="-3" y="0"/>
							</Anchors>
						</Texture>
						<Texture parentKey="BorderRight" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder">
							<Size x="9" y="22"/>
							<TexCoords left="0.043137" right="0.007843" top="0.193548" bottom="0.774193"/>
							<Anchors>
								<Anchor point="RIGHT" x="3" y="0"/>
							</Anchors>
						</Texture>
						<Texture parentKey="BorderMid" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder">
							<TexCoords left="0.113726" right="0.1490196" top="0.193548" bottom="0.774193"/>
							<Anchors>
								<Anchor point="TOPLEFT" relativeKey="$parent.BorderLeft" relativePoint="TOPRIGHT"/>
								<Anchor point="BOTTOMRIGHT" relativeKey="$parent.BorderRight" relativePoint="BOTTOMLEFT"/>
							</Anchors>
						</Texture>
						<FontString parentKey="Label" inherits="GameFontHighlightMedium" justifyH="LEFT">
						  <Anchors>
							<Anchor point="CENTER" x="0" y="-1"/>
						  </Anchors>
						</FontString>
					</Layer>
					<Layer level="BACKGROUND" textureSubLevel="-1">
						<Texture>
							<Color r="0.04" g="0.07" b="0.18"/>
						</Texture>
					</Layer>
				</Layers>
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
				<BarColor r="0.26" g="0.42" b="1"/>
			</StatusBar>
		</Frames>
		<Scripts>
			<OnLoad>
				self.SetValue = function(self, percent)
					self.Bar:SetValue(percent);
					self.Bar.Label:SetFormattedText(PERCENTAGE_STRING, percent);
				end
			</OnLoad>
		</Scripts>
	</Frame>

	<Frame name="SmallFrameHeaderTemplate" virtual="true" hidden="true">
		<Size x="235" y="25"/>
		<Layers>
			<Layer level="ARTWORK">
				<Texture parentKey="Background" hidden="false" alpha="1" atlas="Objective-Header" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" x="-29" y="14"/>
					</Anchors>
				</Texture>
				<FontString parentKey="Text" inherits="GameFontNormalMed2" justifyH="LEFT">
					<Size x="200" y="16"/>
					<Anchors>
						<Anchor point="LEFT" x="4" y="-1"/>
					</Anchors>
				</FontString>
				<Texture parentKey="LineGlow" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_LineGlow" useAtlasSize="true">
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.Background" x="-50" y="18"/>
					</Anchors>
				</Texture>
				<Texture parentKey="SoftGlow" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_Glow" useAtlasSize="true">
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.Background" relativePoint="LEFT" x="20" y="20"/>
					</Anchors>
				</Texture>
				<Texture parentKey="StarBurst" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_StarBurst" useAtlasSize="true">
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.SoftGlow"/>
					</Anchors>
				</Texture>
				<Texture parentKey="LineSheen" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_LineBurst">
					<Size x="60" y="15"/>
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.SoftGlow" x="0" y="-13"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Animations>
			<AnimationGroup parentKey="HeaderOpenAnim" setToFinalAlpha="true">
				<Alpha childKey="Background" startDelay="0" duration="0" order="1" fromAlpha="0" toAlpha="0"/>
				<Alpha childKey="Background" startDelay="0.25" duration="0.5" order="1" fromAlpha="0" toAlpha="1"/>
				<Alpha childKey="LineGlow" duration="0.15" order="1" fromAlpha="0" toAlpha="1"/>
				<Alpha childKey="LineGlow" startDelay="0.25" duration="0.65" order="1" fromAlpha="1" toAlpha="0"/>
				<Scale childKey="LineGlow" duration="0.15" order="1" fromScaleX="0.1" fromScaleY="1.5" toScaleX="2" toScaleY="1.5">
					<Origin point="CENTER">
						<Offset x="-50" y="0"/>
					</Origin>
				</Scale>
				<Translation childKey="LineGlow" duration="0.75" order="1" offsetX="50" offsetY="0"/>
				<Alpha childKey="SoftGlow" duration="0.25" order="1" fromAlpha="0" toAlpha="1"/>
				<Alpha childKey="SoftGlow" startDelay="0.25" duration="0.5" order="1" fromAlpha="1" toAlpha="0"/>
				<Scale childKey="SoftGlow" duration="0.25" order="1" fromScaleX="0.5" fromScaleY="0.5" toScaleX="0.8" toScaleY="0.8"/>
				<Alpha childKey="StarBurst" duration="0.25" order="1" fromAlpha="0" toAlpha="1"/>
				<Alpha childKey="StarBurst" startDelay="0.25" duration="0.5" order="1" fromAlpha="1" toAlpha="0"/>
				<Scale childKey="StarBurst" duration="0.25" order="1" fromScaleX="0.5" fromScaleY="0.5" toScaleX="1" toScaleY="1"/>
				<Alpha childKey="LineSheen" startDelay="0.15" duration="0.5" order="1" fromAlpha="0" toAlpha="0.75"/>
				<Alpha childKey="LineSheen" startDelay="0.75" duration="0.5" order="1" fromAlpha="0.75" toAlpha="0"/>
				<Translation childKey="LineSheen" startDelay="0.15" duration="1.5" order="1" offsetX="250" offsetY="0"/>
				
				<Scripts>
					<OnFinished>
						local header = self:GetParent();
						header.animating = false;
					</OnFinished>
				</Scripts>
			</AnimationGroup>
		</Animations>
	</Frame>

	<Frame name="SmallFrameLineTemplate" virtual="true">
		<Size x="232" y="16"/>
		<Layers>
			<Layer level="ARTWORK">
				<FontString parentKey="Dash" inherits="ObjectiveFont" text="QUEST_DASH">
					<Anchors>
						<Anchor point="TOPLEFT" x="0" y="1"/>
					</Anchors>
				</FontString>
				<FontString parentKey="Text" inherits="ObjectiveFont">
					<Anchors>
						<Anchor point="TOP"/>
						<Anchor point="LEFT" relativeKey="$parent.Dash" relativePoint="RIGHT"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>


	<Frame name="DugisStatWeightTemplate" virtual="true">
		<Frames>
			<Frame name="$parentStatDropDown" parentKey="StatDropDown" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						DugisGuideViewer.Modules.GearAdvisorSettings.StatWeightDropdownOnLoad(self)
					</OnLoad>
				</Scripts>
			</Frame>
			<EditBox name="$parentWeightEdit" parentKey="WeightEdit" inherits="InputBoxTemplate" letters="5" autoFocus="false">
				<FontString inherits="GameFontHighlightSmall"/>
				<Size>
					<AbsDimension x="40" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentStatDropDownRight" relativePoint="RIGHT"/>
				</Anchors>
				<Scripts>
					<OnEnterPressed function="EditBox_ClearFocus"/>
					<OnEditFocusLost>
						DugisGuideViewer.Modules.GearAdvisorSettings.WeightEditChanged(self)
					</OnEditFocusLost>
				</Scripts>
			</EditBox>
			<Button name="$parentRemove" parentKey="Remove" hidden="true">
				<NormalTexture  file="Interface\RaidFrame\ReadyCheck-NotReady" />
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentWeightEdit" relativePoint="RIGHT" x="8" />
				</Anchors>
				<Scripts>
					<OnClick>
						DugisGuideViewer.Modules.GearAdvisorSettings.StatWeightDropdownRemove(self)
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Size>
			<AbsDimension y="16" />
		</Size>
		<Anchors>
			<Anchor point="RIGHT"/>
			<Anchor point="LEFT"/>
		</Anchors>
		<Scripts>
			<OnEnter>
				self.Remove:Show()
			</OnEnter>
			<OnUpdate>
				local focusFrame = GetMouseFocus()
				if focusFrame and focusFrame~=self and focusFrame:GetParent()~=self then
					self.Remove:Hide()
				end
			</OnUpdate>
		</Scripts>
	</Frame>

    <Frame parent="UIParent" name="DugisMapViewer" movable="true"  hidden="true"  clampedToScreen="true" enableMouse="true"  frameStrata="FULLSCREEN">
		<Size x="793" y="532"/>
		<Anchors>
            <Anchor point="CENTER" x="0" y="0"/>
        </Anchors>
        <Layers>
            <Layer>
                <Texture>
                    <Color r="0" g="0" b="0" a="0.5"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="0" y="-0"/>
                        <Anchor point="BOTTOMRIGHT" x="-0" y="0"/>
                    </Anchors>
                </Texture>
            </Layer>
			<Layer level="OVERLAY">
				<Texture parentKey="Image" alpha="0.9">
				     <Anchors>
                        <Anchor point="TOPLEFT" x="-115" y="-10"/>
                    </Anchors>
				 </Texture>
			</Layer>
        </Layers>
        <Scripts>
            <OnDragStart>self:StartMoving();</OnDragStart>
            <OnDragStop>self:StopMovingOrSizing();</OnDragStop>
            <OnLoad>
                self:RegisterForDrag("LeftButton")
            </OnLoad>
        </Scripts>
		<Frames>
            <Button inherits="UIPanelCloseButton">
                <Size>
                    <AbsDimension x="24" y="24"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPRIGHT" relativeTo="DugisMapViewer">
                        <Offset>  <AbsDimension x="5" y="5"/> </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick> 
                        DugisMapViewer:Hide()
                    </OnClick>

                </Scripts>
            </Button>
        </Frames>
    </Frame>  

	<Frame name="SidePanelDetailsContentTemplate" virtual="true">
		<Size x="100" y="100"/>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="DugiSideDetailsQuestTitle" inherits="QuestTitleFont" justifyH="LEFT" text="Quest title">
					<Size><AbsDimension x="285" y="0"/></Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="5" y="-15"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="DugiSideDetailsLogShtortDesc" inherits="QuestFont"  text="Quest short description" justifyH="LEFT">
					<Size><AbsDimension x="275" y="0"/></Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="DugiSideDetailsQuestTitle" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-9"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="DugiSideDetailsObjectivesText" inherits="QuestFont" text="DugiSideDetailsObjectivesText" justifyH="LEFT">
					<Size>
						<AbsDimension x="285" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="DugiSideDetailsLogShtortDesc" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-10"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="DugiSideDetailsDescTitle" inherits="QuestTitleFont" justifyH="LEFT" text="QUEST_DESCRIPTION">
					<Size>
						<AbsDimension x="285" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="DugiSideDetailsObjectivesText" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-18"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="DugiSideDetailsDesc" inherits="QuestFont" text="Long description" justifyH="LEFT">
					<Size>
						<AbsDimension x="270" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="DugiSideDetailsDescTitle" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="DugisPositionIndicator">
					<Size>
						<AbsDimension x="1" y="1"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="DugiSideDetailsDesc" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame> 
	<Frame name="QuestDetailsFrameDugisTemplate" virtual="true">
        <Size x="200" y="200"/>
		<Frames>
			<Frame parentKey="Handler" ></Frame>
			<Button parentKey="Button" text="Back" inherits="UIPanelButtonTemplate">
				<Size x="60" y="28"/>
				<Anchors>
					<Anchor point="TOPLEFT" >
						<Offset>
							<AbsDimension x="20" y="-15"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts><OnClick>DugisGuideViewer.SideBar.HideSidePanelDetails()</OnClick></Scripts>
			</Button>

			<Button parentKey="Abandon" text="Abandon" inherits="UIPanelButtonTemplate">
				<Size x="112" y="26"/>
				<Anchors>
					<Anchor point="BOTTOMLEFT" > <Offset> <AbsDimension x="0" y="18"/> </Offset> </Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						QuestLogFrameAbandonButton:Click()
						local oldStrata = StaticPopup1:GetFrameStrata()
						StaticPopup1:SetFrameStrata("TOOLTIP")

						DugisGuideViewer.SideBar.isAbandonQuestShown = true
						if not StaticPopup1.hookedOnHide then
							StaticPopup1.hookedOnHide = true
							StaticPopup1:HookScript("OnHide", function()
								if DugisGuideViewer.SideBar.isAbandonQuestShown then
									StaticPopup1:SetFrameStrata(oldStrata)
								end
								DugisGuideViewer.SideBar.isAbandonQuestShown = false
							end)
						end
					</OnClick>
				
				</Scripts>
			</Button>

			<Button parentKey="Share" text="Share" inherits="UIPanelButtonTemplate">
				<Size x="112" y="26"/>
				<Anchors>
					<Anchor point="BOTTOMLEFT" > <Offset> <AbsDimension x="110" y="18"/> </Offset> </Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						QuestLogPushQuest();
						WorldMapFrame:Hide()
					</OnClick>
				</Scripts>
			</Button>

			<Button parentKey="Track" text="Track" inherits="UIPanelButtonTemplate">
				<Size x="112" y="26"/>
				<Anchors>
					<Anchor point="BOTTOMLEFT" > <Offset> <AbsDimension x="220" y="18"/> </Offset> </Anchor>
				</Anchors>
				<Scripts><OnClick>DugisGuideViewer.SideBar.TrackUntrackQuest()</OnClick></Scripts>
			</Button>

		</Frames>
        <Layers>
			<Layer level="OVERLAY" textureSubLevel ="6">
				<Texture name="DugiSidePanelTextureMain" visible="true" file="Interface\QUESTFRAME\QuestMapLogAtlas">
					<texcoords left="0" right="0.27734375" top="0.560546875" bottom="0.908203125"/>
				</Texture>
				<Texture name="DugiSidePanelTextureTop" file="Interface\QUESTFRAME\QuestMapLogAtlas">
					<TexCoords left="0.283203125" right="0.55859375" top="0.7265625" bottom="0.7705078125"/>
				</Texture>
				<Texture name="DugiSidePanelTextureBottom" file="Interface\QUESTFRAME\QuestMapLogAtlas">
					<texcoords left="0.2822265625" right="0.5634765625" top="0.458984375" bottom="0.4970703125"/>
				</Texture>
				<Texture name="DugiSidePanelTextureShadow" file="Interface\QUESTFRAME\QuestMapLogAtlas">
					<texcoords left="0.0029296875" right="0.24609375" top="0.9873046875" bottom="1"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel ="5">
				<Texture name="DugiSidePanelTextureRewards" file="Interface\QUESTFRAME\QuestMapLogAtlas">
					<texcoords left="0.2822265625" right="0.5595703125" top="0.5" bottom="0.7197265625"/>
				</Texture>
				<FontString name="DugiSideDetailsRewardsTitle" inherits="QuestTitleFont" text="QUEST_REWARDS" justifyH="CENTER">
					<Size><AbsDimension x="300" y="18"/></Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo = "DugiSidePanelTextureBottom" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="-13"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="DugiSideDetailsQuestLogItemChoose" inherits="QuestFontNormalSmall" text="REWARD_CHOICES" justifyH="LEFT">
					<Size><AbsDimension x="295" y="0"/></Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="DugiSideDetailsRewardsTitle" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="6" y="-13"/>
							</Offset>
						</Anchor> 
					</Anchors>
				</FontString>
			</Layer>
        </Layers>
    </Frame>

    <Frame name="GuideSharingClientItemTemplate" virtual="true">
        <Size x="400" y="36"/>
        <Layers>
            <Layer level="BACKGROUND">
				<FontString  parentKey="PlayerName" inherits="GameFontNormalLarge" wordwrap="false" wraponspaces="true" justifyH="LEFT" text="">
					<Size>
						<AbsDimension x="140" y="36"/>
					</Size>
					<Color r="1.0" g="0.6" b="0.0"/>
					<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
					</Anchors>
				</FontString>
					<FontString  parentKey="Status" inherits="GameFontNormalLarge" wraponspaces="false" justifyH="LEFT" text="">
					<Size>
						<AbsDimension x="105" y="36"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="160" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
            </Layer>
        </Layers>
		<Frames>
			<Button parentKey="Disconnect_Cancel" inherits="UIPanelButtonTemplate"  frameLevel="100" text="" hidden="false">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="280" y="-6"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
		</Frames>
    </Frame>
	<Frame name='ShareGuideInvitationFrame'  parent='UIParent' movable='true' enableMouse='true' inherits="BackdropTemplate" hidden='true' >
		 <Size> <AbsDimension x="300" y="160"/> </Size>
			<Anchors>
				<Anchor point="CENTER"></Anchor>
			</Anchors>
		 <Layers>
			<Layer>
				<FontString  parentKey="Title" inherits="GameFontHighlight" justifyH="LEFT" font="GameFontNormal">
					<Size>
						<AbsDimension x="300" y="40"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parent" >
							<Offset>
								<AbsDimension x="20" y="-15"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString  parentKey="SubTitle" inherits="GameFontHighlight" justifyH="LEFT" font="GameFontNormal">
					<Size>
						<AbsDimension x="240" y="30"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parent" >
							<Offset> 
								<AbsDimension x='20' y="-55" /> 
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="Accept" inherits='UIPanelButtonTemplate' text = 'Accept'>
				<Size> <AbsDimension x='95' y='27'/> </Size>
				<Anchors> <Anchor point='BOTTOMRIGHT' relativeTo="$parent" ><Offset><AbsDimension x="-25" y="25"/></Offset></Anchor> </Anchors>
				<Scripts>
					<OnClick>
						DugisGuideViewer.AcceptShareInvitation()
						ShareGuideInvitationFrame:Hide()

						local notification =  DugisGuideViewer:GetNotificationByType("share-invitation")
						if notification then
							DugisGuideViewer:RemoveNotification(notification.id)
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button inherits='UIPanelButtonTemplate' text = 'Decline'>
				<Size> <AbsDimension x='95' y='27'/> </Size>
				<Anchors> <Anchor point='BOTTOMRIGHT' relativeTo="$parent" ><Offset><AbsDimension x="-125" y="25"/></Offset></Anchor> </Anchors>
				<Scripts>
					<OnClick>
						DugisGuideViewer.DeclineShareInvitation()
						ShareGuideInvitationFrame:Hide()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			 <OnLoad>
				self:RegisterForDrag("LeftButton")
				self:SetClampedToScreen(true);

			 	self:SetBackdrop({
					bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
                                            tile = true, tileSize = 16, edgeSize = 16,
                                            insets = { left = 4, right = 4, top = 4, bottom = 4 }});
				self:SetBackdropColor(0,0,0,1);
			</OnLoad>
			<OnDragStart>
				self:StartMoving()
			</OnDragStart>
			<OnDragStop>
				self:StopMovingOrSizing()
			</OnDragStop>
		</Scripts>
	</Frame>
	<Button name="GearFinderFrame_ItemFrame" virtual="true" frameStrata="MEDIUM">
		<Size x="200" y="1" />
		<Layers>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture name="$parentStripe" parentKey="Stripe">
					<Size x="169"  />	
					<Anchors>
						<Anchor point="TOPLEFT" x="1" y="0"/>
					</Anchors>
				</Texture>
			</Layer>		
			<Layer level="BACKGROUND">
				<Texture name="$parentBgTop" file="Interface\CharacterFrame\Char-Paperdoll-Parts" parentKey="BgTop">
					<Size x="169" y="5" />	
					<TexCoords left="0.00390625" right="0.66406250" top="0.50781250" bottom="0.57812500" />	
					<Anchors>
						<Anchor point="TOPLEFT" />
					</Anchors>
				</Texture>
				<Texture name="$parentBgBottom" file="Interface\CharacterFrame\Char-Paperdoll-Parts" parentKey="BgBottom">
					<Size x="169" y="50" />	
					<TexCoords left="0.00390625" right="0.66406250" top="0.00781250" bottom="0.36718750" />	
					<Anchors>
						<Anchor point="BOTTOMLEFT">
							<Offset x="0" y="3" />
						</Anchor>
					</Anchors>
				</Texture>
				<Texture name="$parentBgMiddle" file="Interface\CharacterFrame\Char-Stat-Middle" parentKey="BgMiddle" vertTile="true">
					<Size x="169" y="8" />
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentBgTop" relativePoint="BOTTOMLEFT" x="1" />
						<Anchor point="BOTTOMLEFT" relativeTo="$parentBgBottom" relativePoint="TOPLEFT" />
					</Anchors>
					<TexCoords left="0.00390625" right="0.66406250" top="0.00000000" bottom="1.00000000" />
				</Texture>
			</Layer>
		</Layers>
	
		<Scripts>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
		</Scripts>
	</Button>	
	<Frame name="GearFinderFrameTemplate" virtual="true" frameStrata="HIGH" enableMouse="true" hidden="true" inherits="BackdropTemplate">
		<Layers>
		<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture parentKey="InsetBg" file="Interface\FrameGeneral\UI-Background-Marble" horizTile="true" vertTile="true">
					<Anchors>
						<Anchor point="TOPLEFT" x="4" y="-4" />
						<Anchor point="BOTTOMRIGHT" x="-6" y="4" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Animations>
			<AnimationGroup parentKey="DriverAnimation" looping="REPEAT" mixin="WorldQuestPinPingDriverAnimationMixin">
				<Alpha childKey="Expand" fromAlpha="0" toAlpha="1"                      duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="1" toAlpha="0" startDelay=".45"     duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="0" toAlpha="1" startDelay=".575"    duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="1" toAlpha="0" startDelay=".95"     duration="0.2" order="1"/>
				<Scripts>
					<OnFinished method="OnFinished"/>
				</Scripts>
			</AnimationGroup>
			<AnimationGroup parentKey="ScaleAnimation" looping="REPEAT">
				<Scale childKey="Expand" fromScaleX=".2" fromScaleY=".2" toScaleX="0.8" toScaleY="0.8" duration=".575" order="1"/>
		<!-- 	<Scale childKey="Center" fromScaleX=".8" fromScaleY=".8" toScaleX="1.8" toScaleY="1.8" duration=".575" order="2"/> -->
		<!-- 	<Alpha childKey="Center" fromAlpha="0" toAlpha="1" startDelay="0" duration=".575" order="3"/> -->
			</AnimationGroup>
			<AnimationGroup parentKey="RotateAnimation" looping="REPEAT">
				<Rotation childKey="Rotate" degrees="-360"  duration="1.575" order="1"/>
			</AnimationGroup>
		</Animations>
	</Frame>

	
	
	<Frame name="OnPlaceAnimation" mixin="WorldQuestPingPinMixin" virtual="true">
		<Size x="70" y="70"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Expand" file="Interface\minimap\UI-Minimap-Ping-Expand" alpha="0">
					<Size x="50" y="50"/>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
				<Texture parentKey="Rotate" file="Interface\minimap\UI-Minimap-Ping-Rotate" alpha="1">
					<Size x="50" y="50"/>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
				<Texture parentKey="Center" file="Interface\minimap\UI-Minimap-Ping-Center" alpha="1">
					<Size x="16" y="16"/>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Animations>
			<AnimationGroup parentKey="DriverAnimation" looping="REPEAT" mixin="WorldQuestPinPingDriverAnimationMixin">
				<Alpha childKey="Expand" fromAlpha="0" toAlpha="1"                      duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="1" toAlpha="0" startDelay=".45"     duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="0" toAlpha="1" startDelay=".575"    duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="1" toAlpha="0" startDelay=".95"     duration="0.2" order="1"/>
				<Scripts>
					<OnFinished method="OnFinished"/>
				</Scripts>
			</AnimationGroup>
			<AnimationGroup parentKey="ScaleAnimation" looping="REPEAT">
				<Scale childKey="Expand" fromScaleX=".2" fromScaleY=".2" toScaleX="0.8" toScaleY="0.8" duration=".575" order="1"/>
		<!-- 	<Scale childKey="Center" fromScaleX=".8" fromScaleY=".8" toScaleX="1.8" toScaleY="1.8" duration=".575" order="2"/> -->
		<!-- 	<Alpha childKey="Center" fromAlpha="0" toAlpha="1" startDelay="0" duration=".575" order="3"/> -->
			</AnimationGroup>
			<AnimationGroup parentKey="RotateAnimation" looping="REPEAT">
				<Rotation childKey="Rotate" degrees="-360"  duration="1.575" order="1"/>
			</AnimationGroup>
		</Animations>
	</Frame>

	<Frame name="PingAnimation" mixin="WorldQuestPingPinMixin" alpha="1" virtual="true">
		<Size x="70" y="70"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Expand" file="Interface\CHARACTERFRAME\TempPortraitAlphaMaskSmall" alpha="0">
					<Size x="64" y="64"/>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
				<Texture parentKey="ExpandEmpty" file="Interface\minimap\UI-Minimap-Ping-Expand" alpha="0">
					<Size x="32" y="32"/>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Animations>
			<AnimationGroup parentKey="DriverAnimation" looping="REPEAT" mixin="WorldQuestPinPingDriverAnimationMixin">
				<Alpha childKey="Expand" fromAlpha="0" toAlpha="1"                      duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="1" toAlpha="0" startDelay=".45"     duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="0" toAlpha="1" startDelay=".575"    duration="0.2" order="1"/>
				<Alpha childKey="Expand" fromAlpha="1" toAlpha="0" startDelay=".95"     duration="0.2" order="1"/>

				<Alpha childKey="ExpandEmpty" fromAlpha="0" toAlpha="1"                      duration="0.2" order="1"/>
				<Alpha childKey="ExpandEmpty" fromAlpha="1" toAlpha="0" startDelay=".45"     duration="0.2" order="1"/>
				<Alpha childKey="ExpandEmpty" fromAlpha="0" toAlpha="1" startDelay=".575"    duration="0.2" order="1"/>
				<Alpha childKey="ExpandEmpty" fromAlpha="1" toAlpha="0" startDelay=".95"     duration="0.2" order="1"/>
				<Scripts>
					<OnFinished method="OnFinished"/>
				</Scripts>
			</AnimationGroup>
			<AnimationGroup parentKey="ScaleAnimation" looping="REPEAT">
				<Scale childKey="Expand" fromScaleX=".2" fromScaleY=".2" toScaleX="0.5" toScaleY="0.5" duration=".575" order="1"/>
				<Scale childKey="ExpandEmpty" fromScaleX=".1" fromScaleY=".1" toScaleX="1.4" toScaleY="1.4" duration=".575" order="1"/>
			</AnimationGroup>
		</Animations>
	</Frame>
</Ui>