<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">
	<Frame name="DGVUIFrame" virtual="true" mixin="DGVUIFrameMixin">
		<Scripts>
			<OnLoad method="OnLoad" />
			<OnUpdate method="OnUpdate" />
			<OnShow method="OnShow" />
		</Scripts>
	</Frame>

    <Frame name="DugisPreloader" hidden="true" virtual="true">
        <Frames>
            <Frame setAllPoints="true" parentKey="TexWrapper" >
                <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"  inherits="GameFontNormal" justifyH="LEFT"   text="Preparing 2%..">
                            <Size x="159" y="40"/>
                            <Anchors>
                                <Anchor point="TOPLEFT" x="5" y="-2"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <Frame  parentKey="Icon"  >
                <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="">
					<!-- <AbsDimension x="75" y="14"/> -->
					<!-- <Size>
					<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" wordwrap="true" justifyH="LEFT" enableMouse='false' justifyV="TOP" text="" >
					<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" inherits="GameFontHighlightSmall" alpha="0"  wordwrap="true" justifyH="LEFT" justifyV="TOP" text="" >
					<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" >
				<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" >
				<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" >
					<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" 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" 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 x="40" y="60"/>
					<Anchors>
						<Anchor point="TOPRIGHT" relativeTo = "$parent">
							<Offset>
								<AbsDimension x="-90" y="0"/>
							</Offset>
                        </Anchor>
					</Anchors>
				</FontString>	
				<FontString  parentKey="Desc" inherits="GameFontHighlightSmall" 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" 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" 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" >
        <Size x="400" y="16"/>
        <Frames>
            <Button parentKey="Button"  enableMouse='true' virtual="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"  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" 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" 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" 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"  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" 
					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"   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" 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,DGVUIFrame">
				<KeyValues>
					<KeyValue key="DGVEventKey" value="GearOptionItemButton" />
				</KeyValues>
				<Size>
					<AbsDimension x="147" y="41"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTitleFont" relativePoint="bottomleft">
						<Offset>
							<AbsDimension y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<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>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				self.titleFont:SetText(self.title)
			</OnShow>
        </Scripts>
	</Button>

	<Frame name='DugisEquipPromptFrame'  inherits='BackdropTemplate,DGVUIFrame'  parent='UIParent' movable='true' enableMouse='true' hidden='true' >
		<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,DGVUIFrame" text ="Reset Ban List">
				<KeyValues>
					<KeyValue key="DGVEventKey" value="ResetBanButton" />
				</KeyValues>
				<Size>
					<AbsDimension x='115' y='23'/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-20" y="20"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<CheckButton name = "$parentBlacklistChk" inherits ="UICheckButtonTemplate,DGVUIFrame" parentKey="blacklist" >
				<KeyValues>
					<KeyValue key="DGVEventKey" value="BlacklistCheckButton" />
				</KeyValues>
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="$parentOKButton" relativePoint="topleft" >
						<Offset>
							<AbsDimension x="-3" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<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>
        </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" 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" 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">
		<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="-290" />
						</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())
					</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="-330" />
						</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="-310" />
						</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>
		<Size>
			<AbsDimension y="16" />
		</Size>
		<Anchors>
			<Anchor point="RIGHT"/>
			<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 = (GetMouseFoci and GetMouseFoci()[1]) or (GetMouseFocus and 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 = "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"  inherits='BackdropTemplate'  parent="UIParent" movable="true" clampedToScreen="true" enableMouse="true" frameLevel="100" frameStrata="TOOLTIP" hidden="true" propagateKeyboardInput="true">
        <Animations>
            <AnimationGroup name="AnimateMouseDugis" looping="BOUNCE">
                <Alpha target="TutorialFrameDugisMouse" fromAlpha="0" toAlpha="1" duration="0.8" smoothing="IN_OUT"/>
            </AnimationGroup>
            <AnimationGroup name="AnimateCalloutA" looping="BOUNCE">
                <Alpha target="TutorialFrameCallOut" fromAlpha="0.5" toAlpha="0" 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">
                        <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">
                        <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">
                        <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">
                        <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>
                <KeyValues>
					<KeyValue key="backdropInfo" value="BACKDROP_CALLOUT_GLOW_0_20" type="global"/>
					<KeyValue key="backdropBorderBlendMode" value="ADD" type="string"/>
				</KeyValues>
            </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>
                <KeyValues>
					<KeyValue key="backdropInfo" value="BACKDROP_CALLOUT_GLOW_0_20" type="global"/>
					<KeyValue key="backdropBorderBlendMode" value="ADD" type="string"/>
				</KeyValues>
            </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" fromAlpha="0.7" toAlpha="0" duration=".75"/>
                    </AnimationGroup>
                </Animations>
                <KeyValues>
					<KeyValue key="backdropInfo" value="BACKDROP_CALLOUT_GLOW_0_16" type="global"/>
					<KeyValue key="backdropBorderBlendMode" value="ADD" type="string"/>
				</KeyValues>
            </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("P", GameFontHighlight)
                self.iconsFrame:SetWidth(282)
                self.iconsFrame:SetHeight(510)
                self.iconsFrame:SetJustifyH("P", "CENTER")
               	self.iconsFrame:SetJustifyV("P", "TOP")    
                self.iconsFrame:SetPoint("TOPLEFT", parent, "TOPLEFT", 0, -0) 
                self.iconsFrame:SetSpacing("P", 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" inherits="DGVUIFrame">
				<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>

	<Button name="TextButtonTemplate" virtual="true" inherits="UIPanelButtonTemplate">
        <Size x="120" y="20"/>
        <NormalFont style="GameFontNormalLarge"/>
        <ButtonText parentKey="text"  >
			<Color r="1.0" g="1.0" b="1.0"/>
            <Anchors>
                <Anchor point="CENTER" x="0" y="0"/>
            </Anchors>
        </ButtonText>
    </Button>

    <Frame name="GuideSharingClientItemTemplate" virtual="true">
        <Size x="400" y="36"/>
        <Layers>
            <Layer level="BACKGROUND">
				<FontString  parentKey="PlayerName" inherits="GameFontNormalLarge" wordwrap="false" 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" 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' inherits='BackdropTemplate' parent='UIParent' movable='true' enableMouse='true' 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>
	
	<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\Masks\CircleMaskScalable" 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>
	<ScrollFrame name="UIPanelScrollFrameTemplateDugis" inherits="UIPanelScrollFrameTemplate" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
					<Size x="31" y="256"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentScrollBarScrollUpButton" relativePoint="TOPLEFT" x="-8" y="5"/>
					</Anchors>
					<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentBottom" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
					<Size x="31" y="106"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativeTo="$parentScrollBarScrollDownButton" relativePoint="BOTTOMLEFT" x="-8" y="-2"/>
					</Anchors>
					<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				ScrollFrame_OnLoadDugis(self);
			</OnLoad>
		</Scripts>
	</ScrollFrame>
</Ui>