 <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">
	<!-- LUA Scripts -->
        <Script file="XPerl_FrameOptions.lua"/>
        <Script file="localization.lua"/>
        <Script file="localization.koKR.lua"/>
		<Script file="localization.deDE.lua"/>
        <Script file="localization.zhCN.lua"/>
        <Script file="localization.zhTW.lua"/>

        <Frame name="XPerl_Frame_Title" virtual="true" hidden="false">
		<Scripts>
			<OnLoad>
                                this.Setup = function()
                                        getglobal(this:GetName().."_Texture"):SetVertexColor(XPerlConfig.OptionsColour.r, XPerlConfig.OptionsColour.g, XPerlConfig.OptionsColour.b,1)
                                        getglobal(this:GetName().."_Text"):SetTextColor(1,1,1,1)
                                        getglobal(this:GetName().."_Text"):SetText(XPerl_Version)
                                end
			</OnLoad>
                        <OnShow>
                                this:Setup()
                        </OnShow>
		</Scripts>
		<Anchors>
			<Anchor point="CENTER" relativePoint="TOP">
				<Offset>
					<AbsDimension x="0" y="0" />
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="ARTWORK">
                                <FontString name="$parent_Text" inherits="GameFontNormalSmall" text="X-Perl UnitFrames">
					<Anchors>
                                                <Anchor point="LEFT">
                                                        <Offset>
                                                                <AbsDimension x="4" y="0" />
                                                        </Offset>
                                                </Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="BACKGROUND">
                                <Texture name="$parent_Texture" file="Interface\AddOns\XPerl_Options\images\XPerl_SetupTitle">
					<Color r="1" g="0" b="0" a="1" />
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
	</Frame>

        <Frame name="XPerl_OptionsTemplateNaked" movable="true" enableMouse="true" frameStrata="HIGH" virtual="true">
                <Scripts>
                        <OnLoad>
                                this.Setup = function()
                                        this:SetBackdropBorderColor(XPerlConfig.OptionsColour.r, XPerlConfig.OptionsColour.g, XPerlConfig.OptionsColour.b, 1)
                                        this:SetBackdropColor(XPerlConfig.OptionsColour.r, XPerlConfig.OptionsColour.g, XPerlConfig.OptionsColour.b, 1)
                                end
                        </OnLoad>
                        <OnShow>
                                this:Setup()
                        </OnShow>
                        <OnMouseDown>
                                if (arg1 == "LeftButton") then
                                        this:StartMoving()
                                end
                        </OnMouseDown>
                        <OnMouseUp>
                                this:StopMovingOrSizing()
                        </OnMouseUp>
                        <OnUpdate>
                                XPerl_Options_OnUpdate()
                        </OnUpdate>
                </Scripts>
		<Anchors>
                        <Anchor point="CENTER"/>
		</Anchors>
                <Backdrop bgFile="Interface\Addons\XPerl_Options\Images\XPerl_FancyBack" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                        <EdgeSize>
                                <AbsValue val="16"/>
                        </EdgeSize>
                        <TileSize>
                                <AbsValue val="256"/>
                        </TileSize>
                        <BackgroundInsets>
                                <AbsInset left="5" right="5" top="5" bottom="5"/>
                        </BackgroundInsets>
                </Backdrop>
                <Frames>
                        <Frame name="$parent_Title" inherits="XPerl_Frame_Title">
				<Anchors>
                                        <Anchor point="TOPLEFT">
						<Offset>
                                                        <AbsDimension x="5" y="-3" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-5" y="-24" />
						</Offset>
					</Anchor>
				</Anchors>
                        </Frame>
                        <Frame name="$parent_Area">
				<Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
						<Offset>
                                                        <AbsDimension x="3" y="-3" />
						</Offset>
					</Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
						<Offset>
                                                        <AbsDimension x="-8" y="-8" />
						</Offset>
					</Anchor>
				</Anchors>
                        </Frame>
                </Frames>
        </Frame>

        <Frame name="XPerl_OptionsTemplate" inherits="XPerl_OptionsTemplateNaked" virtual="true">
                <Frames>
                        <Frame name="$parent_Area_Align">
                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                        <EdgeSize>
                                                <AbsValue val="6"/>
                                        </EdgeSize>
                                </Backdrop>

				<Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
						<Offset>
                                                        <AbsDimension x="3" y="-3" />
						</Offset>
					</Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativePoint="TOPLEFT">
						<Offset>
                                                        <AbsDimension x="158" y="-250" />
						</Offset>
					</Anchor>
				</Anchors>
                        </Frame>
                        <Frame name="$parent_Area_Global">
                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                        <EdgeSize>
                                                <AbsValue val="6"/>
                                        </EdgeSize>
                                </Backdrop>

				<Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Area_Align">
						<Offset>
                                                        <AbsDimension x="0" y="-5" />
						</Offset>
					</Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
						<Offset>
                                                        <AbsDimension x="158" y="8" />
						</Offset>
					</Anchor>
				</Anchors>
                        </Frame>
                        <Frame name="$parent_Area_Tabs">
                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                        <EdgeSize>
                                                <AbsValue val="6"/>
                                        </EdgeSize>
                                </Backdrop>

				<Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
						<Offset>
                                                        <AbsDimension x="160" y="-15" />
						</Offset>
					</Anchor>
                                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
						<Offset>
                                                        <AbsDimension x="-8" y="8" />
						</Offset>
					</Anchor>
				</Anchors>
                        </Frame>
                </Frames>
        </Frame>

        <Button name="XPerlUpArrow" topLevel="true" virtual="true">
                <Size>
                        <AbsDimension x="32" y="32"/>
                </Size>
                <NormalTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Up"/>
                <PushedTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Down"/>
                <DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Disabled"/>
                <HighlightTexture file="Interface\Buttons\UI-ScrollBar-ScrollUpButton-Highlight" alphaMode="ADD"/>
        </Button>

        <Button name="XPerlDownArrow" topLevel="true" virtual="true">
                <Size>
                        <AbsDimension x="32" y="32"/>
                </Size>
                <NormalTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Up"/>
                <PushedTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Down"/>
                <DisabledTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Disabled"/>
                <HighlightTexture file="Interface\Buttons\UI-ScrollBar-ScrollDownButton-Highlight" alphaMode="ADD"/>
        </Button>

        <Button name="XPerlLeftArrow" topLevel="true" virtual="true">
                <Size>
                        <AbsDimension x="32" y="32"/>
                </Size>
                <NormalTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows">
                        <TexCoords left="0" right="0.25" top="0" bottom="0.5"/>
                </NormalTexture>
                <PushedTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows">
                        <TexCoords left="0.25" right="0.5" top="0" bottom="0.5"/>
                </PushedTexture>
                <DisabledTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows">
                        <TexCoords left="0.5" right="0.75" top="0" bottom="0.5"/>
                </DisabledTexture>
                <HighlightTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows" alphaMode="ADD">
                        <TexCoords left="0.75" right="1" top="0" bottom="0.5"/>
                </HighlightTexture>
        </Button>

        <Button name="XPerlRightArrow" topLevel="true" virtual="true">
                <Size>
                        <AbsDimension x="32" y="32"/>
                </Size>
                <NormalTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows">
                        <TexCoords left="0" right="0.25" top="0.5" bottom="1"/>
                </NormalTexture>
                <PushedTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows">
                        <TexCoords left="0.25" right="0.5" top="0.5" bottom="1"/>
                </PushedTexture>
                <DisabledTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows">
                        <TexCoords left="0.5" right="0.75" top="0.5" bottom="1"/>
                </DisabledTexture>
                <HighlightTexture file="Interface\Addons\XPerl_Options\Images\LeftRightArrows" alphaMode="ADD">
                        <TexCoords left="0.75" right="1" top="0.5" bottom="1"/>
                </HighlightTexture>
        </Button>

        <Slider name="XPerlSlider" orientation="HORIZONTAL" virtual="true">
                <Size>
                        <AbsDimension x="140" y="16"/>
                </Size>
		<HitRectInsets>
			<AbsInset left="0" right="0" top="-10" bottom="-10"/>
		</HitRectInsets>
		<Backdrop bgFile="Interface\Buttons\UI-SliderBar-Background" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true">
			<EdgeSize>
				<AbsValue val="8"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="8"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="3" right="3" top="6" bottom="6"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
                                <FontString name="$parentText" inherits="GameFontNormalSmall" justifyV="BOTTOM">
					<Anchors>
                                                <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
							<Offset>
                                                                <AbsDimension x="-2" y="0"/>
							</Offset>
                                                </Anchor>
                                                <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
							<Offset>
                                                                <AbsDimension x="2" y="22"/>
							</Offset>
                                                </Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentLow" inherits="GameFontHighlightSmall" text="LOW">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="2" y="3"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentHigh" inherits="GameFontHighlightSmall" text="HIGH">
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-2" y="3"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
                                <FontString name="$parentCurrent" inherits="GameFontNormalSmall" text="0%">
                                        <Color r="0.4" g="0.4" b="0.80" a="1" />
                                        <Anchors>
                                                <Anchor point="TOPLEFT" relativeTo="$parentLow"/>
                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentHigh"/>
                                        </Anchors>
                                </FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter>
				if ( this.tooltipText ) then
					GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
					GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1);
				end
                                getglobal(this:GetName().."Text"):SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
                        </OnEnter>
                        <OnLeave>
                                getglobal(this:GetName().."Text"):SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<ThumbTexture name="$parentThumb" file="Interface\Buttons\UI-SliderBar-Button-Horizontal">
			<Size>
				<AbsDimension x="32" y="32"/>
			</Size>
		</ThumbTexture>
        </Slider>

        <EditBox name="XPerlEditBox" autoFocus="false" multiline="false" ignoreArrows="true" toplevel="true" historyLines="0" letters="20" hidden="false" virtual="true">
                <Size>
                        <AbsDimension x="50" y="24"/>
                </Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
					<Size>
						<AbsDimension x="8" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT">
							<Offset>
								<AbsDimension x="-5" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
				</Texture>
				<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
					<Size>
						<AbsDimension x="8" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset>
								<AbsDimension x="-10" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
				</Texture>
				<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
					<Size>
						<AbsDimension x="10" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
						<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
					</Anchors>
					<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnEscapePressed>
                                this:ClearFocus()
			</OnEscapePressed>
		</Scripts>
		<FontString inherits="ChatFontNormal"/>
	</EditBox>

        <Button name="XPerlColorPickerTemplate" virtual="true">
		<HitRectInsets>
                        <AbsInset left="0" right="-80" top="0" bottom="0"/>
		</HitRectInsets>
                <Scripts>
                        <OnEnter>
                                if (this.tooltipText) then
                                        GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
                                        GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
                                end
                                getglobal(this:GetName().."Text"):SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
                        </OnEnter>
                        <OnLeave>
                                getglobal(this:GetName().."Text"):SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
                                GameTooltip:Hide()
                        </OnLeave>
                </Scripts>
		<Size>
                        <AbsDimension x="16" y="16"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
                                <Texture name="$parent_Border">
					<Anchors>
                                                <Anchor point="TOPLEFT">
							<Offset>
                                                                <AbsDimension x="1" y="-1"/>
							</Offset>
						</Anchor>
                                                <Anchor point="BOTTOMRIGHT">
							<Offset>
                                                                <AbsDimension x="-1" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1.0" g="1.0" b="1.0"/>
				</Texture>
			</Layer>
                        <Layer level="ARTWORK">
                                <FontString name="$parentText" inherits="GameFontNormalSmall">
                                        <Anchors>
                                                <Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
                                                                <AbsDimension x="2" y="0"/>
							</Offset>
						</Anchor>
                                        </Anchors>
                                </FontString>
                        </Layer>
		</Layers>
                <NormalTexture name="$parent_Colour" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
                <HighlightTexture file="Interface\Addons\XPerl\Images\XPerl_Highlight" alphaMode="ADD">
                        <TexCoords left="0" right="0.25" top="0" bottom="0.5"/>
                </HighlightTexture>
	</Button>

        <Button name="XPerlTabTemplate" virtual="true" topLevel="true">
		<Size>
                        <AbsDimension x="60" y="16"/>
		</Size>
                <Layers>
                        <Layer level="BACKGROUND">
                                <Texture name="$parentEnabledLeft" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs" hidden="true">
                                        <Anchors>
                                                <Anchor point="TOPLEFT"/>
                                                <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
                                                        <Offset>
                                                                <AbsDimension x="8" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                        <TexCoords left="0" right="0.125" top="0" bottom="0.25"/>
                                </Texture>
                                <Texture name="$parentEnabledRight" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs" hidden="true">
                                        <Anchors>
                                                <Anchor point="TOPRIGHT"/>
                                                <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
                                                        <Offset>
                                                                <AbsDimension x="-8" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                        <TexCoords left="0.875" right="1" top="0" bottom="0.25"/>
                                </Texture>
                                <Texture name="$parentEnabledMiddle" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs" hidden="true">
                                        <Anchors>
                                                <Anchor point="TOPLEFT" relativeTo="$parentEnabledLeft" relativePoint="TOPRIGHT"/>
                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentEnabledRight" relativePoint="BOTTOMLEFT"/>
                                        </Anchors>
                                        <TexCoords left="0.125" right="0.875" top="0" bottom="0.25"/>
                                </Texture>
                        </Layer>

                        <Layer level="BACKGROUND">
                                <Texture name="$parentDisabledLeft" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs">
                                        <Anchors>
                                                <Anchor point="TOPLEFT"/>
                                                <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
                                                        <Offset>
                                                                <AbsDimension x="8" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                        <TexCoords left="0" right="0.125" top="0.25" bottom="0.5"/>
                                </Texture>
                                <Texture name="$parentDisabledRight" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs">
                                        <Anchors>
                                                <Anchor point="TOPRIGHT"/>
                                                <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
                                                        <Offset>
                                                                <AbsDimension x="-8" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                        <TexCoords left="0.875" right="1" top="0.25" bottom="0.5"/>
                                </Texture>
                                <Texture name="$parentDisabledMiddle" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs">
                                        <Anchors>
                                                <Anchor point="TOPLEFT" relativeTo="$parentDisabledLeft" relativePoint="TOPRIGHT"/>
                                                <Anchor point="BOTTOMRIGHT" relativeTo="$parentDisabledRight" relativePoint="BOTTOMLEFT"/>
                                        </Anchors>
                                        <TexCoords left="0.125" right="0.875" top="0.25" bottom="0.5"/>
                                </Texture>
                        </Layer>
                </Layers>

                <ButtonText name="$parentText">
			<Anchors>
                                <Anchor point="CENTER"/>
			</Anchors>
		</ButtonText>
		<NormalFont inherits="GameFontNormalSmall"/>
		<HighlightFont inherits="GameFontHighlightSmall"/>
		<DisabledFont inherits="GameFontDisableSmall"/>
                <HighlightTexture name="$parentHighlightTexture" file="Interface\AddOns\XPerl_Options\images\XPerl_Tabs" alphaMode="ADD">
                        <TexCoords left="0" right="1" top="0.75" bottom="1"/>
			<Anchors>
                                <Anchor point="TOPLEFT">
                                        <Offset>
                                                <AbsDimension x="3" y="-2"/>
                                        </Offset>
                                </Anchor>
                                <Anchor point="BOTTOMRIGHT">
                                        <Offset>
                                                <AbsDimension x="-3" y="2"/>
                                        </Offset>
                                </Anchor>
			</Anchors>
		</HighlightTexture>
		<Scripts>
                        <OnLoad>
                                this:SetText(getglobal("XPERL_CONF_TITLE"..this:GetID()))
                                local f = getglobal(this:GetName().."Text")
                                this:SetWidth(f:GetStringWidth() + 18)
                        </OnLoad>
                        <OnShow>
                                XPerl_Options_SetTabColor(this, XPerlConfig.OptionsColour)
                        </OnShow>
		</Scripts>
        </Button>

        <Button name="XPerlButtonTemplate" virtual="true" inherits="OptionsButtonTemplate">
                <Size>
                        <AbsDimension x="90" y="21"/>
                </Size>
                <Scripts>
                        <OnEnter>
                                if (this.tooltipText) then
                                        GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
                                        GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
				end
                        </OnEnter>
                        <OnShow>
                                this:SetWidth(getglobal(this:GetName().."Text"):GetStringWidth() + 20)
                        </OnShow>
                        <OnLeave>
                                GameTooltip:Hide()
                        </OnLeave>
                </Scripts>
        </Button>

        <CheckButton name="XPerlCheckButtonTemplate" virtual="true">
		<Size>
                        <AbsDimension x="30" y="30"/>
		</Size>
                <Scripts>
                        <OnEnter>
                                if (this.flashFrame) then
                                        local array
                                        if (table.getn(this.flashFrame) == 0) then
                                                array = {this.flashFrame}
                                        else
                                                array = this.flashFrame
                                        end

                                        for i,f in pairs(array) do
                                                if (f and f.GetName) then
                                                        if (f:IsShown()) then
                                                                UIFrameFlash(f, 0.5, 0.5, 60, 1, 0, 1)
                                                        end
                                                end
                                        end
                                end
                                if (this.tooltipText) then
                                        GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
                                        GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
				end
                                getglobal(this:GetName().."Text"):SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
                        </OnEnter>
                        <OnLeave>
                                getglobal(this:GetName().."Text"):SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
                                if (this.flashFrame) then
                                        local array
                                        if (table.getn(this.flashFrame) == 0) then
                                                array = {this.flashFrame}
                                        else
                                                array = this.flashFrame
                                        end
                                        for i,f in pairs(array) do
                                                if (f and UIFrameIsFlashing(f)) then
                                                        UIFrameFlashStop(f)
                                                        UIFrameFlashUpdate(1)

                                                        local show = 1
                                                        if (this.flashShow) then
                                                                show = XPerlConfig[this.flashShow]
                                                        end
                                                        if (show == 1) then
                                                                f:Show()
                                                        else
                                                                f:Hide()
                                                        end
                                                end
                                        end

                                        if (this.flashEnd) then
                                                this.flashEnd()
                                        end
                                end
                                GameTooltip:Hide()
                        </OnLeave>
                        <OnClick>
                                if (this.configVar) then
                                        XPerlConfig[this.configVar] = XPerl_GetCheck(this)
                                elseif (this.XconfigVar) then
                                        if (this.XconfigVars) then
                                                local sets = getglobal(this.XconfigVars)
                                                if (sets) then
                                                        sets[this.XconfigVar] = XPerl_GetCheck(this)
                                                end
                                        else
                                                XPerlConfigHelper[this.XconfigVar] = XPerl_GetCheck(this)
                                        end
                                elseif (this.configSelection) then
                                        local new = XPerl_GetCheck(this)
                                        for i,var in pairs(this.configSelection) do
                                                XPerlConfig[var] = new
                                        end
                                end

                                local tex = this:GetCheckedTexture()
                                tex:SetVertexColor(1, 1, 1)

                                if (this.configClick) then
                                        this.configClick()
                                end
                                if (this.Validate) then
                                        this.Validate()
                                end
                        </OnClick>
                        <OnShow>
                                if (this.configVar) then
                                        this:SetChecked(XPerlConfig[this.configVar])
                                elseif (this.XconfigVar) then
                                        if (this.XconfigVars) then
                                                local sets = getglobal(this.XconfigVars)
                                                if (sets) then
                                                        this:SetChecked(sets[this.XconfigVar])
                                                end
                                        else
                                                this:SetChecked(XPerlConfigHelper[this.XconfigVar])
                                        end
                                elseif (this.configSelection) then
                                        local vars, ticked = 0, 0
                                        for i,var in pairs(this.configSelection) do
                                                vars = vars + 1
                                                if (XPerlConfig[var] == 1) then
                                                        ticked = ticked + 1
                                                end
                                        end

                                        local tex = this:GetCheckedTexture()
                                        tex:SetVertexColor(1, 1, 1)

                                        if (ticked == 0) then
                                                this:SetChecked(nil)
                                        elseif (ticked == vars) then
                                                this:SetChecked(true)
                                        else
                                                this:SetChecked(true)
                                                tex:SetVertexColor(0.6, 0.6, 0.4)
                                        end
                                end
                                if (this.Validate) then
                                        this.Validate()
                                end
                        </OnShow>
                </Scripts>
		<Layers>
			<Layer level="ARTWORK">
                                <FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="left" wraponspaces="false">
                                        <Size>
                                                <AbsDimension x="200" y="22"/>
                                        </Size>
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-2" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
		<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
		<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
		<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
		<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
        </CheckButton>

        <CheckButton name="XPerlRadioButtonTemplate" virtual="true">
                <Size><AbsDimension x="20" y="20"/></Size>
                <NormalTexture file="Interface\Buttons\UI-RadioButton">
                        <TexCoords left="0" right="0.234375" top="0" bottom="1"/>
                </NormalTexture>
                <CheckedTexture file="Interface\Buttons\UI-RadioButton">
                        <TexCoords left="0.25" right="0.484375" top="0" bottom="1"/>
                </CheckedTexture>
                <HighlightTexture file="Interface\Buttons\UI-RadioButton" alphaMode="ADD">
                        <TexCoords left="0.5" right="0.734375" top="0" bottom="1"/>
                </HighlightTexture>

		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall">
					<Anchors>
                                                <Anchor point="LEFT" relativePoint="RIGHT"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
                <Scripts>
                        <OnEnter>
                                if (this.tooltipText) then
                                        GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
                                        GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1)
				end
                                getglobal(this:GetName().."Text"):SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
                        </OnEnter>
                        <OnLeave>
                                getglobal(this:GetName().."Text"):SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
                                GameTooltip:Hide()
                        </OnLeave>
                </Scripts>
        </CheckButton>

	<!-- Options Frames -->
        <Frame name="XPerl_ColourPicker" toplevel="true" frameStrata="HIGH" inherits="XPerl_OptionsTemplateNaked" parent="UIParent" hidden="true">
                <Scripts>
                        <OnShow>
                                this.ok = nil
                                this:Setup()
                        </OnShow>
                </Scripts>
                <Size>
                        <AbsDimension x="230" y="200"/>
		</Size>
                <Frames>
                        <ColorSelect name="$parent_ColorSelect" toplevel="true">
                                <Size>
                                        <AbsDimension x="176" y="128"/>
                                </Size>
				<Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parent_Area"/>
				</Anchors>
                                <Scripts>
                                        <OnShow>
                                                local var = XPerl_ColourPicker.var
                                                if (type(XPerlConfig[var]) == "table") then
                                                        this:SetColorRGB(XPerlConfig[var].r, XPerlConfig[var].g, XPerlConfig[var].b)

                                                        if (XPerl_ColourPicker.alpha) then
                                                                XPerl_ColourPicker_Alpha:SetMinMaxValues(0, 1)
                                                                XPerl_ColourPicker_Alpha:SetValue(XPerlConfig[var].a)
                                                                XPerl_ColourPicker_Alpha:Show()
                                                                XPerl_ColourPicker:SetHeight(230)
                                                        else
                                                                XPerl_ColourPicker_Alpha:Hide()
                                                                XPerl_ColourPicker:SetHeight(200)
                                                        end
                                                end
                                        </OnShow>
                                        <OnColorSelect>
                                                getglobal(this:GetParent():GetName().."_ColorSelect_Swatch"):SetTexture(arg1, arg2, arg3)
                                                XPerl_ColourPickerRed:SetText(floor(arg1 * 255))
                                                XPerl_ColourPickerGreen:SetText(floor(arg2 * 255))
                                                XPerl_ColourPickerBlue:SetText(floor(arg3 * 255))
                                        </OnColorSelect>
                                        <OnKeyDown>
                                                if (arg1 == "ESCAPE") then
                                                        XPerl_ColourPicker:Hide()
                                                        if (XPerl_ColourPicker.ParentFrame) then
                                                                XPerl_ColourPicker.ParentFrame:Show()
                                                                XPerl_ColourPicker.ParentFrame = nil
                                                        end
                                                        XPerlLocked = 0
                                                end
                                        </OnKeyDown>
                                </Scripts>
                                <ColorWheelTexture>
                                        <Size>
                                                <AbsDimension x="128" y="128"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="TOPLEFT"/>
                                        </Anchors>
                                </ColorWheelTexture>
                                <ColorWheelThumbTexture file="Interface\Buttons\UI-ColorPicker-Buttons">
                                        <Size>
                                                <AbsDimension x="10" y="10"/>
                                        </Size>
                                        <TexCoords left="0" right="0.15625" top="0" bottom="0.625"/>
                                </ColorWheelThumbTexture>
                                <ColorValueTexture>
                                        <Size>
                                                <AbsDimension x="32" y="128"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="TOPRIGHT">
                                                        <Offset>
                                                                <AbsDimension x="-5" y="0"/>
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                </ColorValueTexture>
                                <ColorValueThumbTexture file="Interface\Buttons\UI-ColorPicker-Buttons">
                                        <Size>
                                                <AbsDimension x="48" y="14"/>
                                        </Size>
                                        <TexCoords left="0.25" right="1.0" top="0" bottom="0.875"/>
                                </ColorValueThumbTexture>
                                <Layers>
                                        <Layer level="ARTWORK">
                                                <Texture name="$parent_Swatch">
                                                        <Size>
                                                                <AbsDimension x="32" y="32"/>
                                                        </Size>
                                                        <Anchors>
                                                                <Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
                                                                        <Offset>
                                                                                <AbsDimension x="5" y="0"/>
                                                                        </Offset>
                                                                </Anchor>
                                                        </Anchors>
                                                        <Color r="1.0" g="1.0" b="1.0" a="1.0"/>
                                                </Texture>
                                        </Layer>
                                </Layers>
                        </ColorSelect>
                        <Button name="$parent_OK" inherits="XPerlButtonTemplate">
                                <Size>
                                        <AbsDimension x="80" y="24"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativeTo="$parent_Area">
                                                <Offset>
                                                        <AbsDimension x="0" y="16" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                this:SetText(XPERL_OK)
                                        </OnLoad>
                                        <OnClick>
                                                local r, g, b = getglobal(this:GetParent():GetName().."_ColorSelect"):GetColorRGB()
                                                local a = XPerl_ColourPicker_Alpha:GetValue()
                                                local var = XPerl_ColourPicker.var
                                                if (type(XPerlConfig[var]) == "table") then
                                                        XPerlConfig[var].r = r
                                                        XPerlConfig[var].g = g
                                                        XPerlConfig[var].b = b

                                                        if (XPerl_ColourPicker.alpha) then
                                                                XPerlConfig[var].a = a
                                                        end
                                                end

                                                this:GetParent():Hide()
                                                if (XPerl_ColourPicker.ParentFrame) then
                                                        XPerl_ColourPicker.ParentFrame:Show()
                                                        XPerl_ColourPicker.ParentFrame = nil
                                                end
                                                XPerlLocked = 0

                                                if (var ~= "OptionsColour") then
                                                        XPerl_OptionActions()
                                                end
                                        </OnClick>
                                </Scripts>
                        </Button>
                        <Button name="$parent_Cancel" inherits="XPerlButtonTemplate">
                                <Size>
                                        <AbsDimension x="80" y="24"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent_OK">
                                                <Offset>
                                                        <AbsDimension x="8" y="0" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                this:SetText(XPERL_CANCEL)
                                        </OnLoad>
                                        <OnClick>
                                                this:GetParent():Hide()
                                                if (XPerl_ColourPicker.ParentFrame) then
                                                        XPerl_ColourPicker.ParentFrame:Show()
                                                        XPerl_ColourPicker.ParentFrame = nil
                                                end
                                                XPerlLocked = 0
                                        </OnClick>
                                </Scripts>
                        </Button>
                        <Slider name="$parent_Alpha" inherits="XPerlSlider">
                                <Size>
                                        <AbsDimension x="150" y="20"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativeTo="$parent_OK" relativePoint="TOPLEFT">
                                                <Offset>
                                                        <AbsDimension x="5" y="10" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALPHA")
                                                getglobal(this:GetName().."Low"):SetText("0%")
                                                getglobal(this:GetName().."High"):SetText("100%")
                                        </OnLoad>
                                        <OnValueChanged>
                                                XPerl_ColourPicker.alphaValue = this:GetValue()
                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerl_ColourPicker.alphaValue + 0.5).."%")
                                        </OnValueChanged>
                                </Scripts>
                        </Slider>
                </Frames>
                <Layers>
                        <Layer level="ARTWORK">
                                <FontString name="$parentRed" inherits="GameFontNormalSmall">
                                        <Size>
                                                <AbsDimension x="50" y="14"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="RIGHT">
                                                        <Offset>
                                                                <AbsDimension x="-5" y="0" />
                                                        </Offset>
                                                </Anchor>
                                        </Anchors>
                                        <Color r="1" g="0" b="0"/>
                                </FontString>
                                <FontString name="$parentGreen" inherits="GameFontNormalSmall">
                                        <Size>
                                                <AbsDimension x="50" y="14"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentRed"/>
                                        </Anchors>
                                        <Color r="0" g="1" b="0"/>
                                </FontString>
                                <FontString name="$parentBlue" inherits="GameFontNormalSmall">
                                        <Size>
                                                <AbsDimension x="50" y="14"/>
                                        </Size>
                                        <Anchors>
                                                <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentGreen"/>
                                        </Anchors>
                                        <Color r="0" g="0" b="1"/>
                                </FontString>
                        </Layer>
                </Layers>
        </Frame>

        <Button name="XPerl_Options_ButtonSelector" virtual="true">
                <Size><AbsDimension x="170" y="15"/></Size>
                <Scripts>
                        <OnClick>
                                this:GetParent().Selection = this:GetID()
                                this:GetParent():SetBarColours()
                        </OnClick>
                </Scripts>
                <HighlightTexture file="Interface\Addons\XPerl\Images\XPerl_Highlight" alphaMode="ADD">
                        <TexCoords left="0" right="1" top="0.5" bottom="1" />
                </HighlightTexture>
        </Button>

	<!-- Options Frames -->
        <Frame name="XPerl_Options_TextureSelect" toplevel="true" frameStrata="HIGH" inherits="XPerl_OptionsTemplateNaked" parent="UIParent" hidden="true">
                <Scripts>
                        <OnShow>
                                this.Selection = XPerlConfig.BarTextures
                                this.SetBarColours = function()
                                        for i = 0,8 do
                                                local r, g, b
                                                if (XPerl_Options_TextureSelect.Selection == i) then
                                                        r, g, b = 0, 1, 0
                                                else
                                                        r, g, b = 0.5, 0.5, 0.5
                                                end
                                                local f = getglobal("XPerl_Options_TextureSelect"..i)
                                                if (f) then
                                                        local tex = f:GetNormalTexture()
                                                        tex:SetVertexColor(r, g, b, 1)
                                                end
                                        end
                                end
                                this:SetBarColours()
                                this:Setup()
                        </OnShow>
                </Scripts>
                <Size>
                        <AbsDimension x="195" y="240"/>
		</Size>
                <Frames>
                        <Button name="$parent0" inherits="XPerl_Options_ButtonSelector" id="0">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="$parent_Area">
                                                <Offset><AbsDimension x="5" y="-5" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\TargetingFrame\UI-StatusBar"/>
                        </Button>
                        <Button name="$parent1" inherits="XPerl_Options_ButtonSelector" id="1">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent0">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar"/>
                        </Button>
                        <Button name="$parent2" inherits="XPerl_Options_ButtonSelector" id="2">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent1">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar2"/>
                        </Button>
                        <Button name="$parent3" inherits="XPerl_Options_ButtonSelector" id="3">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent2">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar3"/>
                        </Button>
                        <Button name="$parent4" inherits="XPerl_Options_ButtonSelector" id="4">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent3">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar4"/>
                        </Button>
                        <Button name="$parent5" inherits="XPerl_Options_ButtonSelector" id="5">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent4">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar5"/>
                        </Button>
                        <Button name="$parent6" inherits="XPerl_Options_ButtonSelector" id="6">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent5">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar6"/>
                        </Button>
                        <Button name="$parent7" inherits="XPerl_Options_ButtonSelector" id="7">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent6">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar7"/>
                        </Button>
                        <Button name="$parent8" inherits="XPerl_Options_ButtonSelector" id="8">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent7">
                                                <Offset><AbsDimension x="0" y="-4" /></Offset>
                                        </Anchor>
                                </Anchors>
                                <NormalTexture file="Interface\Addons\XPerl\Images\XPerl_StatusBar8"/>
                        </Button>
                        <Button name="$parent_OK" inherits="XPerlButtonTemplate" text="XPERL_OK">
                                <Size>
                                        <AbsDimension x="80" y="24"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativeTo="$parent_Area">
                                                <Offset>
                                                        <AbsDimension x="0" y="16" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                XPerlConfig.BarTextures = this:GetParent().Selection
                                                XPerl_Options_TextureSelect:Hide()
                                                XPerl_Options:Show()
                                                XPerl_SetBarTextures()
                                        </OnClick>
                                </Scripts>
                        </Button>
                        <Button name="$parent_Cancel" inherits="XPerlButtonTemplate" text="XPERL_CANCEL">
                                <Size>
                                        <AbsDimension x="80" y="24"/>
                                </Size>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent_OK">
                                                <Offset>
                                                        <AbsDimension x="8" y="0" />
                                                </Offset>
                                        </Anchor>
                                </Anchors>
                                <Scripts>
                                        <OnClick>
                                                XPerl_Options_TextureSelect:Hide()
                                                XPerl_Options:Show()
                                        </OnClick>
                                </Scripts>
                        </Button>
                </Frames>
        </Frame>

	<!-- Options Frames -->
        <Frame name="XPerl_Options" inherits="XPerl_OptionsTemplate" parent="UIParent" hidden="true">
                <Scripts>
                        <OnEscapePressed>
                                XPerl_LockFrames()
                        </OnEscapePressed>
                        <OnShow>
                                local tabs = {XPerl_Options_Tab1}

                                if (XPerl_Player or XPerl_Player_Pet) then
                                        table.insert(tabs, XPerl_Options_Tab2)
                                end

                                if (XPerl_Target) then
                                        table.insert(tabs, XPerl_Options_Tab3)
                                end

                                if (XPerl_party1 or XPerl_partypet1) then
                                        table.insert(tabs, XPerl_Options_Tab4)
                                end

                                if (XPerl_Raid_Frame) then
                                        table.insert(tabs, XPerl_Options_Tab5)
                                end

                                if (XPerl_Player or XPerl_Player_Pet or XPerl_Target or XPerl_party1 or enabled) then
                                        table.insert(tabs, XPerl_Options_Tab6)
                                end

                                table.insert(tabs, XPerl_Options_Tab7)

                                if (XPerl_Frame) then
                                        table.insert(tabs, XPerl_Options_Tab8)
                                end

                                if (XPerl_AdminFrame) then
                                        table.insert(tabs, XPerl_Options_Tab9)
                                end

                                local lastTab = nil
                                local totalTabWidth = 0
                                for i,tab in pairs(tabs) do
                                        if (i > 1) then
                                                tab:ClearAllPoints()
                                                tab:SetPoint("BOTTOMLEFT", lastTab, "BOTTOMRIGHT", -1, 0)
                                                tab:Show()

                                                totalTabWidth = totalTabWidth + (20 + getglobal(tab:GetName().."Text"):GetStringWidth())
                                        end
                                        lastTab = tab
                                end

                                local width = 210 + totalTabWidth
                                if (not (width >= 620)) then
                                        width = 620
                                end
                                this:SetWidth(width)

                                this:Setup()
                        </OnShow>
                        <OnHide>
                                XPerl_OptionActions()
                        </OnHide>
                </Scripts>
		<Size>
                        <AbsDimension x="620" y="410"/>
		</Size>
                <Frames>
                        -- Player and Target Frame Options
                        <Button name="$parent_CloseButton" inherits="UIPanelCloseButton" toplevel="true">
				<Anchors>
                                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
						<Offset>
                                                        <AbsDimension x="3" y="2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
                                                XPerl_LockFrames()
					</OnClick>
				</Scripts>
			</Button>

                        <Button name="$parent_OptionsColour" inherits="XPerlColorPickerTemplate" topLevel="true">
                                <Size>
                                        <AbsDimension x="14" y="14"/>
                                </Size>
                                <HitRectInsets>
                                        <AbsInset left="0" right="0" top="0" bottom="0"/>
                                </HitRectInsets>
                                <Anchors>
                                        <Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parent_CloseButton"/>
                                </Anchors>
                                <Scripts>
                                        <OnLoad>
                                                this.tooltipText = XPERL_CONF_OPTIONS_COLOUR
                                        </OnLoad>
                                        <OnShow>
                                                local f = getglobal(this:GetName().."_Colour")
                                                f:SetVertexColor(XPerlConfig.OptionsColour.r, XPerlConfig.OptionsColour.g, XPerlConfig.OptionsColour.b)
                                        </OnShow>
                                        <OnClick>
                                                XPerlLocked = 1
                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                XPerl_ColourPicker.var = "OptionsColour";           -- Has to be something in XPerlConfig
                                                XPerl_ColourPicker.alpha = nil
                                                XPerl_Options:Hide()
                                                XPerl_ColourPicker:Show()
                                        </OnClick>
                                </Scripts>
                        </Button>

                        <Frame name="$parent_Player">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Align"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Align"/>
                                </Anchors>
                                <Frames>
                                        <Button name="$parent_Title">
                                                <Size>
                                                        <AbsDimension x="60" y="20"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="3" y="3" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_PLAYER_ALIGNMENT">
                                                                <Color r="1" g="1" b="1" a="1" />
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" />
                                                                        </Anchors>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </Button>

                                        <Button name="$parent_AlignTop" inherits="XPerlButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="70" y="24"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-1" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_PLAYER_TOP")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Player_AlignTop()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_SmallerGap" inherits="XPerlLeftArrow">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_AlignTop">
                                                                <Offset>
                                                                        <AbsDimension x="-5" y="3"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                local new = XPerl_Options_DecrementSibling("Gap")
                                                                XPerl_Player_SetGap(new)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <EditBox name="$parent_Gap" inherits="XPerlEditBox">
                                                <Anchors>
                                                        <Anchor point="LEFT" relativeTo="$parent_SmallerGap" relativePoint="RIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="1" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
						<Size>
                                                        <AbsDimension x="50" y="24"/>
						</Size>
						<Scripts>
                                                        <OnEditFocusGained>
                                                                this.editing = true
                                                        </OnEditFocusGained>
                                                        <OnEditFocusLost>
                                                                this.editing = nil
                                                        </OnEditFocusLost>
                                                        <OnShow>
                                                                if (XPerl_Player_GetGap) then
                                                                        this:SetText(XPerl_Player_GetGap())
                                                                end
                                                        </OnShow>
							<OnTextChanged>
                                                                if (this.editing) then
                                                                        if (XPerl_Player_GetGap) then
                                                                                XPerl_Player_SetGap(tonumber(this:GetText()))
                                                                        end
                                                                end
							</OnTextChanged>
						</Scripts>
					</EditBox>

                                        <Button name="$parent_BiggerGap" inherits="XPerlRightArrow">
                                                <Anchors>
                                                        <Anchor point="LEFT" relativeTo="$parent_Gap" relativePoint="RIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="-15" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                local new = XPerl_Options_IncrementSibling("Gap")
                                                                XPerl_Player_SetGap(new)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Slider name="$parent_ScaleTT" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="5" y="30" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                if (not XPerl_TargetTarget) then
                                                                        this:Hide()
                                                                end
                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_TargetTargetFrame + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerlConfig.Scale_TargetTargetFrame + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.Scale_TargetTargetFrame = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_TargetTargetFrame + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                        <Slider name="$parent_ScaleT" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" relativeTo="$parent_ScaleTT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="28" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                if (not XPerl_Target) then
                                                                        this:Hide()
                                                                end
                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_TargetFrame + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerlConfig.Scale_TargetFrame + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.Scale_TargetFrame = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_TargetFrame + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" relativeTo="$parent_ScaleT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="28" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                if (not XPerl_Player) then
                                                                        this:Hide()
                                                                end
                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_PlayerFrame + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerlConfig.Scale_PlayerFrame + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.Scale_PlayerFrame = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_PlayerFrame + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>

                        -- Party Frame Options
                        <Frame name="$parent_Party" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Align"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Align"/>
                                </Anchors>
                                <Frames>
                                        <Button name="$parent_Title">
                                                <Size>
                                                        <AbsDimension x="60" y="20"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="3" y="3" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_PARTY_ALIGNMENT">
                                                                <Color r="1" g="1" b="1" a="1" />
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" />
                                                                        </Anchors>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </Button>

                                        <Button name="$parent_AlignLeft" inherits="XPerlButtonTemplate">
                                                <FontString inherits="GameFontNormalSmall"/>
                                                <Size>
                                                        <AbsDimension x="70" y="24"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-1" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_PARTY_LEFT")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Party_AlignLeft()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_SmallerGap" inherits="XPerlUpArrow">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_AlignLeft" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="-4" y="3"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                local new = XPerl_Options_DecrementSibling("Gap")
                                                                XPerl_Party_SetGap(new)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_Spacing">
                                                <Size>
                                                        <AbsDimension x="60" y="20"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent_SmallerGap">
                                                                <Offset>
                                                                        <AbsDimension x="2" y="1" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentText" inherits="GameFontNormalSmall">
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" />
                                                                        </Anchors>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                                <Scripts>
                                                        <OnLoad>
                                                                getglobal(this:GetName().."Text"):SetText(XPERL_CONF_ALIGN_SPACING)
                                                        </OnLoad>
                                                </Scripts>
                                        </Button>

                                        <EditBox name="$parent_Gap" inherits="XPerlEditBox">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_SmallerGap" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="10" y="8"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
						<Size>
                                                        <AbsDimension x="50" y="24"/>
						</Size>
						<Scripts>
                                                        <OnEditFocusGained>
                                                                this.editing = true
                                                        </OnEditFocusGained>
                                                        <OnEditFocusLost>
                                                                this.editing = nil
                                                        </OnEditFocusLost>
                                                        <OnShow>
                                                                if (XPerl_Party_GetGap) then
                                                                        this:SetText(XPerl_Party_GetGap())
                                                                end
                                                        </OnShow>
							<OnTextChanged>
                                                                if (this.editing) then
                                                                        if (XPerl_Party_GetGap) then
                                                                                XPerl_Party_SetGap(tonumber(this:GetText()))
                                                                        end
                                                                end
							</OnTextChanged>
						</Scripts>
					</EditBox>

                                        <Button name="$parent_BiggerGap" inherits="XPerlDownArrow">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Gap" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="-10" y="7"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                local new = XPerl_Options_IncrementSibling("Gap")
                                                                XPerl_Party_SetGap(new)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Slider name="$parent_ScalePets" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="5" y="30" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                if (not XPerl_partypet1) then
                                                                        this:Hide()
                                                                end

                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTYPET_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_PartyPets + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerlConfig.Scale_PartyPets + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.Scale_PartyPets = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_PartyPets + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" relativeTo="$parent_ScalePets">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="28" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_PartyFrame + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerlConfig.Scale_PartyFrame + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.Scale_PartyFrame = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_PartyFrame + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>

                        -- Raid Frame Options
                        <Frame name="$parent_Raid" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Align"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Align"/>
                                </Anchors>
                                <Frames>
                                        <Button name="$parent_Title">
                                                <Size>
                                                        <AbsDimension x="60" y="20"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="3" y="3" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_RAID_ALIGNMENT">
                                                                <Color r="1" g="1" b="1" a="1" />
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" />
                                                                        </Anchors>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </Button>

                                        <Button name="$parent_AlignTop" inherits="XPerlButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="70" y="24"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-1" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_RAID_TOP")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Raid_AlignTop()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_SmallerGap" inherits="XPerlLeftArrow">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_AlignTop">
                                                                <Offset>
                                                                        <AbsDimension x="-5" y="3"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                local new = XPerl_Options_DecrementSibling("Gap")
                                                                XPerl_Raid_SetGap(new)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <EditBox name="$parent_Gap" inherits="XPerlEditBox">
                                                <Anchors>
                                                        <Anchor point="LEFT" relativeTo="$parent_SmallerGap" relativePoint="RIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="1" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
						<Size>
                                                        <AbsDimension x="50" y="24"/>
						</Size>
						<Scripts>
                                                        <OnEditFocusGained>
                                                                this.editing = true
                                                        </OnEditFocusGained>
                                                        <OnEditFocusLost>
                                                                this.editing = nil
                                                        </OnEditFocusLost>
                                                        <OnShow>
                                                                if (XPerl_Raid_GetGap) then
                                                                        this:SetText(XPerl_Raid_GetGap())
                                                                end
                                                        </OnShow>
							<OnTextChanged>
                                                                if (this.editing and XPerl_Raid_SetGap) then
                                                                        XPerl_Raid_SetGap(tonumber(this:GetText()))
                                                                end
							</OnTextChanged>
						</Scripts>
					</EditBox>

                                        <Button name="$parent_BiggerGap" inherits="XPerlRightArrow">
                                                <Anchors>
                                                        <Anchor point="LEFT" relativeTo="$parent_Gap" relativePoint="RIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="-15" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                local new = XPerl_Options_IncrementSibling("Gap")
                                                                XPerl_Raid_SetGap(new)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <CheckButton name="$parent_All" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_SmallerGap" relativePoint="BOTTOM"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_Options.raidAlign = "all"
                                                                this:SetChecked(true)
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_RAID_ALL")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Options.raidAlign = "all"
                                                                XPerl_Options_CheckRadio({"All", "Odds", "Evens", "First4", "Last4"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Odds" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_All" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(false)
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_RAID_ODD")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Options.raidAlign = "odd"
                                                                XPerl_Options_CheckRadio({"All", "Odds", "Evens", "First4", "Last4"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Evens" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Odds" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(false)
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_RAID_EVEN")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Options.raidAlign = "even"
                                                                XPerl_Options_CheckRadio({"All", "Odds", "Evens", "First4", "Last4"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_First4" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Evens" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(false)
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_RAID_FIRST4")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Options.raidAlign = "first4"
                                                                XPerl_Options_CheckRadio({"All", "Odds", "Evens", "First4", "Last4"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Last4" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_First4" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(false)
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALIGN_RAID_LAST4")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Options.raidAlign = "last4"
                                                                XPerl_Options_CheckRadio({"All", "Odds", "Evens", "First4", "Last4"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="5" y="30" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_Raid + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerlConfig.Scale_Raid + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.Scale_Raid = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_Raid + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>

                        -- Global Options
                        <Frame name="$parent_Global">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Global"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Global"/>
                                </Anchors>

                                <Frames>
                                        <Button name="$parent_Title">
                                                <Size>
                                                        <AbsDimension x="60" y="20"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="XPerl_Options_Area_Global">
                                                                <Offset>
                                                                        <AbsDimension x="4" y="2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_FRAME_APPEARANCE">
                                                                <Color r="1" g="1" b="1" a="1" />
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" />
                                                                        </Anchors>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </Button>

                                        <Button name="$parent_Border" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                <Offset>
                                                                        <AbsDimension x="3" y="0" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_GLOBAL_BORDERS")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.BorderColour.r, XPerlConfig.BorderColour.g, XPerlConfig.BorderColour.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "BorderColour";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = true
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_Background" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Border">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_GLOBAL_BACKGROUND")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.BackColour.r, XPerlConfig.BackColour.g, XPerlConfig.BackColour.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "BackColour";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = true
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Slider name="$parent_Transparency" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Background" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="-2" y="-20"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_FRAME_TRANSPARENCY")
                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                getglobal(this:GetName().."Low"):SetText("0%")

                                                                this:SetMinMaxValues(0,100)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerlConfig.Transparency + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (this:GetValue() ~= math.floor(100 * XPerlConfig.Transparency + 0.5)) then
                                                                        XPerlConfig.Transparency = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Transparency + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_TextTransparency" inherits="XPerlSlider">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Transparency" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="-23"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TEXT_TRANSPARENCY")
                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                getglobal(this:GetName().."Low"):SetText("0%")

                                                                this:SetMinMaxValues(0,100)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerlConfig.TextTransparency + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (this:GetValue() ~= math.floor(100 * XPerlConfig.TextTransparency + 0.5)) then
                                                                        XPerlConfig.TextTransparency = this:GetValue() / 100
                                                                        XPerl_OptionActions()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.TextTransparency + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>

                        -- Options Tabs
                        <Frame name="$parent_Tab">
                                <Scripts>
                                        <OnLoad>
                                                this.frameNames = {"_Global_Options",
                                                                "_Player_Options",
                                                                "_Target_Options",
                                                                "_Party_Options",
                                                                "_Raid_Options",
                                                                "_All_Options",
                                                                "_Colour_Options",
                                                                "_Helper_Options",
                                                                "_Admin_Options"}

                                                this.SelectTab = function(this, id)

                                                        for i=1,table.getn(this.frameNames) do
                                                                local frame = getglobal(this:GetParent():GetName()..this.frameNames[i])

                                                                local tab = getglobal(this:GetName()..i)
                                                                if (i == id) then
                                                                        --tab:EnableTab(tab)
                                                                        XPerl_Options_EnableTab(tab, true)
                                                                        if (frame) then
                                                                                frame:Show()
                                                                        end
                                                                else
                                                                        if (tab and tab:IsShown()) then
                                                                                XPerl_Options_EnableTab(tab, false)
                                                                                --tab:DisableTab(tab)
                                                                        end

                                                                        if (frame) then
                                                                                frame:Hide()
                                                                        end
                                                                end
                                                        end
                                                end

                                                this:SelectTab(1)
                                        </OnLoad>
                                </Scripts>
                                <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativeTo="XPerl_Options_Area_Tabs" relativePoint="TOPLEFT"/>
                                        <Anchor point="TOPRIGHT" relativeTo="XPerl_Options_Area_Tabs" relativePoint="TOPRIGHT">
                                                <Offset><AbsDimension x="0" y="16"/></Offset>
                                        </Anchor>
                                </Anchors>

                                <Frames>
                                        <Button name="$parent1" inherits="XPerlTabTemplate" id="1">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="2" y="-2"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(1)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent2" inherits="XPerlTabTemplate" id="2" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent1"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(2)
                                                                XPerl_OptionsFrame_SelectFrame("player")
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent3" inherits="XPerlTabTemplate" id="3" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent2"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(3)
                                                                XPerl_OptionsFrame_SelectFrame("player")
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent4" inherits="XPerlTabTemplate" id="4" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent3"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(4)
                                                                XPerl_OptionsFrame_SelectFrame("party")
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent5" inherits="XPerlTabTemplate" id="5" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent4"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(5)
                                                                XPerl_OptionsFrame_SelectFrame("raid")
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent6" inherits="XPerlTabTemplate" id="6" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent5"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(6)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent7" inherits="XPerlTabTemplate" id="7" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent6"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(7)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent8" inherits="XPerlTabTemplate" id="8" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent6"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(8)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent9" inherits="XPerlTabTemplate" id="9" hidden="true">
                                                <Anchors>
                                                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent6"/>
                                                </Anchors>
                                                <Scripts>
                                                        <OnClick>
                                                                this:GetParent():SelectTab(9)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>
                                </Frames>
                        </Frame>

                        -- Main Options
                        <Frame name="$parent_Global_Options">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <Button name="$parent_BarTextures" inherits="XPerlColorPickerTemplate">
                                                <Size><AbsDimension x="100" y="10"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="12" y="-6"/></Offset>
                                                        </Anchor>
                                                </Anchors>

                                                <NormalTexture file="Interface\TargetingFrame\UI-StatusBar"/>

                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_BAR_TEXTURES")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local tex = XPerl_GetBarTexture()
                                                                this:SetNormalTexture(tex)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerl_Options:Hide()
                                                                XPerl_Options_TextureSelect:Show()
                                                        </OnClick>
                                                </Scripts>
                                                <HighlightTexture file="Interface\Addons\XPerl\Images\XPerl_Highlight" alphaMode="ADD">
                                                        <TexCoords left="0" right="1" top="0.5" bottom="1" />
                                                </HighlightTexture>
                                        </Button>

                                        <CheckButton name="$parent_BackgroundTex" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_BarTextures" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="-6" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_BAR_TEXTURES_BACKGROUND")
                                                                this.configVar = "BackgroundTextures"
                                                                this.configClick = XPerl_SetBarTextures
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_FadingBars" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_BackgroundTex" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_BAR_FADING")
                                                                this.configVar = "FadingBars"
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("FadeTime")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_FadeTime" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="75" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_FadingBars" relativePoint="TOPRIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="80" y="-12"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_BAR_FADING_TIME")
                                                                getglobal(this:GetName().."Low"):SetText("0.2")
                                                                getglobal(this:GetName().."High"):SetText("2.0")
                                                                this:SetMinMaxValues(2, 20)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(floor((XPerlConfig.FadingBarsTime + 0.05) * 10))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                XPerlConfig.FadingBarsTime = this:GetValue() / 10
                                                                getglobal(this:GetName().."Current"):SetText(string.format("%.1f", XPerlConfig.FadingBarsTime))
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <CheckButton name="$parent_InverseBars" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_FadingBars" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_INVERSEBARS")
                                                                this.configVar = "InverseBars"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_FatHealthBars" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_InverseBars" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_FATHEALTHBARS")
                                                                this.configVar = "FatHealthBars"
                                                                this.configClick = XPerl_Setup_StatsFrames
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_CombatFlash" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_FatHealthBars" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COMBAT_FLASH")
                                                                this.configVar = "PerlCombatFlash"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Fading" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_CombatFlash" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_FADING_FRAMES")
                                                                this.configVar = "PerlFadeFrames"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ArcaneBar" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Fading" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ARCANE_BAR")
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("CastTime")
                                                                end
                                                                this.configVar = "ArcaneBar"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_CastTime" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_ArcaneBar" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_CAST_TIME")
                                                                this.configVar = "CastTime"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_OldCastBar" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_CastTime" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ORIGINAL_CASTBAR")
                                                                this.configVar = "OldCastBar"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Highlight" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_OldCastBar" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_SELECTION_HIGHLIGHT")
                                                                this.configVar = "HighlightSelection"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_HighlightDebuffs" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Highlight" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_HIGHLIGHTDEBUFFS")
                                                                this.configVar = "HighlightDebuffs"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("HighBackground")
                                                                        XPerl_Options_EnableSibling("HighBorder")
                                                                        XPerl_Options_EnableSibling("HighBoth")
                                                                        XPerl_Options_EnableSibling("HighlightClass")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_HighBackground" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_HighlightDebuffs" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_HIGHLIGHTDEBUFFSBACKGROUND")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HighlightDebuffsBorder == 0)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HighlightDebuffsBorder = 0
                                                                XPerl_Options_CheckRadio({"HighBackground", "HighBorder", "HighBoth"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_HighBorder" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_HighBackground" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="2"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_HIGHLIGHTDEBUFFSBORDER")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HighlightDebuffsBorder == 2)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HighlightDebuffsBorder = 2
                                                                XPerl_Options_CheckRadio({"HighBackground", "HighBorder", "HighBoth"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_HighBoth" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_HighBorder" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="2"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_HIGHLIGHTDEBUFFSBOTH")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HighlightDebuffsBorder == 1)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HighlightDebuffsBorder = 1
                                                                XPerl_Options_CheckRadio({"HighBackground", "HighBorder", "HighBoth"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_HighlightClass" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_HighBoth" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_HIGHLIGHTDEBUFFSCLASS")
                                                                this.configVar = "HighlightDebuffsClass"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_FadingTooltips" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOP">
                                                                <Offset><AbsDimension x="0" y="-6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_FADINGTOOLTIP")
                                                                this.configVar = "FadingTooltip"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_XPerlTooltips" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_FadingTooltips" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="115" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_XPERL_TOOLTIP_INFO")
                                                                this.configVar = "XPerlTooltipInfo"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_HitIndicator" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_FadingTooltips" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_HIT_INDICATOR")
                                                                this.configVar = "CombatHitIndicator"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Minimap" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_HitIndicator" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_MINIMAP_ICON")
                                                                this.flashFrame = XPerl_MinimapButton_Frame
                                                                this.flashShow = "MinimapButtonShown"
                                                                this.configVar = "MinimapButtonShown"
                                                                this.configClick = XPerl_MinimapButton_Init
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="150" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Minimap">
                                                                <Offset>
                                                                        <AbsDimension x="3" y="-8" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_MAXIMUM_SCALE")
                                                                getglobal(this:GetName().."Low"):SetText("100%")
                                                                getglobal(this:GetName().."High"):SetText("400%")

                                                                this:SetMinMaxValues(100, 400)
                                                                this:SetValueStep(25)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(XPerlConfig.MaximumScale * 100 + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(XPerlConfig.MaximumScale * 100 + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfig.MaximumScale = this:GetValue() / 100
                                                                        XPerl_Options_MaxScaleSet()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(XPerlConfig.MaximumScale * 100 + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <CheckButton name="$parent_ClearBlizz" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Scale" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="-3" y="-6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                --if (XPerl_DisallowClear()) then
                                                                --        XPerlConfig.ClearBlizzardFrames = 0
                                                                --        this:Hide()
                                                                --end

                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_CLEAR_BLIZZ")
                                                                this.configVar = "ClearBlizzardFrames"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Frame name="$parent_CastPartyOptions">
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_ClearBlizz">
                                                                <Offset><AbsDimension x="0" y="-15"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativePoint="RIGHT" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="-5" y="-55"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <!--FontString name="$parent_Title" inherits="GameFontNormalSmall"-->
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_3RD_PARTY_CLICKERS">
                                                                                        <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <CheckButton name="$parent_CastParty" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_CASTPARTY_FEATURES")
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("CastPartyRaidOnly")
                                                                                end
                                                                                this.configVar = "CastParty"
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_CastPartyRaidOnly" inherits="XPerlCheckButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="26" y="26"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOP" relativePoint="BOTTOMRIGHT" relativeTo="$parent_CastParty">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_CASTPARTY_RAID")
                                                                                this.configVar = "CastPartyRaidOnly"
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                </Frames>
                                        </Frame>

                                        <CheckButton name="$parent_SettingsMethod" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_CastPartyOptions" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="3" y="-5"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_SAVEPERCHARACTER")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfigSavePerCharacter = this:GetChecked()
                                                                XPerl_SetMyGlobal()
                                                        </OnClick>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfigSavePerCharacter)
                                                        </OnShow>
                                                </Scripts>
                                        </CheckButton>

                                        <Button name="$parent_Reset" inherits="XPerlButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="110" y="24"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_SettingsMethod" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="0" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RESET_DEFAULTS")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_Popup(XPERL_CONF_CONFIRM_RESET, XPerl_ResetDefaults)
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Frame name="XPerl_Options_DropDown_LoadSettings" inherits="UIDropDownMenuTemplate" enableMouse="true">
						<Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Reset" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="-15" y="-20" />
                                                                </Offset>
                                                        </Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
                                                                <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="XPERL_CONF_LOAD_SETTINGS">
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
											<Offset>
                                                                                                <AbsDimension x="21" y="3"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
                                                                XPerl_Options_LoadSettings_OnLoad()
							</OnLoad>
							<OnShow>
                                                                XPerl_Options_LoadSettings_OnLoad()
							</OnShow>
							<OnEnter>
                                                                GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -15, 0)
                                                                GameTooltip:SetText(XPERL_CONF_LOAD_SETTINGS_DESC, nil, nil, nil, nil, 1)
                                                                getglobal(this:GetName().."Label"):SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
                                                        </OnEnter>
                                                        <OnLeave>
                                                                getglobal(this:GetName().."Label"):SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
                                                                GameTooltip:Hide()
							</OnLeave>
						</Scripts>
					</Frame>

                                </Frames>
                        </Frame>

                        -- Player Options
                        <Frame name="$parent_Player_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="6" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PORTRAIT")
                                                                this.flashFrame = XPerl_Player_PortraitFrame
                                                                this.flashShow = "ShowPlayerPortrait"
                                                                this.flashEnd = XPerl_Player_UpdatePortrait
                                                                this.configVar = "ShowPlayerPortrait"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Portrait3D")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Portrait3D" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Portrait" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PORTRAIT3D")
                                                                this.flashFrame = XPerl_Player_PortraitFrame
                                                                this.flashShow = "ShowPlayerPortrait"
                                                                this.flashEnd = XPerl_Player_UpdatePortrait
                                                                this.configVar = "ShowPlayerPortrait3D"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PlayerLevel" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_LEVEL")
                                                                this.flashFrame = XPerl_Player_LevelFrame
                                                                this.flashShow = "ShowPlayerLevel"
                                                                this.configVar = "ShowPlayerLevel"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PlayerClassIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PlayerLevel" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_ICON")
                                                                this.flashFrame = XPerl_Player_ClassTexture
                                                                this.flashShow = "ShowPlayerClassIcon"
                                                                this.configVar = "ShowPlayerClassIcon"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PlayerXP" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PlayerClassIcon" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_XP")
                                                                this.flashFrame = XPerl_Player_XPBar
                                                                this.flashShow = "ShowPlayerXPBar"
                                                                this.configVar = "ShowPlayerXPBar"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPRank" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PlayerXP" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PVP")
                                                                this.flashFrame = XPerl_Player_PVPRankIcon
                                                                this.flashEnd = function() XPerl_Player_NameFrame_PVPRankIcon:SetAlpha(0.3); end
                                                                this.configVar = "ShowPlayerPVPRank"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPRank" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="65" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PVPICON")
                                                                this.flashFrame = XPerl_Player_PVPStatus
                                                                this.configVar = "ShowPlayerPVP"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPRank" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_VALUES")
                                                                this.flashFrame = {XPerl_Player_StatsFrame_HealthBarText, XPerl_Player_StatsFrame_ManaBarText, XPerl_Player_StatsFrame_XPBarText}
                                                                this.flashEnd = XPerl_Player_UpdateDisplay
                                                                this.flashShow = "ShowPlayerValues"
                                                                this.configVar = "ShowPlayerValues"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="65" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PERCENT")
                                                                this.flashFrame = {XPerl_Player_StatsFrame_HealthBarPercent, XPerl_Player_StatsFrame_ManaBarPercent, XPerl_Player_StatsFrame_XPBarPercent}
                                                                this.flashEnd = XPerl_Player_UpdateDisplay
                                                                this.flashShow = "ShowPlayerPercent"
                                                                this.configVar = "ShowPlayerPercent"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_EnergyTicker" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_ENERGY")
                                                                this.flashFrame = XPerl_Player_EnergyTicker
                                                                this.configVar = "EnergyTicker"
                                                                this.configClick = XPerl_Player_TickerShowHide
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Number" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_EnergyTicker" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_PARTY_NUM")
                                                                this.flashFrame = XPerl_Player_GroupFrame
                                                                this.configVar = "ShowPartyNumber"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Number" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_HEALER_MODE")
                                                                this.configVar = "HealerModePlayer"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("DeficitOnly")
                                                                        XPerl_Options_EnableSibling("DeficitMax")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitOnly" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="8"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_HEALERMODE_DEFICIT")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HealerModePlayerType == 0)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HealerModePlayerType = 0
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitMax" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_DeficitOnly" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="40" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_HEALERMODE_DEFICITMAX")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HealerModePlayerType == 1)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HealerModePlayerType = 1
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Fullscreen" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_DeficitOnly" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_FULLSCREEN")
                                                                this.configVar = "FullScreenStatus"
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("FullscreenWarn")
                                                                        XPerl_Options_EnableSibling("FullscreenOK")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_FullscreenWarn" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="100" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Fullscreen" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-6"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_FULLSCREENWARN")
                                                                getglobal(this:GetName().."Low"):SetText("1")
                                                                getglobal(this:GetName().."High"):SetText("75")

                                                                this:SetMinMaxValues(1, 75)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfig.FullScreenStatusWarn)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfig.FullScreenStatusWarn ~= this:GetValue()) then
                                                                        XPerlConfig.FullScreenStatusWarn = floor(this:GetValue() + 0.5)
                                                                        XPerl_Options_Player_Options_FullscreenOK:SetMinMaxValues(XPerlConfig.FullScreenStatusWarn, 100)
                                                                        XPerl_Options_Player_Options_FullscreenOKLow:SetText(XPerlConfig.FullScreenStatusWarn)
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.FullScreenStatusWarn)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_FullscreenOK" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="100" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_FullscreenWarn" relativePoint="TOPRIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="8" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_FULLSCREENOK")
                                                                getglobal(this:GetName().."Low"):SetText(XPerlConfig.FullScreenStatusWarn)
                                                                getglobal(this:GetName().."High"):SetText("100")

                                                                this:SetMinMaxValues(XPerlConfig.FullScreenStatusWarn, 100)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfig.FullScreenStatusOK)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                XPerlConfig.FullScreenStatusOK = floor(this:GetValue() + 0.5)
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.FullScreenStatusOK)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Frame name="$parent_PetOptions">
                                                <Scripts>
                                                        <OnLoad>
                                                                if (not XPerl_Player_Pet) then
                                                                        this:Hide()
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOP" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="0" y="-5"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="-5" y="5"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_PET_OPTIONS">
                                                                                <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <CheckButton name="$parent_PetName" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_NAME")
                                                                                this.flashFrame = XPerl_Player_Pet_NameFrame
                                                                                this.flashEnd = XPerl_Player_Pet_UpdateDisplay
                                                                                this.flashShow = "ShowPlayerPetName"
                                                                                this.configVar = "ShowPlayerPetName"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_PetName">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_PORTRAIT")
                                                                                this.flashFrame = XPerl_Player_Pet_PortraitFrame
                                                                                this.flashEnd = XPerl_Player_Pet_UpdatePortrait
                                                                                this.flashShow = "ShowPlayerPetPortrait"
                                                                                this.configVar = "ShowPlayerPetPortrait"
                                                                                this.configClick = XPerl_OptionActions
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("Portrait3D")
                                                                                end
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Portrait3D" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOP" relativeTo="$parent_Portrait" relativePoint="BOTTOMRIGHT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_PORTRAIT3D")
                                                                                this.flashFrame = XPerl_Player_Pet_PortraitFrame
                                                                                this.flashShow = "ShowPlayerPetPortrait"
                                                                                this.flashEnd = XPerl_Player_Pet_UpdatePortrait
                                                                                this.configVar = "ShowPlayerPetPortrait3D"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Happiness" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOM">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_HAPPINESS")
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("OnlySad")
                                                                                        XPerl_Options_EnableSibling("FlashSad")
                                                                                end
                                                                                this.flashFrame = XPerl_Player_Pet_HappyFrame
                                                                                this.flashEnd = XPerl_Player_Pet_SetHappiness
                                                                                this.configVar = "PetHappiness"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_OnlySad" inherits="XPerlCheckButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="26" y="26"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOP" relativePoint="BOTTOMRIGHT" relativeTo="$parent_Happiness">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_ONLYSAD")
                                                                                this.flashFrame = XPerl_Player_Pet_HappyFrame
                                                                                this.flashEnd = XPerl_Player_Pet_SetHappiness
                                                                                this.configVar = "PetHappinessSad"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_FlashSad" inherits="XPerlCheckButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="26" y="26"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_OnlySad" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_FLASHSAD")
                                                                                this.flashFrame = XPerl_Player_Pet_HappyFrame
                                                                                this.flashEnd = XPerl_Player_Pet_SetHappiness
                                                                                this.configVar = "PetFlashWhenSad"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_FlashSad" relativePoint="BOTTOM">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_LEVEL")
                                                                                this.flashFrame = XPerl_Player_Pet_LevelFrame
                                                                                this.flashShow = "ShowPetLevel"
                                                                                this.configVar = "ShowPetLevel"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_XP" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_XP")
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                XPerlConfig.ShowPetXP = XPerl_GetCheck(this)
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                        <OnShow>
                                                                                this:SetChecked(XPerlConfig.ShowPetXP)
                                                                        </OnShow>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_XP" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_VALUES")
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                XPerlConfig.ShowPlayerPetValues = XPerl_GetCheck(this)
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                        <OnShow>
                                                                                this:SetChecked(XPerlConfig.ShowPlayerPetValues)
                                                                        </OnShow>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                                <Size>
                                                                        <AbsDimension x="160" y="16"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Values">
                                                                                <Offset>
                                                                                        <AbsDimension x="3" y="-8" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_SCALE")
                                                                                XPerl_Options_RegisterScalingSlider(this)
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                this:SetValue(math.floor(100 * XPerlConfig.Scale_PetFrame + 0.5))
                                                                        </OnShow>
                                                                        <OnValueChanged>
                                                                                if (math.floor(100 * XPerlConfig.Scale_PetFrame + 0.5) ~= this:GetValue()) then
                                                                                        XPerlConfig.Scale_PetFrame = this:GetValue() / 100
                                                                                        XPerl_OptionActions()
                                                                                end
                                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfig.Scale_PetFrame + 0.5).."%")
                                                                        </OnValueChanged>
                                                                </Scripts>
                                                        </Slider>

                                                        <Slider name="$parent_BuffSize" inherits="XPerlSlider">
                                                                <Size>
                                                                        <AbsDimension x="160" y="16"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Scale" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-20"/>
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PLAYER_PET_BUFF_SIZE")
                                                                                getglobal(this:GetName().."Low"):SetText("14")
                                                                                getglobal(this:GetName().."High"):SetText("38")

                                                                                this:SetMinMaxValues(14, 38)
                                                                                this:SetValueStep(1)
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                this:SetValue(XPerlConfig.PlayerPetBuffSize)
                                                                        </OnShow>
                                                                        <OnValueChanged>
                                                                                if (XPerlConfig.PlayerPetBuffSize ~= this:GetValue()) then
                                                                                        XPerlConfig.PlayerPetBuffSize = this:GetValue()
                                                                                        XPerl_Player_Pet_Set_Bits()
                                                                                        XPerl_Player_Pet_UpdateDisplay ()
                                                                                end
                                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.PlayerPetBuffSize)
                                                                        </OnValueChanged>
                                                                </Scripts>
                                                        </Slider>
                                                </Frames>
                                        </Frame>
                                </Frames>
                        </Frame>

                        -- Target Options
                        <Frame name="$parent_Target_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="6" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_PORTRAIT")
                                                                this.flashFrame = XPerl_Target_PortraitFrame
                                                                this.flashShow = "ShowTargetPortrait"
                                                                this.flashEnd = XPerl_Target_UpdatePortrait
                                                                this.configVar = "ShowTargetPortrait"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Portrait3D")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Portrait3D" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Portrait" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_PORTRAIT3D")
                                                                this.flashFrame = XPerl_Target_PortraitFrame
                                                                this.flashShow = "ShowTargetPortrait"
                                                                this.flashEnd = XPerl_Target_UpdatePortrait
                                                                this.configVar = "ShowTargetPortrait3D"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Reaction" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_REACTION")
                                                                this.flashFrame = XPerl_Target_NameFrame
                                                                this.configVar = "TargetReactionHighlight"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ClassIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Reaction" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_ICON")
                                                                this.flashFrame = XPerl_Target_ClassTexture
                                                                this.flashShow = "ShowTargetClassIcon"
                                                                this.configVar = "ShowTargetClassIcon"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_MobType" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ClassIcon" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_MOBTYPE")
                                                                this.flashFrame = XPerl_Target_TypeFrame
                                                                this.flashEnd = XPerl_Target_UpdateDisplay
                                                                this.configVar = "ShowTargetMobType"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_MobType" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_LEVEL")
                                                                this.flashFrame = XPerl_Target_LevelFrame
                                                                this.flashEnd = XPerl_Target_UpdateDisplay
                                                                this.configVar = "ShowTargetLevel"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Elite" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="65" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_ELITE")
                                                                this.flashFrame = XPerl_Target_BossFrame
                                                                this.flashEnd = XPerl_Target_UpdateDisplay
                                                                this.configVar = "ShowTargetElite"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_VALUES")
                                                                this.flashFrame = {XPerl_Target_StatsFrame_HealthBarText, XPerl_Target_StatsFrame_ManaBarText}
                                                                this.flashEnd = XPerl_Target_UpdateDisplay
                                                                this.flashShow = "ShowTargetValues"
                                                                this.configVar = "ShowTargetValues"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="65" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_PERCENT")
                                                                this.flashFrame = {XPerl_Target_StatsFrame_HealthBarPercent, XPerl_Target_StatsFrame_ManaBarPercent}
                                                                this.flashEnd = XPerl_Target_UpdateDisplay
                                                                this.flashShow = "ShowTargetPercent"
                                                                this.configVar = "ShowTargetPercent"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPRank" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_PVP")
                                                                this.flashFrame = XPerl_Target_PVPRankIcon
                                                                this.flashShow = "ShowTargetPVPRank"
                                                                this.flashEnd = function() XPerl_Target_NameFrame_PVPRankIcon:SetAlpha(0.3); end
                                                                this.configVar = "ShowTargetPVPRank"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPRank" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="65" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_PVPICON")
                                                                this.flashFrame = XPerl_Target_NameFrame_PVPStatus
                                                                this.configVar = "ShowTargetPVP"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_CPBlizzard" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPRank" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CPBLIZZ")
                                                                this.flashFrame = ComboFrame
                                                                this.flashEnd = function() ComboFrame:Hide(); end
                                                                this.configVar = "BlizzardCPMeter"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Top")
                                                                        XPerl_Options_EnableSibling("Bottom")
                                                                        XPerl_Options_EnableSibling("Left")
                                                                        XPerl_Options_EnableSibling("Right")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Top" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_CPBlizzard" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(XPerlConfig.BlizzardCPPosition == "top")
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CPBLIZZ_POSTOP")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfig.BlizzardCPPosition = "top"
                                                                XPerl_Options_CheckRadio({"Top", "Bottom", "Left", "Right"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Bottom" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Top" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="60" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(XPerlConfig.BlizzardCPPosition == "bottom")
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CPBLIZZ_POSBOTTOM")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfig.BlizzardCPPosition = "bottom"
                                                                XPerl_Options_CheckRadio({"Top", "Bottom", "Left", "Right"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Left" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Top" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(XPerlConfig.BlizzardCPPosition == "left")
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CPBLIZZ_POSLEFT")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfig.BlizzardCPPosition = "left"
                                                                XPerl_Options_CheckRadio({"Top", "Bottom", "Left", "Right"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Right" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Left" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="60" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                this:SetChecked(XPerlConfig.BlizzardCPPosition == "right")
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CPBLIZZ_POSRIGHT")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfig.BlizzardCPPosition = "right"
                                                                XPerl_Options_CheckRadio({"Top", "Bottom", "Left", "Right"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_CPMeter" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Left" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CP")
                                                                this.flashFrame = XPerl_Target_NameFrame
                                                                this.configVar = "UseCPMeter"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_RaidIconAlt" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_CPMeter" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_RAIDICON_ALT")
                                                                this.flashFrame = XPerl_Target_NameFrame_RaidIcon
                                                                this.flashEnd = function() XPerl_Target_NameFrame_RaidIcon:Hide(); end
                                                                this.configVar = "AlternateRaidIcon"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_30yd" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_RaidIconAlt" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_30YD")
                                                                this.configVar = "Show30YardSymbol"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_30yd" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_HEALER_MODE")
                                                                this.configVar = "HealerModeTarget"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("DeficitOnly")
                                                                        XPerl_Options_EnableSibling("DeficitMax")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitOnly" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="8"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_HEALERMODE_DEFICIT")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HealerModeTargetType == 0)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HealerModeTargetType = 0
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitMax" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_DeficitOnly" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="40" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_HEALERMODE_DEFICITMAX")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HealerModeTargetType == 1)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HealerModeTargetType = 1
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <Frame name="$parent_TargetTarget">
                                                <Scripts>
                                                        <OnLoad>
                                                                if (not XPerl_TargetTarget) then
                                                                        this:Hide()
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOP" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="0" y="-5"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs" relativePoint="RIGHT">
                                                                <Offset><AbsDimension x="-5" y="-6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_TARGETTARGET_OPTIONS">
                                                                                <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <CheckButton name="$parent_TargetsTarget" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETS_TARGET")
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("TargetsTargetsTarget")
                                                                                        XPerl_Options_EnableSibling("History")
                                                                                        XPerl_Options_EnableSibling("Buffs")
                                                                                        XPerl_Options_EnableSibling("TTTBuffs", getglobal(this:GetParent():GetName().."_TargetsTargetsTarget"))
                                                                                        XPerl_Options_EnableSibling("Level")
                                                                                        XPerl_Options_EnableSibling("Values")
                                                                                        XPerl_Options_EnableSibling("Percent")
                                                                                        XPerl_Options_EnableSibling("Mana")
                                                                                end
                                                                                this.flashFrame = XPerl_TargetTarget
                                                                                this.flashEnd = function() XPerl_TargetTarget_UpdateDisplay (XPerl_TargetTarget); end
                                                                                this.configVar = "ShowTargetTarget"
                                                                                this.configClick = function()
                                                                                        XPerl_OptionActions()
                                                                                        if (XPerlConfig.ShowTargetTarget == 0) then
                                                                                                if (IsAddOnLoaded("XPerl_TargetTarget")) then
                                                                                                        XPerl_Popup(XPERL_CONF_QUERY_DISABLE_TT, function() DisableAddOn("XPerl_TargetTarget"); end)
                                                                                                end
                                                                                        end
                                                                                end
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_History" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOP" relativeTo="$parent_TargetsTarget" relativePoint="BOTTOMRIGHT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETS_HISTORY")
                                                                                this.configVar = "TargetTargetHistory"
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_History" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_BUFFS")
                                                                                this.flashFrame = XPerl_TargetTarget_BuffFrame
                                                                                this.flashShow = "TargetTargetBuffs"
                                                                                this.configVar = "TargetTargetBuffs"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Above" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Buffs" relativePoint="BOTTOM">
                                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_BUFFSABOVE")
                                                                                this.flashFrame = XPerl_TargetTarget_BuffFrame
                                                                                this.configVar = "TargetTargetBuffsAbove"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_TargetsTargetsTarget" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Above" relativePoint="BOTTOM">
                                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETS_TARGETS_TARGET")
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("TTTBuffs")
                                                                                end
                                                                                this.flashFrame = XPerl_TargetTargetTarget
                                                                                this.flashEnd = function() XPerl_TargetTarget_Set_Bits(); XPerl_TargetTarget_UpdateDisplay (XPerl_TargetTargetTarget); end
                                                                                this.configVar = "ShowTargetTargetTarget"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_TTTBuffs" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TargetsTargetsTarget" relativePoint="BOTTOM">
                                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                getglobal(this:GetName().."Text"):SetWidth(160)
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGETTARGET_BUFFS")
                                                                                this.flashFrame = XPerl_TargetTargetTarget_BuffFrame
                                                                                this.flashShow = "TargetTargetTargetBuffs"
                                                                                this.configVar = "TargetTargetTargetBuffs"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_TTTBuffs" relativePoint="BOTTOM">
                                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_LEVEL")
                                                                                this.flashFrame = XPerl_TargetTarget_LevelFrame
                                                                                this.flashShow = "ShowTargetTargetLevel"
                                                                                this.configVar = "ShowTargetTargetLevel"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Mana" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="TOPRIGHT">
                                                                                <Offset><AbsDimension x="50" y="0"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_MANA")
                                                                                this.flashFrame = {XPerl_TargetTarget_StatsFrame_ManaBar, XPerl_TargetTargetTarget_StatsFrame_ManaBar}
                                                                                this.flashEnd = XPerl_OptionActions
                                                                                this.configVar = "ShowTargetTargetMana"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="7"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_VALUES")
                                                                                this.flashFrame = {XPerl_TargetTarget_StatsFrame_HealthBarText, XPerl_TargetTarget_StatsFrame_ManaBarText, XPerl_TargetTargetTarget_StatsFrame_HealthBarText, XPerl_TargetTargetTarget_StatsFrame_ManaBarText}
                                                                                this.flashShow = "ShowTargetTargetValues"
                                                                                this.configVar = "ShowTargetTargetValues"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
                                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="TOPRIGHT">
                                                                                <Offset><AbsDimension x="50" y="0"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGETTARGET_PERCENT")
                                                                                this.flashFrame = {XPerl_TargetTarget_StatsFrame_HealthBarPercent, XPerl_TargetTarget_StatsFrame_ManaBarPercent, XPerl_TargetTargetTarget_StatsFrame_HealthBarPercent, XPerl_TargetTargetTarget_StatsFrame_ManaBarPercent}
                                                                                this.flashShow = "ShowTargetTargetPercent"
                                                                                this.configVar = "ShowTargetTargetPercent"
                                                                                this.configClick = XPerl_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                </Frames>
                                        </Frame>

                                        <Slider name="$parent_BuffSize" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="150" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TargetTarget" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="6" y="-13"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_BUFF_SIZE")
                                                                getglobal(this:GetName().."Low"):SetText("14")
                                                                getglobal(this:GetName().."High"):SetText("38")

                                                                this:SetMinMaxValues(14, 38)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfig.TargetBuffSize)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfig.TargetBuffSize ~= this:GetValue()) then
                                                                        XPerlConfig.TargetBuffSize = this:GetValue()
                                                                        XPerl_Target_Set_Bits()
                                                                        XPerl_Target_UpdateDisplay()
                                                                        if (XPerl_TargetTarget) then
                                                                                XPerl_TargetTarget_Set_Bits()
                                                                                XPerl_TargetTarget_UpdateDisplay(XPerl_TargetTarget,true)
                                                                                if (XPerl_TargetTargetTarget) then
                                                                                        XPerl_TargetTarget_UpdateDisplay(XPerl_TargetTargetTarget,true)
                                                                                end
                                                                        end
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.TargetBuffSize)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_MaxRows" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="150" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-20" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_BUFF_ROWS")
                                                                getglobal(this:GetName().."Low"):SetText("1")
                                                                getglobal(this:GetName().."High"):SetText("6")

                                                                this:SetMinMaxValues(1, 6)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfig.TargetBuffRows)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfig.TargetBuffRows ~= this:GetValue()) then
                                                                        XPerlConfig.TargetBuffRows = this:GetValue()
                                                                        XPerl_Target_Set_Bits()
                                                                        XPerl_Target_UpdateDisplay()
                                                                        if (XPerl_TargetTarget) then
                                                                                XPerl_TargetTarget_Set_Bits()
                                                                                XPerl_TargetTarget_UpdateDisplay(XPerl_TargetTarget,true)
                                                                                if (XPerl_TargetTargetTarget) then
                                                                                        XPerl_TargetTarget_UpdateDisplay(XPerl_TargetTargetTarget,true)
                                                                                end
                                                                        end
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.TargetBuffRows)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <CheckButton name="$parent_Castable" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_MaxRows" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="-3" y="-8"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CASTABLE")
                                                                this.configVar = "TargetCastableBuffs"
                                                                this.configClick = XPerl_Target_UpdateDisplay
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Curable" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Castable" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_CURABLE")
                                                                this.configVar = "TargetCurableDebuffs"
                                                                this.configClick = XPerl_Target_UpdateDisplay
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Above" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Curable" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_BUFFSABOVE")
                                                                this.flashFrame = XPerl_Target_BuffFrame
                                                                this.configVar = "TargetBuffsAbove"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Mana" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_MANA")
                                                                this.flashFrame = XPerl_Target_StatsFrame_ManaBar
                                                                this.flashEnd = XPerl_Target_UpdateDisplay
                                                                this.configVar = "ShowTargetMana"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Defer" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Mana" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="50" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_DEFER")
                                                                this.configVar = "TargetChangeDefer"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>
                                </Frames>
                        </Frame>

                        -- Party options
                        <Frame name="$parent_Party_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <CheckButton name="$parent_Name" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="6" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_NAMES")
                                                                this.flashFrame = {XPerl_party1_NameFrame, XPerl_party2_NameFrame, XPerl_party3_NameFrame, XPerl_party4_NameFrame}
                                                                this.flashShow = "ShowPartyNames"
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "ShowPartyNames"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Name" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PORTRAIT")
                                                                this.flashFrame = {XPerl_party1_PortraitFrame, XPerl_party2_PortraitFrame, XPerl_party3_PortraitFrame, XPerl_party4_PortraitFrame}
                                                                this.flashShow = "ShowPartyPortrait"
                                                                --this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.flashEnd = function() if (XPerl_party1) then
                                                                                                for i = 1,4 do
                                                                                                    XPerl_Party_UpdatePortrait(getglobal("XPerl_party"..i))
                                                                                                end
                                                                                           end
                                                                                end
                                                                this.configVar = "ShowPartyPortrait"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Portrait3D")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Portrait3D" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Portrait" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PORTRAIT3D")
                                                                this.flashFrame = {XPerl_party1_PortraitFrame, XPerl_party2_PortraitFrame, XPerl_party3_PortraitFrame, XPerl_party4_PortraitFrame}
                                                                this.flashShow = "ShowPartyPortrait"
                                                                this.flashEnd = getglobal(this:GetParent():GetName().."_Portrait").flashEnd
                                                                this.configVar = "ShowPartyPortrait3D"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_LEVEL")
                                                                this.flashFrame = {XPerl_party1_LevelFrame, XPerl_party2_LevelFrame, XPerl_party3_LevelFrame, XPerl_party4_LevelFrame}
                                                                this.flashShow = "ShowPartyLevel"
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "ShowPartyLevel"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Target" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_TARGET")
                                                                this.flashFrame = {XPerl_party1_TargetFrame, XPerl_party2_TargetFrame, XPerl_party3_TargetFrame, XPerl_party4_TargetFrame}
                                                                this.flashShow = "ShowPartyTarget"
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "ShowPartyTarget"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Icon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Target" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_ICON")
                                                                this.flashFrame = {XPerl_party1_LevelFrame_ClassTexture, XPerl_party2_LevelFrame_ClassTexture, XPerl_party3_LevelFrame_ClassTexture, XPerl_party4_LevelFrame_ClassTexture}
                                                                this.flashShow = "ShowPartyClassIcon"
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "ShowPartyClassIcon"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Icon" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_VALUES")
                                                                this.flashFrame = {XPerl_party1_StatsFrame_HealthBarText, XPerl_party2_StatsFrame_HealthBarText, XPerl_party3_StatsFrame_HealthBarText, XPerl_party4_StatsFrame_HealthBarText,
                                                                                        XPerl_party1_StatsFrame_ManaBarText, XPerl_party2_StatsFrame_ManaBarText, XPerl_party3_StatsFrame_ManaBarText, XPerl_party4_StatsFrame_ManaBarText}
                                                                this.flashShow = "ShowPartyValues"
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "ShowPartyValues"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PERC")
                                                                this.flashFrame = {XPerl_party1_StatsFrame_HealthBarPercent, XPerl_party2_StatsFrame_HealthBarPercent, XPerl_party3_StatsFrame_HealthBarPercent, XPerl_party4_StatsFrame_HealthBarPercent,
                                                                                        XPerl_party1_StatsFrame_ManaBar_ManaBarPercent, XPerl_party2_StatsFrame_ManaBarPercent, XPerl_party3_StatsFrame_ManaBarPercent, XPerl_party4_StatsFrame_ManaBarPercent}
                                                                this.flashShow = "ShowPartyPercent"
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "ShowPartyPercent"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Percent" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PVPICON")
                                                                this.flashFrame = XPerl_Player_PVPStatus
                                                                this.configVar = "ShowPartyPVP"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_InRaid" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPIcon" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_INRAID")
                                                                this.configVar = "ShowPartyRaid"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_30yd" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_InRaid" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_30YD")
                                                                this.configVar = "ShowParty30YardSymbol"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_30yd" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_HEALER_MODE")
                                                                this.configVar = "HealerModeParty"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("DeficitOnly")
                                                                        XPerl_Options_EnableSibling("DeficitMax")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitOnly" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="8"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_HEALERMODE_DEFICIT")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HealerModePartyType == 0)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HealerModePartyType = 0
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitMax" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_DeficitOnly" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="40" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_HEALERMODE_DEFICITMAX")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfig.HealerModePartyType == 1)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.HealerModePartyType = 1
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Pets" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOP">
                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PETS")
                                                                this.flashFrame = {XPerl_partypet1, XPerl_partypet2, XPerl_partypet3, XPerl_partypet4}
                                                                this.flashEnd = function()
                                                                                        if (IsAddOnLoaded("XPerl_PartyPet")) then
                                                                                                XPerl_Party_Pet_UpdateDisplayAll()
                                                                                                XPerl_Party_UpdateDisplayAll()
                                                                                        end
                                                                                end
                                                                this.configVar = "ShowPartyPets"
                                                                this.configClick = function()
                                                                        if (XPerlConfig.ShowPartyPets == 0) then
                                                                                if (IsAddOnLoaded("XPerl_PartyPet")) then
                                                                                        XPerl_Party_Pet_UpdateDisplayAll()
                                                                                        XPerl_Party_UpdateDisplayAll()
                                                                                        XPerl_Popup(XPERL_CONF_QUERY_DISABLE_PARTY_PET, function() DisableAddOn("XPerl_PartyPet"); end)
                                                                                end
                                                                        end
                                                                end
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("PetNames")
                                                                        XPerl_Options_EnableSibling("PetBuffs")
                                                                        XPerl_Options_EnableSibling("PetLevel")
                                                                        XPerl_Options_EnableSibling("PetMana")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PetNames" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Pets" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PETNAME")
                                                                this.flashFrame = {XPerl_partypet1_NameFrame, XPerl_partypet2_NameFrame, XPerl_partypet3_NameFrame, XPerl_partypet4_NameFrame}
                                                                this.flashEnd = function()
                                                                                        if (IsAddOnLoaded("XPerl_PartyPet")) then
                                                                                                XPerl_Party_Pet_UpdateDisplayAll()
                                                                                        end
                                                                                end
                                                                this.configVar = "ShowPartyPetName"
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("PetLevel")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PetLevel" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PetNames" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PETLEVEL")
                                                                this.flashFrame = {XPerl_partypet1_NameFrameLevelText, XPerl_partypet2_NameFrameLevelText, XPerl_partypet3_NameFrameLevelText, XPerl_partypet4_NameFrameLevelText}
                                                                this.flashEnd = function()
                                                                                        if (IsAddOnLoaded("XPerl_PartyPet")) then
                                                                                                XPerl_Party_Pet_UpdateDisplayAll()
                                                                                        end
                                                                                end
                                                                this.configVar = "ShowPartyPetLevel"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PetBuffs" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_PetLevel" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PETBUFFS")
                                                                this.flashFrame = {XPerl_partypet1_NameFrame, XPerl_partypet2_NameFrame, XPerl_partypet3_NameFrame, XPerl_partypet4_NameFrame}
                                                                this.flashEnd = function()
                                                                                        if (IsAddOnLoaded("XPerl_PartyPet")) then
                                                                                                XPerl_Party_Pet_UpdateDisplayAll()
                                                                                        end
                                                                                end
                                                                this.configVar = "ShowPartyPetBuffs"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PetMana" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PetBuffs" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_PETMANA")
                                                                this.flashFrame = {XPerl_partypet1_StatsFrame_ManaBar, XPerl_partypet2_StatsFrame_ManaBar, XPerl_partypet3_StatsFrame_ManaBar, XPerl_partypet4_StatsFrame_ManaBar}
                                                                this.flashEnd = function()
                                                                                        if (IsAddOnLoaded("XPerl_PartyPet")) then
                                                                                                XPerl_Party_Pet_UpdateDisplayAll()
                                                                                        end
                                                                                end
                                                                this.configVar = "ShowPartyPetMana"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_PetMana" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_BUFFS")
                                                                this.flashFrame = {XPerl_party1_BuffFrame, XPerl_party2_BuffFrame, XPerl_party3_BuffFrame, XPerl_party4_BuffFrame}
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "PartyBuffs"
                                                                this.configClick = XPerl_Party_UpdateDisplayAll
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Castable")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Castable" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Buffs" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_CASTABLE")
                                                                this.configVar = "PartyCastableBuffs"
                                                                this.configClick = XPerl_Party_UpdateDisplayAll
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Debuffs" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Castable" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_DEBUFFS")
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Curable")
                                                                        XPerl_Options_EnableSibling("Below")
                                                                end
                                                                this.flashFrame = {XPerl_party1_BuffFrame, XPerl_party2_BuffFrame, XPerl_party3_BuffFrame, XPerl_party4_BuffFrame}
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "PartyDebuffs"
                                                                this.configClick = XPerl_Party_UpdateDisplayAll
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Curable" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Debuffs" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_CURABLE")
                                                                this.configVar = "PartyCurableDebuffs"
                                                                this.configClick = XPerl_Party_UpdateDisplayAll
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Below" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Curable" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_DEBUFFSBELOW")
                                                                this.flashFrame = {XPerl_party1_BuffFrame, XPerl_party2_BuffFrame, XPerl_party3_BuffFrame, XPerl_party4_BuffFrame}
                                                                this.flashEnd = XPerl_Party_UpdateDisplayAll
                                                                this.configVar = "PartyDebuffsBelow"
                                                                this.configClick = function()
                                                                        XPerl_Party_Set_Bits()
                                                                        XPerl_Party_UpdateDisplayAll()
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_BuffSize" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="150" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Below" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="-13" y="-13"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_PARTY_BUFF_SIZE")
                                                                getglobal(this:GetName().."Low"):SetText("14")
                                                                getglobal(this:GetName().."High"):SetText("38")

                                                                this:SetMinMaxValues(14, 38)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfig.PartyBuffSize)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfig.PartyBuffSize ~= this:GetValue()) then
                                                                        XPerlConfig.PartyBuffSize = this:GetValue()
                                                                        XPerl_Party_Set_Bits()
                                                                        XPerl_Party_UpdateDisplayAll()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.PartyBuffSize)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>

                        -- Raid Options
                        <Frame name="$parent_Raid_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <CheckButton name="$parent_Enable" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="6" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_SHOW")
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Titles")
                                                                        XPerl_Options_EnableSibling("Percent")
                                                                        XPerl_Options_EnableSibling("ByClass")
                                                                        XPerl_Options_EnableSibling("Tanker")
                                                                        XPerl_Options_EnableSibling("Buffs")
                                                                        XPerl_Options_EnableSibling("Debuffs")
                                                                        XPerl_Options_EnableSibling("Castable")
                                                                        XPerl_Options_EnableSibling("BuffsRight")
                                                                        XPerl_Options_EnableSibling("BuffsInside")
                                                                        XPerl_Options_EnableSibling("Motion")
                                                                        XPerl_Options_EnableSibling("Groups_Grp1")
                                                                        XPerl_Options_EnableSibling("Groups_Grp2")
                                                                        XPerl_Options_EnableSibling("Groups_Grp3")
                                                                        XPerl_Options_EnableSibling("Groups_Grp4")
                                                                        XPerl_Options_EnableSibling("Groups_Grp5")
                                                                        XPerl_Options_EnableSibling("Groups_Grp6")
                                                                        XPerl_Options_EnableSibling("Groups_Grp7")
                                                                        XPerl_Options_EnableSibling("Groups_Grp8")
                                                                        --XPerl_Options_EnableSibling("Groups_Grp9")
                                                                        XPerl_Options_EnableSibling("Groups_VSpacing")
                                                                end
                                                                this.configVar = "ShowRaid"
                                                                this.configClick = function()
                                                                        XPerl_OptionActions()
                                                                        if (XPerlConfig.ShowRaid == 0) then
                                                                                if (IsAddOnLoaded("XPerl_RaidFrames")) then
                                                                                        XPerl_Popup(XPERL_CONF_QUERY_DISABLE_RAID, function() DisableAddOn("XPerl_RaidFrames"); end)
                                                                                end
                                                                        end
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Titles" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Enable" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_TITLES")
                                                                this.configVar = "ShowRaidTitles"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Upward" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Titles" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_UPWARD")
                                                                this.configVar = "RaidUpward"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Mana" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Upward" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_MANA")
                                                                this.configVar = "RaidMana"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Mana" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_PERCENTS")
                                                                this.configVar = "ShowRaidPercents"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ByClass" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Percent" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_SORTBYCLASS")
                                                                this.configVar = "SortRaidByClass"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Tanker" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ByClass" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_TANKER")
                                                                this.configVar = "RaidHighlightTanker"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Tanker" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_BUFFS")
                                                                this.configVar = "RaidBuffs"
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Castable", "or", getglobal(this:GetParent():GetName().."_Debuffs"))
                                                                end
                                                                this.configClick = function()
                                                                                                if (XPerlConfig.RaidBuffs == 1) then
                                                                                                        XPerlConfig.RaidDebuffs = 0
                                                                                                        getglobal(this:GetParent():GetName().."_Debuffs"):SetChecked(0)
                                                                                                end
                                                                                                this.Validate()
                                                                                                XPerl_Raid_OptionActions()
                                                                                        end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Debuffs" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Buffs" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_DEBUFFS")
                                                                this.configVar = "RaidDebuffs"
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("Castable", "or", getglobal(this:GetParent():GetName().."_Buffs"))
                                                                end
                                                                this.configClick = function()
                                                                                                if (XPerlConfig.RaidDebuffs == 1) then
                                                                                                        XPerlConfig.RaidBuffs = 0
                                                                                                        getglobal(this:GetParent():GetName().."_Buffs"):SetChecked(0)
                                                                                                end
                                                                                                this.Validate()
                                                                                                XPerl_Raid_OptionActions()
                                                                                        end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Castable" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Debuffs" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_CASTABLE")
                                                                this.configVar = "BuffsCastableCurable"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_BuffsRight" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_Castable" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_BUFFSRIGHT")
                                                                this.configVar = "RaidBuffsRight"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("BuffsInside")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_BuffsInside" inherits="XPerlCheckButtonTemplate">
                                                <Size><AbsDimension x="26" y="26"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_BuffsRight" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_BUFFSINSIDE")
                                                                this.configVar = "RaidBuffsInside"
                                                                this.configClick = XPerl_Raid_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_BuffTooltipHelper" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_BuffsInside" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_BUFFTOOLTIPHELPER")
                                                                this.configVar = "BuffTooltipHelper"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Motion" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_BuffTooltipHelper" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_MOTION")
                                                                this.configVar = "RaidMotion"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Motion" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_HEALER_MODE")
                                                                this.configVar = "HealerModeRaid"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Frame name="$parent_Groups">
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOP" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="0" y="-5"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="-5" y="5"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_GROUPS">
                                                                                <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <CheckButton name="$parent_Grp1" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP1")
                                                                                this.configVar = "ShowGroup1"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp2" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp1" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP2")
                                                                                this.configVar = "ShowGroup2"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp3" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp2" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP3")
                                                                                this.configVar = "ShowGroup3"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp4" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp3" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP4")
                                                                                this.configVar = "ShowGroup4"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp5" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp4" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP5")
                                                                                this.configVar = "ShowGroup5"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp6" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp5" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP6")
                                                                                this.configVar = "ShowGroup6"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp7" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp6" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP7")
                                                                                this.configVar = "ShowGroup7"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>
                                                        <CheckButton name="$parent_Grp8" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Grp7" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_GROUP8")
                                                                                this.configVar = "ShowGroup8"
                                                                                this.configClick = XPerl_Raid_OptionActions
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <Slider name="$parent_VSpacing" inherits="XPerlSlider">
                                                                <Size>
                                                                        <AbsDimension x="150" y="16"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Grp8">
                                                                                <Offset>
                                                                                        <AbsDimension x="4" y="-10" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAID_SPACING")
                                                                                getglobal(this:GetName().."High"):SetText("20")
                                                                                getglobal(this:GetName().."Low"):SetText("0")

                                                                                this:SetMinMaxValues(40, 60)
                                                                                this:SetValueStep(1)
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                this:SetValue(XPerlConfig.RaidVerticalSpacing)
                                                                        </OnShow>
                                                                        <OnValueChanged>
                                                                                if (XPerlConfig.RaidVerticalSpacing ~= this:GetValue()) then
                                                                                        XPerlConfig.RaidVerticalSpacing = this:GetValue()
                                                                                        XPerl_Raid_OptionActions()
                                                                                end
                                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfig.RaidVerticalSpacing - 40)
                                                                        </OnValueChanged>
                                                                </Scripts>
                                                        </Slider>
                                                </Frames>
                                        </Frame>
                                </Frames>
                        </Frame>

                        -- All Options
                        <Frame name="$parent_All_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="6" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_PORTRAIT")
                                                                this.flashFrame = {XPerl_Player_PortraitFrame, XPerl_Player_Pet_PortraitFrame, XPerl_Target_PortraitFrame, XPerl_party1_PortraitFrame, XPerl_party2_PortraitFrame, XPerl_party3_PortraitFrame, XPerl_party4_PortraitFrame}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configClick = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerPortrait", "ShowPlayerPetPortrait", "ShowTargetPortrait", "ShowPartyPortrait"}
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Portrait3D" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Portrait" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_PORTRAIT3D")
                                                                this.flashFrame = {XPerl_Player_PortraitFrame, XPerl_Player_Pet_PortraitFrame, XPerl_Target_PortraitFrame, XPerl_party1_PortraitFrame, XPerl_party2_PortraitFrame, XPerl_party3_PortraitFrame, XPerl_party4_PortraitFrame}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configClick = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerPortrait3D", "ShowPlayerPetPortrait3D", "ShowTargetPortrait3D", "ShowPartyPortrait3D"}
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_LEVEL")
                                                                this.flashFrame = {XPerl_Player_LevelFrame, XPerl_Player_Pet_LevelFrame, XPerl_Target_LevelFrame, XPerl_TargetTarget_LevelFrame, XPerl_TargetTargetTarget_LevelFrame, XPerl_party1_LevelFrame, XPerl_party2_LevelFrame, XPerl_party3_LevelFrame, XPerl_party4_LevelFrame}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configClick = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerLevel", "ShowPetLevel", "ShowTargetLevel", "ShowTargetTargetLevel", "ShowPartyLevel"}
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ClassIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Level" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_ICON")
                                                                this.flashFrame = {XPerl_Player_ClassTexture, XPerl_Target_ClassTexture, XPerl_party1_LevelFrame_ClassTexture, XPerl_party2_LevelFrame_ClassTexture, XPerl_party3_LevelFrame_ClassTexture, XPerl_party4_LevelFrame_ClassTexture}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerClassIcon", "ShowTargetClassIcon", "ShowPartyClassIcon"}
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ClassIcon" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_PVPFLAG")
                                                                this.flashFrame = {XPerl_Player_PVPStatus, XPerl_Target_PVPStatus, XPerl_TargetTarget_NameFrame_PVPStatus, XPerl_TargetTargetTarget_NameFrame_PVPStatus, XPerl_party1_NameFrame_PVPStatus, XPerl_party2_NameFrame_PVPStatus, XPerl_party3_NameFrame_PVPStatus, XPerl_party4_NameFrame_PVPStatus}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerPVP", "ShowTargetPVP", "ShowPartyPVP"}
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_PVPRank" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPIcon" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_PVP")
                                                                this.flashFrame = {XPerl_Player_NameFrame_PVPRankIcon, XPerl_Target_NameFrame_PVPRankIcon, XPerl_TargetTarget_NameFrame_PVPRankIcon, XPerl_TargetTargetTarget_NameFrame_PVPRankIcon}
                                                                this.flashEnd = function()
                                                                                        for i,frame in pairs(this.flashFrame) do
                                                                                                frame:SetAlpha(0.3)
                                                                                        end
                                                                                end
                                                                this.configSelection = {"ShowPlayerPVPRank", "ShowTargetPVPRank"}
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PVPRank" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_VALUES")
                                                                this.flashFrame = {XPerl_Player_StatsFrame_HealthBarText, XPerl_Player_StatsFrame_ManaBarText, XPerl_Player_StatsFrame_XPBarText, XPerl_Target_StatsFrame_HealthBarText, XPerl_Target_StatsFrame_ManaBarText, XPerl_TargetTarget_StatsFrame_HealthBarText, XPerl_TargetTarget_StatsFrame_ManaBarText, XPerl_TargetTargetTarget_StatsFrame_HealthBarText, XPerl_TargetTargetTarget_StatsFrame_ManaBarText, XPerl_party1_StatsFrame_HealthBarText, XPerl_party1_StatsFrame_ManaBarText, XPerl_party2_StatsFrame_HealthBarText, XPerl_party2_StatsFrame_ManaBarText, XPerl_party3_StatsFrame_HealthBarText, XPerl_party3_StatsFrame_ManaBarText, XPerl_party4_StatsFrame_HealthBarText, XPerl_party4_StatsFrame_ManaBarText}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerValues", "ShowTargetValues", "ShowPartyValues", "ShowTargetTargetValues"}
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_PERCENT")
                                                                this.flashFrame = {XPerl_Player_StatsFrame_HealthBarPercent, XPerl_Player_StatsFrame_ManaBarPercent, XPerl_Player_StatsFrame_XPBarPercent, XPerl_Target_StatsFrame_HealthBarPercent, XPerl_TargetTarget_StatsFrame_HealthBarPercent, XPerl_TargetTargetTarget_StatsFrame_HealthBarPercent, XPerl_Target_StatsFrame_ManaBarPercent, XPerl_TargetTarget_StatsFrame_ManaBarPercent, XPerl_TargetTargetTarget_StatsFrame_ManaBarPercent, XPerl_party1_StatsFrame_HealthBarPercent, XPerl_party1_StatsFrame_ManaBarPercent, XPerl_party2_StatsFrame_HealthBarPercent, XPerl_party2_StatsFrame_ManaBarPercent, XPerl_party3_StatsFrame_HealthBarPercent, XPerl_party3_StatsFrame_ManaBarPercent, XPerl_party4_StatsFrame_HealthBarPercent, XPerl_party1_StatsFrame_ManaBarPercent, XPerl_party1_StatsFrame_HealthBarPercent, XPerl_party4_StatsFrame_ManaBarPercent}
                                                                this.flashEnd = XPerl_OptionActions
                                                                this.configSelection = {"ShowPlayerPercent", "ShowTargetPercent", "ShowPartyPercent", "ShowTargetTargetPercent"}
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Percent" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_HEALER_MODE")
                                                                this.configSelection = {"HealerModeTarget", "HealerModePlayer", "HealerModeParty", "HealerModeRaid"}
                                                                this.configClick = XPerl_OptionActions
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("DeficitOnly")
                                                                        XPerl_Options_EnableSibling("DeficitMax")
                                                                end
                                                        </OnLoad>
                                                        <OnShow>
                                                                local anyDeficitMax
                                                                for k,v in pairs(this.configSelection) do
                                                                        if (XPerlConfig[v.."Type"] == 1) then
                                                                                anyDeficitMax = true
                                                                        end
                                                                end
                                                                if (anyDeficitMax) then
                                                                        XPerl_Options_All_Options_DeficitOnly:SetChecked(0)
                                                                        XPerl_Options_All_Options_DeficitMax:SetChecked(1)
                                                                else
                                                                        XPerl_Options_All_Options_DeficitOnly:SetChecked(1)
                                                                        XPerl_Options_All_Options_DeficitMax:SetChecked(0)
                                                                end
                                                        </OnShow>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitOnly" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="8"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_HEALERMODE_DEFICIT")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfig.HealerModePlayerType = 0
                                                                XPerlConfig.HealerModeTargetType = 0
                                                                XPerlConfig.HealerModePartyType = 0
                                                                XPerlConfig.HealerModeRaidType = 0
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_DeficitMax" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_DeficitOnly" relativePoint="TOPRIGHT">
                                                                <Offset><AbsDimension x="40" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ALL_HEALERMODE_DEFICITMAX")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerlConfig.HealerModePlayerType = 1
                                                                XPerlConfig.HealerModeTargetType = 1
                                                                XPerlConfig.HealerModePartyType = 1
                                                                XPerlConfig.HealerModeRaidType = 1
                                                                XPerl_Options_CheckRadio({"DeficitOnly", "DeficitMax"})
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>


                                        <Frame name="$parent_AddOns">
                                                <Size>
                                                        <AbsDimension x="130" y="70"/>
                                                </Size>
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs" relativePoint="TOP">
                                                                <Offset><AbsDimension x="5" y="-5"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="-5" y="5"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_ADDONS">
                                                                                        <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <CheckButton name="$parent_Player" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_PLAYER")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_Player"))
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("PlayerPet")
                                                                                end
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_Player")
                                                                                else
                                                                                        DisableAddOn("XPerl_Player")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_PlayerPet" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Player" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_PET")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_PlayerPet"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_PlayerPet")
                                                                                else
                                                                                        DisableAddOn("XPerl_PlayerPet")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Target" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PlayerPet" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_TARGET")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_Target"))
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("TargetTarget")
                                                                                end
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_Target")
                                                                                else
                                                                                        DisableAddOn("XPerl_Target")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_TargetTarget" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Target" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_TARGETTARGET")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_TargetTarget"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_TargetTarget")
                                                                                else
                                                                                        DisableAddOn("XPerl_TargetTarget")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Party" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TargetTarget" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_PARTY")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_Party"))
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("PartyPet")
                                                                                end
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_Party")
                                                                                else
                                                                                        DisableAddOn("XPerl_Party")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_PartyPet" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Party" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_PARTYPET")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_PartyPet"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_PartyPet")
                                                                                else
                                                                                        DisableAddOn("XPerl_PartyPet")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_RaidFrames" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_PartyPet" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_RAID")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_RaidFrames"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_RaidFrames")
                                                                                else
                                                                                        DisableAddOn("XPerl_RaidFrames")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_RaidHelper" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_RaidFrames" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_RAIDHELP")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_RaidHelper"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_RaidHelper")
                                                                                else
                                                                                        DisableAddOn("XPerl_RaidHelper")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_RaidAdmin" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_RaidHelper" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_RAIDADMIN")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_RaidAdmin"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_RaidAdmin")
                                                                                else
                                                                                        DisableAddOn("XPerl_RaidAdmin")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_TeamSpeak" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_RaidAdmin" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                local name = GetAddOnInfo("XPerl_TeamSpeak")
                                                                                if (not name) then
                                                                                        this:Hide()
                                                                                end

                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADDON_TSMON")
                                                                                this:SetChecked(IsAddOnLoaded("XPerl_TeamSpeak"))
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                if (this:GetChecked()) then
                                                                                        EnableAddOn("XPerl_TeamSpeak")
                                                                                else
                                                                                        DisableAddOn("XPerl_TeamSpeak")
                                                                                end
                                                                        </OnClick>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <Button name="$parent_Reload" inherits="XPerlButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="80" y="24"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TeamSpeak" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="2" y="0"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RELOADUI")
                                                                                this.Validate = function()
                                                                                        local list = {"Player", "PlayerPet", "Target", "TargetTarget", "Party", "PartyPet",
                                                                                                        "RaidFrames", "RaidHelper", "RaidAdmin", "TeamSpeak"}

                                                                                        local enable
                                                                                        for i,name in pairs(list) do
                                                                                                if (XPerl_Options_GetSiblingChecked(name) ~= IsAddOnLoaded("XPerl_"..name)) then
                                                                                                        enable = true
                                                                                                        break;
                                                                                                end
                                                                                        end

                                                                                        if (enable) then
                                                                                                this:Enable()
                                                                                        else
                                                                                                this:Disable()
                                                                                        end
                                                                                end
                                                                        </OnLoad>
                                                                        <OnUpdate>
                                                                                this:Validate()
                                                                        </OnUpdate>
                                                                        <OnClick>
                                                                                ReloadUI()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>
                                                </Frames>
                                        </Frame>
                                </Frames>
                        </Frame>

                        -- Colour Options
                        <Frame name="$parent_Colour_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>

                                <Frames>
                                        <CheckButton name="$parent_Coloured" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="6" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_NAMES")
                                                                this.configVar = "ClassColouredNames"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ApplyToGuild" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativeTo="$parent_Coloured" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_APPLYTOGUILDLIST")
                                                                this.configVar = "ApplyToGuildList"
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ClassicHealth" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPRIGHT" relativeTo="$parent_ApplyToGuild" relativePoint="BOTTOM">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_CLASSIC")
                                                                this.configVar = "ClassicHealthBar"
                                                                this.configClick = XPerl_OptionActions
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Button name="$parent_ColourHealthBarEmpty" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ClassicHealth" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="3" y="-2"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_HEALTHEMPTY")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.ColourHealthEmpty.r, XPerlConfig.ColourHealthEmpty.g, XPerlConfig.ColourHealthEmpty.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.ClassicHealthBar = 0
                                                                getglobal(this:GetParent():GetName().."_ClassicHealth"):SetChecked(0)

                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "ColourHealthEmpty";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = nil
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_ColourHealthBarFull" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ColourHealthBarEmpty" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_HEALTHFULL")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.ColourHealthFull.r, XPerlConfig.ColourHealthFull.g, XPerlConfig.ColourHealthFull.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfig.ClassicHealthBar = 0
                                                                getglobal(this:GetParent():GetName().."_ClassicHealth"):SetChecked(0)

                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "ColourHealthFull";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = nil
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_ColourManaBar" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ColourHealthBarFull" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_MANA")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.ColourMana.r, XPerlConfig.ColourMana.g, XPerlConfig.ColourMana.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "ColourMana";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = nil
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_ColourEnergyBar" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ColourManaBar" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_ENERGY")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.ColourEnergy.r, XPerlConfig.ColourEnergy.g, XPerlConfig.ColourEnergy.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "ColourEnergy";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = nil
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_ColourRageBar" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ColourEnergyBar" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_RAGE")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.ColourRage.r, XPerlConfig.ColourRage.g, XPerlConfig.ColourRage.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "ColourRage";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = nil
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_ColourFocusBar" inherits="XPerlColorPickerTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ColourRageBar" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-2" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_FOCUS")
                                                        </OnLoad>
                                                        <OnShow>
                                                                local f = getglobal(this:GetName().."_Colour")
                                                                f:SetVertexColor(XPerlConfig.ColourFocus.r, XPerlConfig.ColourFocus.g, XPerlConfig.ColourFocus.b)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlLocked = 1
                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                XPerl_ColourPicker.var = "ColourFocus";           -- Has to be something in XPerlConfig
                                                                XPerl_ColourPicker.alpha = nil
                                                                XPerl_Options:Hide()
                                                                XPerl_ColourPicker:Show()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Button name="$parent_Reset" inherits="XPerlButtonTemplate">
                                                <FontString inherits="GameFontNormalSmall"/>
                                                <Size>
                                                        <AbsDimension x="70" y="24"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_ColourFocusBar">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-8" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_RESET_MAIN")
                                                        </OnLoad>
                                                        <OnClick>
                                                                XPerl_DefaultBarColours(true)
                                                                this:GetParent():Hide()
                                                                this:GetParent():Show()
                                                                XPerl_OptionActions()
                                                        </OnClick>
                                                </Scripts>
                                        </Button>

                                        <Frame name="$parent_UnitReactions">
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="TOP" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="0" y="-5"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativePoint="RIGHT" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="-5" y="0"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_COLOUR_REACTIONS">
                                                                                <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <Button name="$parent_Friend" inherits="XPerlColorPickerTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="2" y="-5" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_FRIEND")
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                local f = getglobal(this:GetName().."_Colour")
                                                                                f:SetVertexColor(XPerlConfig.ColourReactionFriend.r, XPerlConfig.ColourReactionFriend.g, XPerlConfig.ColourReactionFriend.b)
                                                                        </OnShow>
                                                                        <OnClick>
                                                                                XPerlLocked = 1
                                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                                XPerl_ColourPicker.var = "ColourReactionFriend";           -- Has to be something in XPerlConfig
                                                                                XPerl_ColourPicker.alpha = nil
                                                                                XPerl_Options:Hide()
                                                                                XPerl_ColourPicker:Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>

                                                        <Button name="$parent_Neutral" inherits="XPerlColorPickerTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Friend" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-2" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_NEUTRAL")
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                local f = getglobal(this:GetName().."_Colour")
                                                                                f:SetVertexColor(XPerlConfig.ColourReactionNeutral.r, XPerlConfig.ColourReactionNeutral.g, XPerlConfig.ColourReactionNeutral.b)
                                                                        </OnShow>
                                                                        <OnClick>
                                                                                XPerlLocked = 1
                                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                                XPerl_ColourPicker.var = "ColourReactionNeutral";           -- Has to be something in XPerlConfig
                                                                                XPerl_ColourPicker.alpha = nil
                                                                                XPerl_Options:Hide()
                                                                                XPerl_ColourPicker:Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>

                                                        <Button name="$parent_Unfriendly" inherits="XPerlColorPickerTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Neutral" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-2" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_UNFRIENDLY")
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                local f = getglobal(this:GetName().."_Colour")
                                                                                f:SetVertexColor(XPerlConfig.ColourReactionUnfriendly.r, XPerlConfig.ColourReactionUnfriendly.g, XPerlConfig.ColourReactionUnfriendly.b)
                                                                        </OnShow>
                                                                        <OnClick>
                                                                                XPerlLocked = 1
                                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                                XPerl_ColourPicker.var = "ColourReactionUnfriendly";           -- Has to be something in XPerlConfig
                                                                                XPerl_ColourPicker.alpha = nil
                                                                                XPerl_Options:Hide()
                                                                                XPerl_ColourPicker:Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>

                                                        <Button name="$parent_Enemy" inherits="XPerlColorPickerTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Unfriendly" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-2" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_ENEMY")
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                local f = getglobal(this:GetName().."_Colour")
                                                                                f:SetVertexColor(XPerlConfig.ColourReactionEnemy.r, XPerlConfig.ColourReactionEnemy.g, XPerlConfig.ColourReactionEnemy.b)
                                                                        </OnShow>
                                                                        <OnClick>
                                                                                XPerlLocked = 1
                                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                                XPerl_ColourPicker.var = "ColourReactionEnemy";           -- Has to be something in XPerlConfig
                                                                                XPerl_ColourPicker.alpha = nil
                                                                                XPerl_Options:Hide()
                                                                                XPerl_ColourPicker:Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>

                                                        <Button name="$parent_None" inherits="XPerlColorPickerTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Enemy" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-2" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_NONE")
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                local f = getglobal(this:GetName().."_Colour")
                                                                                f:SetVertexColor(XPerlConfig.ColourReactionNone.r, XPerlConfig.ColourReactionNone.g, XPerlConfig.ColourReactionNone.b)
                                                                        </OnShow>
                                                                        <OnClick>
                                                                                XPerlLocked = 1
                                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                                XPerl_ColourPicker.var = "ColourReactionNone";           -- Has to be something in XPerlConfig
                                                                                XPerl_ColourPicker.alpha = nil
                                                                                XPerl_Options:Hide()
                                                                                XPerl_ColourPicker:Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>

                                                        <Button name="$parent_Tapped" inherits="XPerlColorPickerTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_None" relativePoint="BOTTOMLEFT">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-2" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_TAPPED")
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                local f = getglobal(this:GetName().."_Colour")
                                                                                f:SetVertexColor(XPerlConfig.ColourTapped.r, XPerlConfig.ColourTapped.g, XPerlConfig.ColourTapped.b)
                                                                        </OnShow>
                                                                        <OnClick>
                                                                                XPerlLocked = 1
                                                                                XPerl_ColourPicker.ParentFrame = XPerl_Options
                                                                                XPerl_ColourPicker.var = "ColourTapped";           -- Has to be something in XPerlConfig
                                                                                XPerl_ColourPicker.alpha = nil
                                                                                XPerl_Options:Hide()
                                                                                XPerl_ColourPicker:Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>

                                                        <Button name="$parent_Reset" inherits="XPerlButtonTemplate">
                                                                <FontString inherits="GameFontNormalSmall"/>
                                                                <Size>
                                                                        <AbsDimension x="70" y="24"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Tapped">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-8" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_COLOUR_RESET_REACTION")
                                                                        </OnLoad>
                                                                        <OnClick>
                                                                                XPerl_DefaultReactionColours(true)
                                                                                this:GetParent():Hide()
                                                                                this:GetParent():Show()
                                                                                XPerl_OptionActions()
                                                                        </OnClick>
                                                                </Scripts>
                                                        </Button>
                                                </Frames>
                                        </Frame>
                                </Frames>
                        </Frame>

                        <Frame name="$parent_Helper_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>
                                <Frames>
                                        <Button name="$parent_Title">
                                                <Size>
                                                        <AbsDimension x="60" y="10"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Layers>
                                                        <Layer level="ARTWORK">
                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_TANK_TARGETS">
                                                                <Color r="1" g="1" b="1" a="1" />
                                                                        <Anchors>
                                                                                <Anchor point="LEFT" />
                                                                        </Anchors>
                                                                </FontString>
                                                        </Layer>
                                                </Layers>
                                        </Button>

                                        <CheckButton name="$parent_Enabled" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_ENABLE")
                                                                this.XconfigVar = "RaidHelper"
                                                                this.configClick = function()
                                                                                        XPerl_EnableDisable()
                                                                                        XPerl_Options:Hide()
                                                                                        XPerl_Options:Show()
                                                                                   end

                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("CTTargets")
                                                                        XPerl_Options_EnableSibling("NoAuto")
                                                                        XPerl_Options_EnableSibling("CollectOthers")
                                                                        XPerl_Options_EnableSibling("ThreatBar")
                                                                        XPerl_Options_EnableSibling("Tooltips")
                                                                        XPerl_Options_EnableSibling("MaxTanks")
                                                                        XPerl_Options_EnableSibling("UnitWidth")
                                                                        XPerl_Options_EnableSibling("UnitHeight")
                                                                        XPerl_Options_EnableSibling("ScaleOther")
                                                                        XPerl_Options_EnableSibling("Scale")
                                                                        XPerl_Options_EnableSibling("Transparency")
                                                                        XPerl_Options_EnableSibling("BkTransparency")
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_CTTargets" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOP" relativePoint="BOTTOMRIGHT" relativeTo="$parent_Enabled">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_CTTARGETS")
                                                                this.XconfigVar = "UseCTRATargets"
                                                                this.configClick = XPerl_MTRosterChanged
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_NoAuto" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_CTTargets" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_NOAUTO")
                                                                this.XconfigVar = "NoAutoList"
                                                                this.configClick = XPerl_MTRosterChanged
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_CollectOthers" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_NoAuto" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_COLLECTOTHERS")
                                                                this.XconfigVar = "CollectOtherTargets"
                                                                this.configClick = function() XPerl_Toggle_CollectOtherTargets(true); end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_ThreatBar" inherits="XPerlCheckButtonTemplate">
                                                <Size>
                                                        <AbsDimension x="26" y="26"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_CollectOthers" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_THREATBAR")
                                                                this.XconfigVar = "ThreatBar"
                                                                this.configClick = function() XPerl_Toggle_CollectOtherTargets(true); end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_MaxTanks" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="155" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_ThreatBar" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="-14" y="-10"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_MAXTANKS")
                                                                getglobal(this:GetName().."Low"):SetText("1")
                                                                getglobal(this:GetName().."High"):SetText("10")

                                                                this:SetMinMaxValues(1, 10)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfigHelper.MaxMainTanks)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfigHelper.MaxMainTanks ~= this:GetValue()) then
                                                                        XPerlConfigHelper.MaxMainTanks = this:GetValue()
                                                                        XPerl_MakeTankList()
                                                                        XPerl_SetTitle()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfigHelper.MaxMainTanks)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_UnitWidth" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="75" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_MaxTanks" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-19"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_UNITWIDTH")
                                                                getglobal(this:GetName().."Low"):SetText(XPERL_UNIT_WIDTH_MIN)
                                                                getglobal(this:GetName().."High"):SetText(XPERL_UNIT_WIDTH_MAX)

                                                                if (XPERL_UNIT_WIDTH_MIN) then
                                                                        this:SetMinMaxValues(XPERL_UNIT_WIDTH_MIN, XPERL_UNIT_WIDTH_MAX)
                                                                else
                                                                        this:SetMinMaxValues(50, 125)
                                                                end
                                                                this:SetValueStep(5)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfigHelper.UnitWidth)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfigHelper.UnitWidth ~= this:GetValue()) then
                                                                        XPerlConfigHelper.UnitWidth = this:GetValue()
                                                                        XPerl_MakeTankList(true)
                                                                        XPerl_MakeOtherTargetList()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfigHelper.UnitWidth)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_UnitHeight" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="75" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_UnitWidth" relativePoint="TOPRIGHT">
                                                                <Offset>
                                                                        <AbsDimension x="5" y="0"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_UNITHEIGHT")
                                                                getglobal(this:GetName().."Low"):SetText(XPERL_UNIT_HEIGHT_MIN)
                                                                getglobal(this:GetName().."High"):SetText(XPERL_UNIT_HEIGHT_MAX)

                                                                if (XPERL_UNIT_HEIGHT_MIN) then
                                                                        this:SetMinMaxValues(XPERL_UNIT_HEIGHT_MIN, XPERL_UNIT_HEIGHT_MAX)
                                                                else
                                                                        this:SetMinMaxValues(17, 30)
                                                                end
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfigHelper.UnitHeight)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfigHelper.UnitHeight ~= this:GetValue()) then
                                                                        XPerlConfigHelper.UnitHeight = this:GetValue()
                                                                        XPerl_MakeTankList(true)
                                                                        XPerl_MakeOtherTargetList()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(XPerlConfigHelper.UnitHeight)
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_ScaleOther" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="155" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_UnitWidth" relativePoint="BOTTOMLEFT">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-19"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_SCALEOTHER")
                                                                getglobal(this:GetName().."Low"):SetText("40%")
                                                                getglobal(this:GetName().."High"):SetText("100%")

                                                                this:SetMinMaxValues(40, 100)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(XPerlConfigHelper.OtherTargets_Scale * 100 + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfigHelper.OtherTargets_Scale * 100 ~= this:GetValue()) then
                                                                        XPerlConfigHelper.OtherTargets_Scale = this:GetValue() / 100
                                                                        XPerl_MakeOtherTargetList()
                                                                        XPerl_SetTitle()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.OtherTargets_Scale + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="155" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_ScaleOther">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-19"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(XPerlConfigHelper.Targets_Scale * 100 + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(XPerlConfigHelper.Targets_Scale * 100 + 0.5) ~= this:GetValue()) then
                                                                        XPerlConfigHelper.Targets_Scale = this:GetValue() / 100
                                                                        XPerl_SetupFrames()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.Targets_Scale + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_Transparency" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="155" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Scale">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-19"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_ALPHA")
                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                getglobal(this:GetName().."Low"):SetText("0%")

                                                                this:SetMinMaxValues(0, 1)
                                                                this:SetValueStep(0.01)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfigHelper.Targets_Transparency)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfigHelper.Targets_Transparency ~= this:GetValue()) then
                                                                        XPerlConfigHelper.Targets_Transparency = this:GetValue()
                                                                        XPerl_Frame:SetAlpha(XPerlConfigHelper.Targets_Transparency)
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.Targets_Transparency).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_BkTransparency" inherits="XPerlSlider">
                                                <Size>
                                                        <AbsDimension x="155" y="16"/>
                                                </Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Transparency">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-19"/>
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_BACKALPHA")
                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                getglobal(this:GetName().."Low"):SetText("0%")

                                                                this:SetMinMaxValues(0, 1)
                                                                this:SetValueStep(0.01)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(XPerlConfigHelper.Background_Transparency)
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (XPerlConfigHelper.Background_Transparency ~= this:GetValue()) then
                                                                        XPerlConfigHelper.Background_Transparency = this:GetValue()
                                                                        if (XPerl_Frame) then
                                                                                XPerl_SetupFrameSimple(XPerl_Frame, XPerlConfigHelper.Background_Transparency)
                                                                        end
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.Background_Transparency).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <CheckButton name="$parent_Tooltips" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOP">
                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_TOOLTIPS")
                                                                this.XconfigVar = "Tooltips"
                                                                this.Validate = function()
                                                                        XPerl_Options_EnableSibling("TooltipTarget", XPerl_Options_Helper_Options_Enabled)
                                                                        XPerl_Options_EnableSibling("TooltipTank", XPerl_Options_Helper_Options_Enabled)
                                                                        XPerl_Options_EnableSibling("TooltipBoth", XPerl_Options_Helper_Options_Enabled)
                                                                end
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_TooltipTarget" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Tooltips" relativePoint="BOTTOMRIGHT">
                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_TOOLTIPS_TARGET")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfigHelper.TooltipsWhich == 0)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfigHelper.TooltipsWhich = 0
                                                                XPerl_Options_CheckRadio({"TooltipTarget", "TooltipTank", "TooltipBoth"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_TooltipTank" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TooltipTarget" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="2"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_TOOLTIPS_TANK")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfigHelper.TooltipsWhich == 1)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfigHelper.TooltipsWhich = 1
                                                                XPerl_Options_CheckRadio({"TooltipTarget", "TooltipTank", "TooltipBoth"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <CheckButton name="$parent_TooltipBoth" inherits="XPerlRadioButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TooltipTank" relativePoint="BOTTOMLEFT">
                                                                <Offset><AbsDimension x="0" y="2"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_RAIDHELP_TOOLTIPS_BOTH")
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetChecked(XPerlConfigHelper.TooltipsWhich == 2)
                                                        </OnShow>
                                                        <OnClick>
                                                                XPerlConfigHelper.TooltipsWhich = 2
                                                                XPerl_Options_CheckRadio({"TooltipTarget", "TooltipTank", "TooltipBoth"})
                                                        </OnClick>
                                                </Scripts>
                                        </CheckButton>

                                        <Frame name="$parent_Assists">
                                                <Size>
                                                        <AbsDimension x="130" y="70"/>
                                                </Size>
                                                <Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
                                                        <EdgeSize>
                                                                <AbsValue val="6"/>
                                                        </EdgeSize>
                                                </Backdrop>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="CENTER" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="5" y="66"/></Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs">
                                                                <Offset><AbsDimension x="-5" y="5"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Frames>
                                                        <Button name="$parent_Title">
                                                                <Size>
                                                                        <AbsDimension x="60" y="10"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT">
                                                                                <Offset><AbsDimension x="3" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Layers>
                                                                        <Layer level="ARTWORK">
                                                                                <FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_TARGET_COUNTERS">
                                                                                <Color r="1" g="1" b="1" a="1" />
                                                                                        <Anchors>
                                                                                                <Anchor point="LEFT" />
                                                                                        </Anchors>
                                                                                </FontString>
                                                                        </Layer>
                                                                </Layers>
                                                        </Button>

                                                        <CheckButton name="$parent_TargetCounters" inherits="XPerlCheckButtonTemplate">
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
                                                                                <Offset><AbsDimension x="0" y="-3"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_COUNTERS")
                                                                                this.Validate = function()
                                                                                        XPerl_Options_EnableSibling("TargetCountersSelf")
                                                                                        XPerl_Options_EnableSibling("Enemy")
                                                                                        XPerl_Options_EnableSibling("AggroWarning")
                                                                                        XPerl_Options_EnableSibling("Scale")
                                                                                        XPerl_Options_EnableSibling("Transparency")
                                                                                        XPerl_Options_EnableSibling("BackTransparency")
                                                                                end
                                                                                this.XconfigVar = "TargetCounters"
                                                                                this.configClick = function()
                                                                                                        if (XPerlConfigHelper.TargetCounters == 1) then
                                                                                                                XPerl_AssistsView_Open()
                                                                                                        else
                                                                                                                XPerl_AssistsView_Close()
                                                                                                        end
                                                                                                   end
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_TargetCountersSelf" inherits="XPerlCheckButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="26" y="26"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOP" relativeTo="$parent_TargetCounters" relativePoint="BOTTOMRIGHT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_COUNTERSSELF")
                                                                                this.XconfigVar = "TargetCountersSelf"
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_Enemy" inherits="XPerlCheckButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="26" y="26"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_TargetCountersSelf" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_COUNTERSENEMY")
                                                                                this.XconfigVar = "TargetCountersEnemy"
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <CheckButton name="$parent_AggroWarning" inherits="XPerlCheckButtonTemplate">
                                                                <Size>
                                                                        <AbsDimension x="26" y="26"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativeTo="$parent_Enemy" relativePoint="BOTTOMLEFT">
                                                                                <Offset><AbsDimension x="0" y="6"/></Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_TARGET_AGGROWARNING")
                                                                                this.XconfigVar = "AggroWarning"
                                                                        </OnLoad>
                                                                </Scripts>
                                                        </CheckButton>

                                                        <Slider name="$parent_Scale" inherits="XPerlSlider">
                                                                <Size>
                                                                        <AbsDimension x="160" y="16"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_AggroWarning">
                                                                                <Offset>
                                                                                        <AbsDimension x="-14" y="-18" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ASSIST_SCALE")
                                                                                XPerl_Options_RegisterScalingSlider(this)
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                this:SetValue(math.floor(100 * XPerlConfigHelper.Scale_AssistsFrame + 0.5))
                                                                        </OnShow>
                                                                        <OnValueChanged>
                                                                                if (math.floor(100 * XPerlConfigHelper.Scale_AssistsFrame + 0.5) ~= this:GetValue()) then
                                                                                        XPerlConfigHelper.Scale_AssistsFrame = this:GetValue() / 100
                                                                                        XPerl_SetupFrames()
                                                                                end
                                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.Scale_AssistsFrame + 0.5).."%")
                                                                        </OnValueChanged>
                                                                </Scripts>
                                                        </Slider>

                                                        <Slider name="$parent_Transparency" inherits="XPerlSlider">
                                                                <Size>
                                                                        <AbsDimension x="160" y="16"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Scale">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-28" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ASSIST_ALPHA")
                                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                                getglobal(this:GetName().."Low"):SetText("0%")

                                                                                this:SetMinMaxValues(0, 1)
                                                                                this:SetValueStep(0.01)
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                this:SetValue(XPerlConfigHelper.AssistsFrame_Transparency)
                                                                        </OnShow>
                                                                        <OnValueChanged>
                                                                                if (XPerlConfigHelper.AssistsFrame_Transparency ~= this:GetValue()) then
                                                                                        XPerlConfigHelper.AssistsFrame_Transparency = this:GetValue()
                                                                                        --XPerl_Assists_Frame:SetAlpha(XPerlConfigHelper.AssistsFrame_Transparency)
                                                                                        --XPerlScrollSeperator:SetAlpha(XPerlConfigHelper.Assists_BackTransparency)
                                                                                        XPerl_SetupFrames()
                                                                                end
                                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.AssistsFrame_Transparency).."%")
                                                                        </OnValueChanged>
                                                                </Scripts>
                                                        </Slider>

                                                        <Slider name="$parent_BackTransparency" inherits="XPerlSlider">
                                                                <Size>
                                                                        <AbsDimension x="160" y="16"/>
                                                                </Size>
                                                                <Anchors>
                                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Transparency">
                                                                                <Offset>
                                                                                        <AbsDimension x="0" y="-28" />
                                                                                </Offset>
                                                                        </Anchor>
                                                                </Anchors>
                                                                <Scripts>
                                                                        <OnLoad>
                                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ASSIST_BACKALPHA")
                                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                                getglobal(this:GetName().."Low"):SetText("0%")

                                                                                this:SetMinMaxValues(0, 1)
                                                                                this:SetValueStep(0.01)
                                                                        </OnLoad>
                                                                        <OnShow>
                                                                                this:SetValue(XPerlConfigHelper.Assists_BackTransparency)
                                                                        </OnShow>
                                                                        <OnValueChanged>
                                                                                if (XPerlConfigHelper.Assists_BackTransparency ~= this:GetValue()) then
                                                                                        XPerlConfigHelper.Assists_BackTransparency = this:GetValue()
                                                                                        if (XPerl_Assists_Frame) then
                                                                                                XPerl_SetupFrameSimple(XPerl_Assists_Frame, XPerlConfigHelper.Assists_BackTransparency)
                                                                                                --XPerlScrollSeperator:SetAlpha(XPerlConfigHelper.Assists_BackTransparency)
                                                                                                --XPerl_SetupFrames()
                                                                                        end
                                                                                end
                                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerlConfigHelper.Assists_BackTransparency).."%")
                                                                        </OnValueChanged>
                                                                </Scripts>
                                                        </Slider>
                                                </Frames>
                                        </Frame>
                                </Frames>
                        </Frame>

                        <Frame name="$parent_Admin_Options" hidden="true">
                                <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs"/>
                                        <Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs"/>
                                </Anchors>
                                <Frames>
                                        <CheckButton name="$parent_AutoHideShow" inherits="XPerlCheckButtonTemplate">
                                                <Anchors>
                                                        <Anchor point="TOPLEFT">
                                                                <Offset><AbsDimension x="5" y="-3"/></Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADMIN_AUTOHIDESHOW")
                                                                this.XconfigVars = "XPerl_Admin"
                                                                this.XconfigVar = "AutoHideShow"
                                                                this.configClick = XPerl_AdminCheckMyRank
                                                        </OnLoad>
                                                </Scripts>
                                        </CheckButton>

                                        <Slider name="$parent_Alpha" inherits="XPerlSlider">
                                                <Size><AbsDimension x="160" y="16"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_AutoHideShow">
                                                                <Offset>
                                                                        <AbsDimension x="3" y="-13" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADMIN_ALPHA")
                                                                getglobal(this:GetName().."High"):SetText("100%")
                                                                getglobal(this:GetName().."Low"):SetText("0%")
                                                                this:SetMinMaxValues(0, 100)
                                                                this:SetValueStep(1)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerl_Admin.Transparency + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerl_Admin.Transparency + 0.5) ~= this:GetValue()) then
                                                                        XPerl_Admin.Transparency = this:GetValue() / 100
                                                                        XPerl_AdminSetupFrames()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerl_Admin.Transparency + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_ScaleItem" inherits="XPerlSlider">
                                                <Size><AbsDimension x="160" y="16"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Alpha">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-28" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ITEMCHECK_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerl_Admin.Scale_ItemCheck + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerl_Admin.Scale_ItemCheck + 0.5) ~= this:GetValue()) then
                                                                        XPerl_Admin.Scale_ItemCheck = this:GetValue() / 100
                                                                        XPerl_AdminSetupFrames()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerl_Admin.Scale_ItemCheck + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>

                                        <Slider name="$parent_ScaleAdmin" inherits="XPerlSlider">
                                                <Size><AbsDimension x="160" y="16"/></Size>
                                                <Anchors>
                                                        <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_ScaleItem">
                                                                <Offset>
                                                                        <AbsDimension x="0" y="-28" />
                                                                </Offset>
                                                        </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                        <OnLoad>
                                                                XPerl_OptionsSetMyText(this, "XPERL_CONF_ADMIN_SCALE")
                                                                XPerl_Options_RegisterScalingSlider(this)
                                                        </OnLoad>
                                                        <OnShow>
                                                                this:SetValue(math.floor(100 * XPerl_Admin.Scale_Admin + 0.5))
                                                        </OnShow>
                                                        <OnValueChanged>
                                                                if (math.floor(100 * XPerl_Admin.Scale_Admin + 0.5) ~= this:GetValue()) then
                                                                        XPerl_Admin.Scale_Admin = this:GetValue() / 100
                                                                        XPerl_AdminSetupFrames()
                                                                end
                                                                getglobal(this:GetName().."Current"):SetText(math.floor(100 * XPerl_Admin.Scale_Admin + 0.5).."%")
                                                        </OnValueChanged>
                                                </Scripts>
                                        </Slider>
                                </Frames>
                        </Frame>
                </Frames>
        </Frame>
</Ui>
