<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">

	<Script file="XPerl_FrameOptions.lua"/>
	<Script file="localization.lua"/>
	<Script file="localization.deDE.lua"/>
	<Script file="localization.frFR.lua"/>
	<Script file="localization.esES.lua"/>
	<Script file="localization.zhCN.lua"/>
	<Script file="localization.zhTW.lua"/>
	<Script file="localization.koKR.lua"/>
	<Script file="localization.ruRU.lua"/>

	<Frame name="XPerl_Frame_Title" virtual="true" hidden="false">
		<Scripts>
			<OnLoad>
				self.Setup = function(self)
					local text = _G[self:GetName().."_Text"]
					text:SetTextColor(1,1,1,1)
					text:SetText(XPerl_Version.." "..XPerl_GetRevision())
					XPerl_DoGradient(self, true)
				end
			</OnLoad>
			<OnShow>
				self: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" justifyH="LEFT">
					<Anchors>
						<Anchor point="LEFT">
							<Offset>
								<AbsDimension x="4" y="0" />
							</Offset>
						</Anchor>
						<Anchor point="RIGHT">
							<Offset>
								<AbsDimension x="-4" y="0" />
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>

	<Frame name="XPerl_OptionsTemplateNaked" movable="true" enableMouse="true" frameStrata="HIGH" virtual="true">
		<Scripts>
			<OnLoad>
				self.Setup = XPerl_Options_SetupFunc
			</OnLoad>
			<OnShow>
				self:Setup()
			</OnShow>
			<OnMouseDown>
				if (button == "LeftButton") then
					self:StartMoving()
				end
			</OnMouseDown>
			<OnMouseUp>
				self:StopMovingOrSizing()
			</OnMouseUp>
		</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="-280" />
						</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="XPerlOptionsButtonTemplate" virtual="true">
		<Size><AbsDimension x="90" y="21"/></Size>
		<ButtonText name="$parentText" setAllPoints="true"/>
		<NormalFont style="GameFontNormal"/>
		<HighlightFont style="GameFontHighlight"/>
		<DisabledFont style="GameFontDisable"/>
		<NormalTexture inherits="UIPanelButtonUpTexture"/>
		<PushedTexture inherits="UIPanelButtonDownTexture"/>
		<DisabledTexture inherits="UIPanelButtonDisabledTexture"/>
		<HighlightTexture inherits="UIPanelButtonHighlightTexture"/>
	</Button>

	<Button name="XPerlSimpleTooltipButtonTemplate" virtual="true" inherits="XPerlOptionsButtonTemplate">
		<Scripts>
			<OnEnter>
				if (self.tooltipText) then
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
					local title = self:GetText()
					if (title) then
						GameTooltip:SetText(title, 1, 1, 1)
						GameTooltip:AddLine(self.tooltipText, nil, nil, nil, 1)
						GameTooltip:Show()
					else
						GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1)
					end
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
		</Scripts>
	</Button>

	<Button name="XPerlButtonTemplate" virtual="true" inherits="XPerlSimpleTooltipButtonTemplate">
		<Size>
			<AbsDimension x="90" y="21"/>
		</Size>
		<Scripts>
			<OnShow>
				self:SetWidth(_G[self:GetName().."Text"]:GetStringWidth() * 1.1 + 10)
			</OnShow>
		</Scripts>
	</Button>

	<Button name="XPerlUpArrow" inherits="XPerlSimpleTooltipButtonTemplate" 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" inherits="XPerlSimpleTooltipButtonTemplate" 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" 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" 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>
		<ThumbTexture name="$parentThumb" file="Interface\Buttons\UI-SliderBar-Button-Horizontal">
			<Size>
				<AbsDimension x="32" y="32"/>
			</Size>
		</ThumbTexture>
		<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>
			<OnLoad function="XPerl_SliderSetup"/>
			<OnEnter>
				if (self.xperlSliderEnabled) then
					if ( self.tooltipText ) then
						local p = _G[self:GetName().."Text"]
						local title = p and p:GetText()
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
						if (title) then
							GameTooltip:SetText(title, 1, 1, 1)
							GameTooltip:AddLine(self.tooltipText, nil, nil, nil, 1)
						else
							GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1);
						end
						GameTooltip:Show()
					end
					_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
				end
			</OnEnter>
			<OnLeave>
				if (self.xperlSliderEnabled) then
					_G[self:GetName().."Text"]:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
				end
				GameTooltip:Hide();
			</OnLeave>
			<OnMouseWheel>
				local s = self:GetScript("OnValueChanged")
				local newValue = self:GetValue() + (self:GetValueStep() * delta)
				self:SetValue(newValue)
			</OnMouseWheel>
		</Scripts>
	</Slider>

	<EditBox name="XPerlOptEditBox" autoFocus="false" multiline="false" ignoreArrows="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>
			<OnLoad function="XPerl_EditBoxSetup"/>
			<OnEscapePressed>
				self: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 ( self.tooltipText ) then
					local p = _G[self:GetName().."Text"]
					local title = p and p:GetText()
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
					if (title) then
						GameTooltip:SetText(title, 1, 1, 1)
						GameTooltip:AddLine(self.tooltipText, nil, nil, nil, 1)
					else
						GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1);
					end
					GameTooltip:Show()
				end
				_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
			</OnEnter>
			<OnLeave>
				_G[self: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">
		<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>
				<Texture name="$parentDisabledLeft" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="-1"/>
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="8" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.125" top="0.26" bottom="0.5"/>
				</Texture>
				<Texture name="$parentDisabledRight" file="Interface\Addons\XPerl_Options\Images\XPerl_Tabs">
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset>
								<AbsDimension x="0" y="-1"/>
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-8" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0.875" right="1" top="0.26" 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.26" bottom="0.5"/>
				</Texture>
			</Layer>
		</Layers>

		<ButtonText name="$parentText">
			<Anchors>
				<Anchor point="CENTER"/>
			</Anchors>
		</ButtonText>
		<NormalFont style="GameFontNormalSmall"/>
		<HighlightFont style="GameFontHighlightSmall"/>
		<DisabledFont style="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>
			<OnShow>
				self:SetText(_G["XPERL_CONF_TITLE"..self:GetID()])
				local f = _G[self:GetName().."Text"]
				self:SetWidth(f:GetStringWidth() + 18)
				XPerl_Options_SetTabColor(self, XPerlDB.optionsColour)
				self:SetScript("OnShow", nil)
			</OnShow>
		</Scripts>
	</Button>

	<CheckButton name="XPerlCheckButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="30" y="30"/>
		</Size>
		<Scripts>
			<OnEnter function="XPerl_Options_CheckButton_OnEnter"/>
			<OnLeave>
				_G[self:GetName().."Text"]:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
				if (self.flashFrame and not InCombatLockdown()) then
					local array
					if (table.getn(self.flashFrame) == 0) then
						array = {self.flashFrame}
					else
						array = self.flashFrame
					end
					for i,f in pairs(array) do
						if (f and XPerl_FrameIsFlashing(f)) then
							XPerl_FrameFlashStop(f)
							f:Show()
						end
					end
					if (self.configClick) then
						self.configClick()
					end
				end
				GameTooltip:Hide()
			</OnLeave>
			<OnClick>
				if (self.configBase) then
					XPerl_Options_SetIndex(self, self:GetChecked())

				elseif (type(self.configSelection) == "table") then
					if (self.configIndex == nil) then
						error("No index for configSelection in "..self:GetName())
					end

					for k,v in pairs(self.configSelection) do
						local table
						if (type(v) == "table") then
							table = v
						else
							RunScript("XPerlTemp = "..v)
							table = XPerlTemp
							XPerlTemp = nil
						end

						if (type(table) == "table") then
							table[self.configIndex] = self:GetChecked()
						end
					end
				elseif (self.XconfigVar) then
					if (self.XconfigVars) then
						local sets = _G[self.XconfigVars]
						if (sets) then
							sets[self.XconfigVar] = XPerl_GetCheck(self)
						end
					else
						XPerlConfigHelper[self.XconfigVar] = XPerl_GetCheck(self)
					end
				end

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

				if (self.configClick) then
					self.configClick(self)
				end
				if (self.Validate) then
					self.Validate()
				end
			</OnClick>
			<OnShow>
				if (self.configBase) then
					self:SetChecked(XPerl_Options_GetIndex(self))

				elseif (self.XconfigVar) then
					if (self.XconfigVars) then
						local sets = _G[self.XconfigVars]
						if (sets) then
							self:SetChecked(sets[self.XconfigVar])
						end
					else
						self:SetChecked(XPerlConfigHelper[self.XconfigVar])
					end
				elseif (self.configSelection) then
					local vars, ticked = 0, 0
					for i,var in pairs(self.configSelection) do
						vars = vars + 1

						local table
						if (type(var) == "table") then
							table = var
						else
							RunScript("XPerlTemp = "..var)
							table = XPerlTemp
							XPerlTemp = nil
						end

						if (type(table) == "table" and table[self.configIndex]) then
							ticked = ticked + 1
						end
					end

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

					if (ticked == 0) then
						self:SetChecked(nil)
					elseif (ticked == vars) then
						self:SetChecked(true)
					else
						self:SetChecked(true)
						tex:SetVertexColor(0.6, 0.6, 0.4)
					end
				end

				if (self.Validate) then
					self.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 ( self.tooltipText ) then
					local p = _G[self:GetName().."Text"]
					local title = p and p:GetText()
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
					if (title) then
						GameTooltip:SetText(title, 1, 1, 1)
						GameTooltip:AddLine(self.tooltipText, nil, nil, nil, 1)
					else
						GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1);
					end
					GameTooltip:Show()
				end
				_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
			</OnEnter>
			<OnLeave>
				_G[self: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" frameStrata="DIALOG" inherits="XPerl_OptionsTemplateNaked" parent="UIParent" hidden="true">
		<Scripts>
			<OnShow>
				self.ok = nil
				self:Setup()
			</OnShow>
		</Scripts>
		<Size>
			<AbsDimension x="230" y="200"/>
		</Size>
		<Frames>
			<ColorSelect name="$parent_ColorSelect">
				<Size>
					<AbsDimension x="176" y="128"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Area"/>
				</Anchors>
				<Scripts>
					<OnShow>
						if (type(XPerl_ColourPicker.varGet) ~= "function") then
							error("varGet must be a function")
						end

						local val = XPerl_ColourPicker.varGet()
						if (type(val) ~= "table" or not val.r or not val.g or not val.b) then
							error("varGet's return must be a function table of {r, g, b[, a]}")
						end

						self:SetColorRGB(val.r, val.g, val.b)

						if (XPerl_ColourPicker.alpha) then
							XPerl_ColourPicker_Alpha:SetMinMaxValues(0, 1)
							XPerl_ColourPicker_Alpha:SetValue(val.a)
							XPerl_ColourPicker_Alpha:Show()
							XPerl_ColourPicker:SetHeight(230)
						else
							XPerl_ColourPicker_Alpha:Hide()
							XPerl_ColourPicker:SetHeight(200)
						end

						XPerl_Options_Mask:Show()
					</OnShow>
					<OnHide>
						XPerl_Options_Mask:Hide()
						self.varSet = nil
						self.varGet = nil
					</OnHide>
					<OnColorSelect>
						_G[self:GetParent():GetName().."_ColorSelect_Swatch"]:SetTexture(r, g, b)
						XPerl_ColourPickerRed:SetText(floor(r * 255))
						XPerl_ColourPickerGreen:SetText(floor(g * 255))
						XPerl_ColourPickerBlue:SetText(floor(b * 255))
					</OnColorSelect>
				</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>
						self:SetText(XPERL_OK)
					</OnLoad>
					<OnClick>
						local r, g, b = _G[self:GetParent():GetName().."_ColorSelect"]:GetColorRGB()
						local a = XPerl_ColourPicker_Alpha:GetValue()

						local varSet = XPerl_ColourPicker.varSet
						if (type(varSet) ~= "function") then
							error("varSet must be a function")
						end

						if (XPerl_ColourPicker.alpha) then
							varSet({["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a})
						else
							varSet({["r"] = r, ["g"] = g, ["b"] = b})
						end

						self: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>
						self:SetText(XPERL_CANCEL)
					</OnLoad>
					<OnClick>
						self: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(self, "XPERL_CONF_ALPHA")
						_G[self:GetName().."Low"]:SetText("0%")
						_G[self:GetName().."High"]:SetText("100%")
					</OnLoad>
					<OnValueChanged>
						XPerl_ColourPicker.alphaValue = value
						_G[self:GetName().."Current"]:SetText(floor(100 * value + 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>
			<OnLoad>
				self.name = _G[self:GetName().."name"]
				self.tex = self:GetNormalTexture()
			</OnLoad>
			<OnClick>
				self:GetParent().Selection = self:GetID() + self:GetParent().scrollBar.bar:GetValue() + 1
				self:GetParent():SetBarColours()
			</OnClick>
			<OnMouseWheel>
				if (delta > 0) then
				        self:GetParent().scrollBar.bar:SetValue(self:GetParent().scrollBar.bar:GetValue() - 1)
				else
				        self:GetParent().scrollBar.bar:SetValue(self:GetParent().scrollBar.bar:GetValue() + 1)
				end
			</OnMouseWheel>
		</Scripts>
		<NormalTexture file="Interface\TargetingFrame\UI-StatusBar"/>
		<HighlightTexture file="Interface\Addons\XPerl\Images\XPerl_Highlight" alphaMode="ADD">
			<TexCoords left="0" right="1" top="0.5" bottom="1" />
		</HighlightTexture>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentname" inherits="GameFontNormal" setAllPoints="true">
					<Color r="1" g="1" b="1"/>
				</FontString>
			</Layer>
		</Layers>
	</Button>

	<!-- Options Frames -->
	<Frame name="XPerl_Options_TextureSelect" frameStrata="DIALOG" inherits="XPerl_OptionsTemplateNaked" parent="UIParent" hidden="true">
		<Scripts>
			<OnLoad function="XPerl_Options_TextureSelect_Onload"/>
			<OnShow>
				if (not self.list) then
					self.list = XPerl_AllBarTextures()
				end
				if (XPerlDB and XPerlDB.bar.texture and self.list) then
					for k,v in pairs(self.list) do
						if (XPerlDB.bar.texture[1] == v[1] and XPerlDB.bar.texture[2] == v[2]) then
							self.Selection = k
						end
					end
				end

				self.scrollBar.bar:SetValue(max(0, min(self.Selection - 5, self.list and #self.list - 8 or 0)))
				self:SetBarColours()
				self:Setup()

				XPerl_Options_Mask:Show()
			</OnShow>
			<OnHide>
				XPerl_Options_Mask:Hide()
			</OnHide>
			<OnMouseWheel>
				if (delta > 0) then
				        self.scrollBar.bar:SetValue(self.scrollBar.bar:GetValue() - 1)
				else
				        self.scrollBar.bar:SetValue(self.scrollBar.bar:GetValue() + 1)
				end
			</OnMouseWheel>
		</Scripts>
		<Size>
			<AbsDimension x="215" y="260"/>
		</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>
			</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>
			</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>
			</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>
			</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>
			</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>
			</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>
			</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>
			</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>
			</Button>
			<Button name="$parent9" inherits="XPerl_Options_ButtonSelector" id="9">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent8">
						<Offset><AbsDimension x="0" y="-4" /></Offset>
					</Anchor>
				</Anchors>
			</Button>
			<ScrollFrame name="$parentscrollBar" inherits="FauxScrollFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parent0">
						<Offset>
							<AbsDimension x="-25" y="0"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parent9">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.bar = _G[self:GetName().."ScrollBar"]
					</OnLoad>
					<OnVerticalScroll>
						FauxScrollFrame_OnVerticalScroll(self, offset, 1, self:GetParent().UpdateFunction)
					</OnVerticalScroll>
					<OnMouseWheel>
						if (delta > 0) then
							self.bar:SetValue(self.bar:GetValue() - 1)
						else
							self.bar:SetValue(self.bar:GetValue() + 1)
						end
					</OnMouseWheel>
				</Scripts>
			</ScrollFrame>
			<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>
						if (XPerlDB) then
							XPerlDB.bar.texture = self:GetParent().list[self:GetParent().Selection]
							XPerl_Options_TextureSelect:Hide()
							XPerl_SetBarTextures()
						end
					</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()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<Frame name="XPerl_OptClassSelTemplate" virtual="true">
		<Size><AbsDimension x="160" y="24"/></Size>
		<Frames>
			<CheckButton name="$parent_Enable" inherits="XPerlCheckButtonTemplate">
				<Anchors><Anchor point="TOPLEFT"/></Anchors>
				<Scripts>
					<OnLoad>
						self:SetID(self:GetParent():GetID())
						self.tooltipText = XPERL_CONF_RAID_CLASS_DESC
						XPerl_Options_RegisterProtected(self)
					</OnLoad>
					<OnShow>
						local class = XPerlDB.raid.class[self:GetID()].name
						local textFrame = _G[self:GetName().."Text"]
						textFrame:SetText(LOCALIZED_CLASS_NAMES_MALE[class])
						self:SetHitRectInsets(0, -(textFrame:GetStringWidth()), 0, 0)
						self:SetChecked(XPerlDB.raid.class[self:GetID()].enable)
					</OnShow>
					<OnClick>
						XPerlDB.raid.class[self:GetID()].enable = self:GetChecked()
						XPerl_Raid_ChangeAttributes()
						XPerl_Raid_OptionActions()
					</OnClick>
				</Scripts>
			</CheckButton>

			<Button name="$parent_Down" inherits="XPerlDownArrow">
				<HitRectInsets>
					<AbsInset left="7" right="0" top="0" bottom="0"/>
				</HitRectInsets>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetID(self:GetParent():GetID())
						self.tooltipText = XPERL_CONF_RAID_CLASS_DOWN
						if (self:GetID() == 10) then
							self:Hide()
						end
					</OnLoad>
					<OnClick>
						XPerl_Options_MoveRaidClassDown(self)
						XPerl_Raid_ChangeAttributes()
						XPerl_Raid_OptionActions()
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parent_Up" inherits="XPerlUpArrow">
				<HitRectInsets>
					<AbsInset left="0" right="7" top="0" bottom="0"/>
				</HitRectInsets>
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPLEFT" relativeTo="$parent_Down">
						<Offset>
							<AbsDimension x="14" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetID(self:GetParent():GetID())
						self.tooltipText = XPERL_CONF_RAID_CLASS_UP
						if (self:GetID() == 1) then
							self:Hide()
						end
					</OnLoad>
					<OnClick>
						XPerl_Options_MoveRaidClassUp(self)
						XPerl_Raid_ChangeAttributes()
						XPerl_Raid_OptionActions()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<Frame name="XPerl_OptionsQuestionDialog" frameStrata="DIALOG" inherits="XPerl_OptionsTemplateNaked" parent="UIParent" hidden="true">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="10" y="-15"/>
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-10" y="30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentYes" inherits="XPerlButtonTemplate" text="YES">
				<Size><AbsDimension x="70" y="24"/></Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM">
						<Offset>
							<AbsDimension x="-20" y="10" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (self:GetParent().onAccept) then
							self:GetParent().onAccept()
						end
						self:GetParent().onAccept = nil
						self:GetParent():Hide()
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parentNo" inherits="XPerlButtonTemplate" text="NO">
				<Size><AbsDimension x="70" y="24"/></Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativePoint="BOTTOM">
						<Offset>
							<AbsDimension x="20" y="10" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent().onAccept = nil
						self:GetParent():Hide()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnHide>
				if (self.hideMask) then
					XPerl_Options_Mask:Hide()
				end
			</OnHide>
		</Scripts>
	</Frame>

	<Frame name="XPerl_Options_TooltipConfig" frameStrata="DIALOG" hidden="true" enableMouse="true">
		<Scripts>
			<OnLoad>
				self.Setup = XPerl_Options_SetupFunc
			</OnLoad>
			<OnShow>
				XPerl_Options:SetFrameStrata("HIGH")
				local fl = self:GetFrameLevel() + 2
				XPerl_Options_TooltipConfig_NotInCombat:SetFrameLevel(fl)
				XPerl_Options_TooltipConfig_TooltipAlways:SetFrameLevel(fl)
				XPerl_Options_TooltipConfig_TooltipAlt:SetFrameLevel(fl)
				XPerl_Options_TooltipConfig_TooltipShift:SetFrameLevel(fl)
				XPerl_Options_TooltipConfig_TooltipCtrl:SetFrameLevel(fl)
				self:Setup()
			</OnShow>
			<OnHide>
				XPerl_Options:SetFrameStrata("DIALOG")
			</OnHide>
			<OnUpdate>
				if (not MouseIsOver(self) and GetMouseFocus() ~= self:GetParent()) then
					self:Hide()
				end
			</OnUpdate>
		</Scripts>
		<Size><AbsDimension x="150" y="67"/></Size>
		<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>
			<CheckButton name="$parent_NotInCombat" inherits="XPerlCheckButtonTemplate">
				<Size><AbsDimension x="26" y="26"/></Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset><AbsDimension x="3" y="-3"/></Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_UNITTOOLTIPS_NIC")
					</OnLoad>
					<OnShow>
						if (self:GetParent().type == "buff") then
							self:SetChecked(XPerlDB.tooltip.buffHideInCombat)
						else
							self:SetChecked(XPerlDB.tooltip.hideInCombat)
						end
					</OnShow>
					<OnClick>
						if (self:GetParent().type == "buff") then
							XPerlDB.tooltip.buffHideInCombat = self:GetChecked()
						else
							XPerlDB.tooltip.hideInCombat = self:GetChecked()
						end
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parent_TooltipAlways" inherits="XPerlRadioButtonTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parent_NotInCombat" relativePoint="BOTTOM">
						<Offset><AbsDimension x="0" y="6"/></Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_UNITTOOLTIPS_ALWAYS")
					</OnLoad>
					<OnShow>
						if (self:GetParent().type == "buff") then
							self:SetChecked(not XPerlDB.tooltip.buffModifier or XPerlDB.tooltip.buffModifier == "all")
						else
							self:SetChecked(not XPerlDB.tooltip.modifier or XPerlDB.tooltip.modifier == "all")
						end
					</OnShow>
					<OnClick>
						if (self:GetParent().type == "buff") then
							XPerlDB.tooltip.buffModifier = "all"
						else
							XPerlDB.tooltip.modifier = "all"
						end
						XPerl_Options_CheckRadio(self,{"TooltipAlways", "TooltipAlt", "TooltipShift", "TooltipCtrl"})
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parent_TooltipAlt" inherits="XPerlRadioButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_TooltipAlways" relativePoint="TOPRIGHT">
						<Offset><AbsDimension x="40" y="0"/></Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_UNITTOOLTIPS_ALT")
					</OnLoad>
					<OnShow>
						if (self:GetParent().type == "buff") then
							self:SetChecked(XPerlDB.tooltip.buffModifier == "alt")
						else
							self:SetChecked(XPerlDB.tooltip.modifier == "alt")
						end
					</OnShow>
					<OnClick>
						if (self:GetParent().type == "buff") then
							XPerlDB.tooltip.buffModifier = "alt"
						else
							XPerlDB.tooltip.modifier = "alt"
						end
						XPerl_Options_CheckRadio(self,{"TooltipAlways", "TooltipAlt", "TooltipShift", "TooltipCtrl"})
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parent_TooltipShift" inherits="XPerlRadioButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_TooltipAlways" relativePoint="BOTTOMLEFT">
						<Offset><AbsDimension x="0" y="2"/></Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_UNITTOOLTIPS_SHIFT")
					</OnLoad>
					<OnShow>
						if (self:GetParent().type == "buff") then
							self:SetChecked(XPerlDB.tooltip.buffModifier == "shift")
						else
							self:SetChecked(XPerlDB.tooltip.modifier == "shift")
						end
					</OnShow>
					<OnClick>
						if (self:GetParent().type == "buff") then
							XPerlDB.tooltip.buffModifier = "shift"
						else
							XPerlDB.tooltip.modifier = "shift"
						end
						XPerl_Options_CheckRadio(self,{"TooltipAlways", "TooltipAlt", "TooltipShift", "TooltipCtrl"})
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parent_TooltipCtrl" inherits="XPerlRadioButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_TooltipShift" relativePoint="TOPRIGHT">
						<Offset><AbsDimension x="40" y="0"/></Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_UNITTOOLTIPS_CONTROL")
					</OnLoad>
					<OnShow>
						if (self:GetParent().type == "buff") then
							self:SetChecked(XPerlDB.tooltip.buffModifier == "control")
						else
							self:SetChecked(XPerlDB.tooltip.modifier == "control")
						end
					</OnShow>
					<OnClick>
						if (self:GetParent().type == "buff") then
							XPerlDB.tooltip.buffModifier = "control"
						else
							XPerlDB.tooltip.modifier = "control"
						end
						XPerl_Options_CheckRadio(self,{"TooltipAlways", "TooltipAlt", "TooltipShift", "TooltipCtrl"})
					</OnClick>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

	<Frame name="XPerl_Options_HealerModeTemplate" virtual="true">
		<Size><AbsDimension x="190" y="62"/></Size>
		<Frames>
			<CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_HEALER_MODE", true)
						self.Validate = function()
							XPerl_Options_EnableSibling(self, "DeficitOnly")
							XPerl_Options_EnableSibling(self,"DeficitMax")
							XPerl_Options_EnableSibling(self,"CurMaxDeficit")
						end
					</OnLoad>
					<OnShow>
						self:SetChecked(self:GetParent():getEnable())
						self:Validate()
					</OnShow>
					<OnClick>
						self:GetParent().setEnable(self:GetChecked())
						self:Validate()
					</OnClick>
				</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(self, "XPERL_CONF_HEALERMODE_DEFICIT", true)
					</OnLoad>
					<OnShow>
						self:SetChecked(self:GetParent():getType() == 0)
						if (self.hideOptions and strfind(self.hideOptions, "0")) then
							self:Hide()
						else
							self:Show()
						end
					</OnShow>
					<OnClick>
						self:GetParent().setType(0)
						XPerl_Options_CheckRadio(self,{"DeficitOnly", "DeficitMax", "CurMaxDeficit"})
					</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(self, "XPERL_CONF_HEALERMODE_DEFICITMAX", true)
					</OnLoad>
					<OnShow>
						self:SetChecked(self:GetParent():getType() == 1)
						if (self.hideOptions and strfind(self.hideOptions, "1")) then
							self:Hide()
						else
							self:Show()
						end
					</OnShow>
					<OnClick>
						self:GetParent().setType(1)
						XPerl_Options_CheckRadio(self,{"DeficitOnly", "DeficitMax", "CurMaxDeficit"})
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parent_CurMaxDeficit" inherits="XPerlRadioButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_DeficitOnly" relativePoint="BOTTOMLEFT">
						<Offset><AbsDimension x="0" y="2"/></Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						XPerl_OptionsSetMyText(self, "XPERL_CONF_HEALERMODE_CURMAXDEFICIT", true)
					</OnLoad>
					<OnShow>
						self:SetChecked(self:GetParent():getType() == 2)
						if (self.hideOptions and strfind(self.hideOptions, "2")) then
							self:Hide()
						else
							self:Show()
						end
					</OnShow>
					<OnClick>
						self:GetParent().setType(2)
						XPerl_Options_CheckRadio(self,{"DeficitOnly", "DeficitMax", "CurMaxDeficit"})
					</OnClick>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

	<Button name="XPerlLayoutLineTemplate" virtual="true">
		<NormalFont style="GameFontNormalSmall"/>
		<ButtonText name="$parentText" justifyH="LEFT" setAllPoints="true"/>
		<Size>
			<AbsDimension x="120" y="12"/>
		</Size>
		<Scripts>
			<OnLoad>
				self.master = self:GetParent():GetParent()
				if (not self.master.line) then
					self.master.line = {}
				end
				self.master.line[self:GetID()] = self
			</OnLoad>
			<OnClick>
				XPerl_Options_Layout_Name:SetText(self.raw)
				self.master.selection = self:GetID() + self.master.start - 1
				self.master:FillList()
			</OnClick>
			<OnMouseWheel>
				if (delta > 0) then
					self.master.scrollBar.bar:SetValue(self.master.scrollBar.bar:GetValue() - 2)
				else
					self.master.scrollBar.bar:SetValue(self.master.scrollBar.bar:GetValue() + 2)
				end

				XPerl_Options_LayoutFill(XPerl_Options_Layout)
			</OnMouseWheel>
		</Scripts>
		<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
	</Button>

	<Frame name="XPerl_OptionsAnchor" parent="UIParent" movable="true" resizable="true">
		<Size>
			<AbsDimension x="650" y="540"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
	</Frame>

	<!-- Options Frames -->
	<Frame name="XPerl_Options" inherits="XPerl_OptionsTemplate" parent="XPerl_OptionsAnchor" hidden="true">
		<Scripts>
			<OnEvent>
				if (event == "PLAYER_REGEN_DISABLED") then
					XPerl_Options_InCombatChange(true)
				elseif (event == "PLAYER_REGEN_ENABLED") then
					XPerl_Options_InCombatChange(false)
				end
			</OnEvent>
			<OnShow>
				self:RegisterEvent("PLAYER_REGEN_ENABLED")
				self:RegisterEvent("PLAYER_REGEN_DISABLED")
				XPerl_Options_InCombatChange(UnitAffectingCombat("player"))

				if (not self.initDone) then
					local tabs = {XPerl_Options_Tab1}

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

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

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

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

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

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

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

					table.insert(tabs, XPerl_Options_Tab9)

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

					if (XPerl_RaidMonitor_Frame) then
						table.insert(tabs, XPerl_Options_Tab11)
					end

					if (XPerl_AdminFrame) then
						table.insert(tabs, XPerl_Options_Tab12)
					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 + (19 + _G[tab:GetName().."Text"]:GetStringWidth())
						end
						lastTab = tab
					end

					local width = 220 + totalTabWidth
					if (not (width >= 700)) then
						width = 700
					end
					self:SetWidth(width)
					XPerl_OptionsAnchor:SetWidth(width)
					XPerl_OptionsAnchor:SetHeight(self:GetHeight())

					XPerl_RegisterScalableFrame(self, XPerl_OptionsAnchor, 0.5, 1.2)

					self.initDone = true
				end

				--if (XPerlDB.colour.gradient.enable) then
				--	XPerl_Options_OptionsColour:Hide()
				--else
				--	XPerl_Options_OptionsColour:Show()
				--end

				self:Setup()
			</OnShow>
			<OnHide>
				self:UnregisterEvent("PLAYER_REGEN_ENABLED")
				self:UnregisterEvent("PLAYER_REGEN_DISABLED")
			</OnHide>
			<OnUpdate>
				XPerl_Options_OnUpdate(self,elapsed)
			</OnUpdate>
			<OnHide>
                XPerl_OptionsAnchor:StopMovingOrSizing()
			</OnHide>
			<OnMouseDown>
				if (button == "LeftButton") then
					XPerl_OptionsAnchor:StartMoving()
				end
			</OnMouseDown>
			<OnMouseUp>
				XPerl_OptionsAnchor:StopMovingOrSizing()
				if (XPerl_SavePosition) then
					XPerl_SavePosition(XPerl_OptionsAnchor)
				end
			</OnMouseUp>
		</Scripts>
		<Size>
			<AbsDimension x="650" y="540"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT"/>
		</Anchors>
		<Frames>
			<Frame name="XPerl_Options_Mask" hidden="true" setAllPoints="true" enableMouse="true">
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parenttex" file="Interface\ChatFrame\ChatFrameBackground">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset><AbsDimension x="4" y="-4"/></Offset>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset><AbsDimension x="-4" y="4"/></Offset>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnShow>
						XPerl_Options_Masktex:SetVertexColor(0, 0, 0, 0.5)
						self:SetFrameLevel(XPerl_Options:GetFrameLevel() + 5)
						XPerl_Options:SetFrameStrata("MEDIUM")
					</OnShow>
					<OnHide>
						XPerl_Options:SetFrameStrata("HIGH")
						XPerl_Options:Hide()
						XPerl_Options:Show()
					</OnHide>
				</Scripts>
			</Frame>

			-- Player and Target Frame Options
			<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="3" y="2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						XPerl_LockFrames()
					</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(self, "XPERL_CONF_ALIGN_PLAYER_TOP")
								XPerl_Options_RegisterProtected(self)
							</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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnClick>
								local new = XPerl_Options_DecrementSibling(self,"Gap")
								XPerl_Player_SetGap(new)
							</OnClick>
						</Scripts>
					</Button>

					<EditBox name="$parent_Gap" inherits="XPerlOptEditBox">
						<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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnEditFocusGained>
								self.editing = true
							</OnEditFocusGained>
							<OnEditFocusLost>
								self.editing = nil
							</OnEditFocusLost>
							<OnShow>
								if (XPerl_Player_GetGap) then
									self:SetText(XPerl_Player_GetGap())
								end
							</OnShow>
							<OnTextChanged>
								if (self.editing) then
									if (XPerl_Player_GetGap) then
										XPerl_Player_SetGap(tonumber(self: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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnClick>
								local new = XPerl_Options_IncrementSibling(self,"Gap")
								XPerl_Player_SetGap(new)
							</OnClick>
						</Scripts>
					</Button>

					<Slider name="$parent_ScaleFocus" inherits="XPerlSlider">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="5" y="30" />
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.configBase = "XPerlDB.focus"
								self.configIndex = "scale"
								self.configClick = XPerl_Target_Reset
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</Scripts>
					</Slider>

					<Slider name="$parent_ScaleT" inherits="XPerlSlider">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" relativeTo="$parent_ScaleFocus">
								<Offset>
									<AbsDimension x="0" y="28" />
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.configBase = "XPerlDB.target"
								self.configIndex = "scale"
								self.configClick = XPerl_Target_Reset
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</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>
								self.configBase = "XPerlDB.player"
								self.configIndex = "scale"
								self.configClick = XPerl_Player_Reset
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</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>
				<Scripts>
					<OnShow>
						if (not IsAddOnLoaded("XPerl_PartyPet")) then
							_G[self:GetName().."_ScalePets"]:Hide()
						end
					</OnShow>
				</Scripts>
				<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_SmallerGap" inherits="XPerlUpArrow">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="-4" y="3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnClick>
								local new = XPerl_Options_DecrementSibling(self,"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>
								_G[self:GetName().."Text"]:SetText(XPERL_CONF_ALIGN_SPACING)
							</OnLoad>
						</Scripts>
					</Button>

					<EditBox name="$parent_Gap" inherits="XPerlOptEditBox">
						<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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnEditFocusGained>
								self.editing = true
							</OnEditFocusGained>
							<OnEditFocusLost>
								self.editing = nil
							</OnEditFocusLost>
							<OnShow>
								if (XPerl_Party_GetGap) then
									self:SetText(XPerl_Party_GetGap())
								end
							</OnShow>
							<OnTextChanged>
								if (self.editing) then
									if (XPerl_Party_GetGap) then
										XPerl_Party_SetGap(tonumber(self: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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnClick>
								local new = XPerl_Options_IncrementSibling(self,"Gap")
								XPerl_Party_SetGap(new)
							</OnClick>
						</Scripts>
					</Button>

					<Frame name="$parent_Anchor" inherits="UIDropDownMenuTemplate" enableMouse="true">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BiggerGap" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="-7" y="-10" />
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="XPERL_CONF_ANCHORMENU">
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
											<Offset>
												<AbsDimension x="21" y="3"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								XPerl_Options_RegisterProtected(_G[self:GetName().."Button"])
								self.varGet = function() return (XPerlDB and XPerlDB.party.anchor) or "TOP" end
								self.varSet = function(n) XPerlDB.party.anchor = n end
								self.setFunc = function() if (XPerl_Party_SetMainAttributes) then XPerl_Party_SetMainAttributes() XPerl_Party_Virtual(true) end end
								XPerl_Options_Anchor_OnLoad(self)
							</OnLoad>
							<OnShow>
								XPerl_Options_Anchor_OnLoad(self)
							</OnShow>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -15, 0)
								GameTooltip:SetText(XPERL_CONF_ANCHORMENU_DESC, nil, nil, nil, nil, 1)
								_G[self:GetName().."Label"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
							</OnEnter>
							<OnLeave>
								_G[self:GetName().."Label"]:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
								GameTooltip:Hide()
							</OnLeave>
						</Scripts>
					</Frame>

					<CheckButton name="$parent_Flip" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Anchor" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="11" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_FLIP")
								self.configBase = "XPerlDB.party"
								self.configIndex = "flip"
								self.configClick = XPerl_Party_Set_Bits
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>


					<Slider name="$parent_ScalePets" inherits="XPerlSlider">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="5" y="30" />
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.configBase = "XPerlDB.partypet"
								self.configIndex = "scale"
								self.configClick = XPerl_PartyPet_Reset
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTYPET_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</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>
								self.configBase = "XPerlDB.party"
								self.configIndex = "scale"
								self.configClick = XPerl_Party_Reset
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</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>
					<Frame 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>
					</Frame>

					<Frame name="$parent_Anchor" inherits="UIDropDownMenuTemplate" enableMouse="true">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
								<Offset>
									<AbsDimension x="-12" y="-12" />
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="XPERL_CONF_ANCHORMENU">
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
											<Offset>
												<AbsDimension x="21" y="3"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								XPerl_Options_RegisterProtected(_G[self:GetName().."Button"])
								self.varGet = function() return (XPerlDB and XPerlDB.raid.anchor) or "TOP" end
								self.varSet = function(n) XPerlDB.raid.anchor = n end
								self.setFunc = XPerl_Raid_ChangeAttributes
								XPerl_Options_Anchor_OnLoad(self)
							</OnLoad>
							<OnShow>
								XPerl_Options_Anchor_OnLoad(self)
							</OnShow>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -15, 0)
								GameTooltip:SetText(XPERL_CONF_ANCHORMENU_DESC, nil, nil, nil, nil, 1)
								_G[self:GetName().."Label"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
							</OnEnter>
							<OnLeave>
								_G[self:GetName().."Label"]:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
								GameTooltip:Hide()
							</OnLeave>
						</Scripts>
					</Frame>

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

					<Button name="$parent_AlignLeft" inherits="XPerlButtonTemplate">
						<Size>
							<AbsDimension x="70" y="24"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_AlignTop">
								<Offset>
									<AbsDimension x="0" y="0" />
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALIGN_RAID_LEFT")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnClick>
								XPerl_Raid_AlignLeft()
							</OnClick>
						</Scripts>
					</Button>

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

					<EditBox name="$parent_Gap" inherits="XPerlOptEditBox">
						<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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnEditFocusGained>
								self.editing = true
							</OnEditFocusGained>
							<OnEditFocusLost>
								self.editing = nil
							</OnEditFocusLost>
							<OnShow>
								if (XPerl_Raid_GetGap) then
									self:SetText(XPerl_Raid_GetGap())
								end
							</OnShow>
							<OnTextChanged>
								if (self.editing and XPerl_Raid_SetGap) then
									XPerl_Raid_SetGap(tonumber(self: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>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnClick>
								local new = XPerl_Options_IncrementSibling(self,"Gap")
								XPerl_Raid_SetGap(new)
							</OnClick>
						</Scripts>
					</Button>

					<CheckButton name="$parent_All" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_SmallerGap" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="-8" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_Options.raidAlign = "all"
								self:SetChecked(true)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALIGN_RAID_ALL")
							</OnLoad>
							<OnClick>
								XPerl_Options.raidAlign = "all"
								XPerl_Options_CheckRadio(self,{"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>
								self:SetChecked(false)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALIGN_RAID_ODD")
							</OnLoad>
							<OnClick>
								XPerl_Options.raidAlign = "odd"
								XPerl_Options_CheckRadio(self,{"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>
								self:SetChecked(false)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALIGN_RAID_EVEN")
							</OnLoad>
							<OnClick>
								XPerl_Options.raidAlign = "even"
								XPerl_Options_CheckRadio(self,{"All", "Odds", "Evens", "First4", "Last4"})
							</OnClick>
						</Scripts>
					</CheckButton>

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

					<CheckButton name="$parent_Last4" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Evens" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="60" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetChecked(false)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALIGN_RAID_LAST4")
							</OnLoad>
							<OnClick>
								XPerl_Options.raidAlign = "last4"
								XPerl_Options_CheckRadio(self,{"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>
								self.configBase = "XPerlDB.raid"
								self.configIndex = "scale"
								self.configClick = XPerl_Raid_OptionActions
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</Scripts>
					</Slider>
				</Frames>
			</Frame>

			-- Global Options
			<Frame name="$parent_Layout">
				-- TODO LAYOUT STUFF HERE
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Global"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Global"/>
				</Anchors>

				<Scripts>
					<OnLoad>
						self.FillList = XPerl_Options_LayoutFill
						self.GetLayout = XPerl_Options_GetLayout

						self.scrollBar = XPerl_Options_Layout_ListScrollBar
						self.scrollBar.bar = XPerl_Options_Layout_ListScrollBarScrollBar
					</OnLoad>
					<OnShow>
						self:FillList()
					</OnShow>
				</Scripts>

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

					<EditBox name="$parent_Name" letters="100" inherits="XPerlOptEditBox">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="8" y="3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="105" y="24"/>
						</Size>
						<Scripts>
							<OnTextChanged>
								local me = format("%s(%s)", GetRealmName(), UnitName("player"))
								local t = self:GetText()
								if (t and t ~= "" and strlower(t) ~= strlower(me)) then
									XPerl_Options_GetSibling("Save",self):Enable()
								else
									XPerl_Options_GetSibling("Save",self):Disable()
								end
								local curLayout = self:GetParent():GetLayout(t)
								if (curLayout and strlower(t) ~= strlower(me)) then
									XPerl_Options_GetSibling("Load",self):Enable()
								else
									XPerl_Options_GetSibling("Load",self):Disable()
								end
								if (curLayout and strlower(t) ~= strlower(me)) then
									XPerl_Options_GetSibling("Delete",self):Enable()
								else
									XPerl_Options_GetSibling("Delete",self):Disable()
								end
							</OnTextChanged>
						</Scripts>
					</EditBox>

					<Button name="$parent_Save" inherits="XPerlButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Name" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="-6" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FRAME_LAYOUT_SAVE")
							</OnLoad>
							<OnClick>
								local name = XPerl_Options_GetSibling("Name",self):GetText()
								if (strlower(name) ~= "current") then
									XPerl_Options_SaveFrameLayout(name)
									self:GetParent():FillList(true)
								end
							</OnClick>
						</Scripts>
					</Button>

					<Button name="$parent_Load" inherits="XPerlButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Save" relativePoint="TOPRIGHT"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FRAME_LAYOUT_LOAD")
							</OnLoad>
							<OnClick>
								XPerl_Options_LoadFrameLayout(XPerl_Options_GetSibling("Name",self):GetText())
							</OnClick>
						</Scripts>
					</Button>

					<Button name="$parent_Delete" inherits="XPerl_BasicButton" text="DELETE">
						<Size>
							<AbsDimension x="64" y="64"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent_Name" relativePoint="BOTTOMRIGHT">
								<Offset>
									<AbsDimension x="0" y="-2"/>
								</Offset>
							</Anchor>
						</Anchors>
						<NormalTexture file="Interface\Addons\XPerl_RaidAdmin\Images\XPerl_Bin">
							<TexCoords left="0" right="0.5" top="0" bottom="0.5"/>
						</NormalTexture>
						<PushedTexture file="Interface\Addons\XPerl_RaidAdmin\Images\XPerl_Bin">
							<TexCoords left="0.5" right="1" top="0" bottom="0.5"/>
						</PushedTexture>
						<DisabledTexture file="Interface\Addons\XPerl_RaidAdmin\Images\XPerl_Bin">
							<TexCoords left="0" right="0.5" top="0.5" bottom="1"/>
						</DisabledTexture>
						<HighlightTexture file="Interface\Addons\XPerl_RaidAdmin\Images\XPerl_Bin" alphaMode="ADD">
							<TexCoords left="0.5" right="1" top="0.5" bottom="1"/>
						</HighlightTexture>
						<Scripts>
							<OnLoad>
								self.tooltipText = XPERL_CONF_FRAME_LAYOUT_DELETE_DESC
								self:SetScale(0.5)
							</OnLoad>
							<OnClick>
								if (XPerl_Options_DeleteFrameLayout(XPerl_Options_GetSibling("Name",self):GetText())) then
									self:GetParent():FillList(true)
								end
							</OnClick>
						</Scripts>
					</Button>

					<Frame name="$parent_List">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Save" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-3"/>
								</Offset>
							</Anchor>
							<Anchor point="BOTTOMRIGHT">
								<Offset>
									<AbsDimension x="-10" y="10"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
							<EdgeSize>
								<AbsValue val="9"/>
							</EdgeSize>
						</Backdrop>
						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
							</OnLoad>
							<OnMouseWheel>
								local arg1 = delta
								if (arg1 > 0) then
									self:GetParent().scrollBar.bar:SetValue(self:GetParent().scrollBar.bar:GetValue() - 2)
								else
									self:GetParent().scrollBar.bar:SetValue(self:GetParent().scrollBar.bar:GetValue() + 2)
								end

								XPerl_Options_LayoutFill(XPerl_Options_Layout)
							</OnMouseWheel>
						</Scripts>
						<Frames>
							<Button name="$parent1" inherits="XPerlLayoutLineTemplate" text="Line" id="1">
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="4" y="-3"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="$parent2" inherits="XPerlLayoutLineTemplate" text="Line" id="2">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent1" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent3" inherits="XPerlLayoutLineTemplate" text="Line" id="3">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent2" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent4" inherits="XPerlLayoutLineTemplate" text="Line" id="4">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent3" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent5" inherits="XPerlLayoutLineTemplate" text="Line" id="5">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent4" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent6" inherits="XPerlLayoutLineTemplate" text="Line" id="6">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent5" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent7" inherits="XPerlLayoutLineTemplate" text="Line" id="7">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent6" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent8" inherits="XPerlLayoutLineTemplate" text="Line" id="8">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent7" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent9" inherits="XPerlLayoutLineTemplate" text="Line" id="9">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent8" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent10" inherits="XPerlLayoutLineTemplate" text="Line" id="10">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent9" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent11" inherits="XPerlLayoutLineTemplate" text="Line" id="11">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent10" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent12" inherits="XPerlLayoutLineTemplate" text="Line" id="12">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent11" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent13" inherits="XPerlLayoutLineTemplate" text="Line" id="13">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent12" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent14" inherits="XPerlLayoutLineTemplate" text="Line" id="14">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent13" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent15" inherits="XPerlLayoutLineTemplate" text="Line" id="15">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent14" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<Button name="$parent16" inherits="XPerlLayoutLineTemplate" text="Line" id="16">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent15" relativePoint="BOTTOMLEFT"/></Anchors>
							</Button>
							<ScrollFrame name="$parentScrollBar" inherits="FauxScrollFrameTemplate">
								<Size>
									<AbsDimension x="20" y="24"/>
								</Size>
								<Anchors>
									<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" relativeTo="$parent1">
										<Offset>
											<AbsDimension x="3" y="1"/>
										</Offset>
									</Anchor>
									<Anchor point="BOTTOMRIGHT"/>
								</Anchors>
								<Scripts>
									<OnVerticalScroll>
										FauxScrollFrame_OnVerticalScroll(self, offset, 1, function() XPerl_Options_LayoutFill(XPerl_Options_Layout) end)
									</OnVerticalScroll>
									<OnMouseWheel>
										local arg1 = delta
										local f = _G[self:GetName().."ScrollBar"]
										if (arg1 > 0) then
											f:SetValue(f:GetValue() + 3)
										else
											f:SetValue(f:GetValue() - 3)
										end

										XPerl_Options_LayoutFill(XPerl_Options_Layout)
									</OnMouseWheel>
								</Scripts>
							</ScrollFrame>
						</Frames>
					</Frame>
				</Frames>
			</Frame>

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

						self.SelectTab = function(self, id)

							for i=1,table.getn(self.frameNames) do
								local frame = _G[self:GetParent():GetName()..self.frameNames[i]]
								--if (frame) then
								--	For when we need to find more space in options:
								--	frame:SetScale(0.9)
								--end

								local tab = _G[self:GetName()..i]
								if (i == id) then
									XPerl_Options_EnableTab(tab, true)
									if (frame) then
										frame:Show()
									end
								else
									if (tab and tab:IsShown()) then
										XPerl_Options_EnableTab(tab, false)
									end

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

						self: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>
								self: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>
								self: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>
								self: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>
								self:GetParent():SelectTab(4)
								XPerl_OptionsFrame_SelectFrame("player")
							</OnClick>
						</Scripts>
					</Button>

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

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

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

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

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

					<Button name="$parent10" inherits="XPerlTabTemplate" id="10" hidden="true">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent9"/>
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():SelectTab(10)
							</OnClick>
						</Scripts>
					</Button>

					<Button name="$parent11" inherits="XPerlTabTemplate" id="11" hidden="true">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent10"/>
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():SelectTab(11)
							</OnClick>
						</Scripts>
					</Button>

					<Button name="$parent12" inherits="XPerlTabTemplate" id="12" hidden="true">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent11"/>
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():SelectTab(12)
							</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>
						<Layers>
							<Layer level="OVERLAY">
								<FontString name="$parentName" inherits="GameFontNormalSmall">
									<Anchors>
										<Anchor point="TOPLEFT"/>
										<Anchor point="BOTTOMRIGHT">
											<Offset><AbsDimension x="0" y="1"/></Offset>
										</Anchor>
									</Anchors>
									<Color r="1" g="1" b="1"/>
								</FontString>
							</Layer>
						</Layers>
						<NormalTexture file="Interface\TargetingFrame\UI-StatusBar"/>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BAR_TEXTURES")
							</OnLoad>
							<OnShow>
								if (XPerlDB.bar.texture and XPerlDB.bar.texture[1]) then
									_G[self:GetName().."Name"]:SetText(XPerlDB.bar.texture[1])
								end
								local tex = XPerl_GetBarTexture()
								self:SetNormalTexture(tex)
							</OnShow>
							<OnClick>
								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(self, "XPERL_CONF_BAR_TEXTURES_BACKGROUND")
								self.configBase = "XPerlDB.bar"
								self.configIndex = "background"
								self.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(self, "XPERL_CONF_BAR_FADING")
								self.configBase = "XPerlDB.bar"
								self.configIndex = "fading"
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"FadeTime")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_FadeTime" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="95" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_FadingBars" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="80" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)

								local t = XPerl_Options_GetSibling("FadingBars",self)
								local t2 = getglobal(t:GetName().."Text")
								self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BAR_FADING_TIME")
								_G[self:GetName().."Low"]:SetText("0.2")
								_G[self:GetName().."High"]:SetText("2.0")
								self:SetMinMaxValues(2, 20)
								self:SetValueStep(1)
							</OnLoad>
							<OnShow>
								self:SetValue(floor((XPerlDB.bar.fadeTime + 0.05) * 10))
							</OnShow>
							<OnValueChanged>
								XPerlDB.bar.fadeTime = value / 10
								_G[self:GetName().."Current"]:SetText(string.format("%.1f", XPerlDB.bar.fadeTime))
							</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(self, "XPERL_CONF_INVERSEBARS")
								self.configBase = "XPerlDB.bar"
								self.configIndex = "inverse"
								self.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(self, "XPERL_CONF_FATHEALTHBARS")
								self.configBase = "XPerlDB.bar"
								self.configIndex = "fat"
								self.configClick = XPerl_Options_SetupStatsFrames
							</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(self, "XPERL_CONF_COMBAT_FLASH")
								self.configBase = "XPerlDB"
								self.configIndex = "combatFlash"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Highlight" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_CombatFlash" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_SELECTION_HIGHLIGHT")
								self.configBase = "XPerlDB"
								self.configIndex = "highlightSelection"
							</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(self, "XPERL_CONF_HIGHLIGHTDEBUFFS")
								self.configBase = "XPerlDB.highlightDebuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_OptionActions
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"HighBackground")
									XPerl_Options_EnableSibling(self,"HighBorder")
									XPerl_Options_EnableSibling(self,"HighBoth")
									XPerl_Options_EnableSibling(self,"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(self, "XPERL_CONF_HIGHLIGHTDEBUFFSBACKGROUND")
							</OnLoad>
							<OnShow>
								self:SetChecked(not XPerlDB.highlightDebuffs.border and XPerlDB.highlightDebuffs.frame)
							</OnShow>
							<OnClick>
								XPerlDB.highlightDebuffs.border = nil
								XPerlDB.highlightDebuffs.frame = 1
								XPerl_Options_CheckRadio(self,{"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(self, "XPERL_CONF_HIGHLIGHTDEBUFFSBORDER")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.highlightDebuffs.border and not XPerlDB.highlightDebuffs.frame)
							</OnShow>
							<OnClick>
								XPerlDB.highlightDebuffs.border = 1
								XPerlDB.highlightDebuffs.frame = nil
								XPerl_Options_CheckRadio(self,{"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(self, "XPERL_CONF_HIGHLIGHTDEBUFFSBOTH")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.highlightDebuffs.border and XPerlDB.highlightDebuffs.frame)
							</OnShow>
							<OnClick>
								XPerlDB.highlightDebuffs.border = 1
								XPerlDB.highlightDebuffs.frame = 1
								XPerl_Options_CheckRadio(self,{"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(self, "XPERL_CONF_HIGHLIGHTDEBUFFSCLASS")
								self.configBase = "XPerlDB.highlightDebuffs"
								self.configIndex = "class"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffCooldown" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Highlight" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="120" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFCOOLDOWN")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "cooldown"
								self.configClick = XPerl_OptionActions
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"BuffCooldownAny")
									XPerl_Options_EnableSibling(self,"BuffCountdown")
									XPerl_Options_EnableSibling(self,"BuffCountdownAny", "BuffCountdown")
									XPerl_Options_EnableSibling(self,"BuffCountdownStart", "BuffCountdown")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffCooldownAny" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffCooldown" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="90" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFCOOLDOWNANY")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "cooldownAny"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffCountdown" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_BuffCooldown" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFCOUNTDOWN")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "countdown"
								self.configClick = XPerl_OptionActions
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"BuffCountdownStart")
									XPerl_Options_EnableSibling(self,"BuffCountdownAny", "BuffCooldown")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffCountdownAny" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffCountdown" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="90" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFCOUNTDOWNANY")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "countdownAny"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffCasterNames" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffCountdown" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="-20"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPNAMES")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "names"
							</OnLoad>
						</Scripts>
					</CheckButton>
					
					<CheckButton name="$parent_IgnoreSeasonal" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffCasterNames" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFIGNORESEASONAL")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "ignoreSeasonal"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BlizzardsBuffs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_IgnoreSeasonal" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFBLIZZARDTOO")
								self.configBase = "XPerlDB.buffs"
								self.configIndex = "blizzardCooldowns"
								self.configClick = BuffFrame_Update
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_BuffCountdownStart" inherits="XPerlSlider">
						<Size><AbsDimension x="100" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffCountdown" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="-7" y="-5"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(1, 60)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFCOUNTDOWNSTART")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.buffs.countdownStart)
								if (XPerlDB.buffs.countdown) then
									self:EnableSlider()
								else
									self:DisableSlider()
								end
							</OnShow>
							<OnValueChanged>
								XPerlDB.buffs.countdownStart = value
								_G[self:GetName().."Current"]:SetText(XPerlDB.buffs.countdownStart)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_Highlights" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_HighlightClass" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "enable"
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"HighlightHoTs")
									XPerl_Options_EnableSibling(self,"HighlightHEAL")
									XPerl_Options_EnableSibling(self,"HighlightAggro")
									XPerl_Options_EnableSibling(self,"HighlightShields")
									XPerl_Options_EnableSibling(self,"HighlightHotcount")
									XPerl_Options_EnableSibling(self,"HighlightTarget")
									XPerl_Options_EnableSibling(self,"HighlightMending")
									XPerl_Options_EnableSibling(self,"HighlightSparkles")
									XPerl_Options_EnableSibling(self,"ExtraSparkles")

									local _, class = UnitClass("player")
									if (class ~= "DRUID" and class ~= "PRIEST" and class ~= "SHAMAN") then
										XPerlDB.highlight.HOT = nil
										XPerl_Options_EnableCheck(XPerl_Options_GetSibling("HighlightHoTs",self), false)
									end
									if (class ~= "PRIEST" and class ~= "SHAMAN" and class ~= "MAGE" and class ~= "PALADIN") then
										XPerlDB.highlight.SHIELD = nil
										XPerl_Options_EnableCheck(XPerl_Options_GetSibling("HighlightShields",self), false)
									end
									if (class ~= "PRIEST") then
										XPerlDB.highlight.POM = nil
										XPerl_Options_EnableCheck(XPerl_Options_GetSibling("HighlightMending",self), false)
									end
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HighlightHoTs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_Highlights" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_HOTS")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "HOT"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HighlightHotcount" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightHoTs" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="100" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_HOTCOUNT")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "HOTCOUNT"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HighlightAggro" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightHoTs" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_AGGRO")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "AGGRO"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HighlightHEAL" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightHotcount" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_HEAL")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "HEAL"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HighlightShields" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightAggro" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_SHIELDS")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "SHIELD"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HighlightTarget" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightHEAL" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_TARGET")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "TARGET"
							</OnLoad>
						</Scripts>
					</CheckButton>
					
					<CheckButton name="$parent_HighlightMending" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightShields" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_MENDING")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "POM"
							</OnLoad>
						</Scripts>
					</CheckButton>
					
					<CheckButton name="$parent_HighlightSparkles" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightMending" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_SPARKLES")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "sparkles"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ExtraSparkles" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HighlightSparkles" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="100" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HIGHLIGHTS_EXTRA")
								self.configBase = "XPerlDB.highlight"
								self.configIndex = "extraSparkles"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_RangeFinder">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="5" y="105"/></Offset>
							</Anchor>
							<Anchor point="BOTTOMRIGHT">
								<Offset><AbsDimension x="-5" y="5"/></Offset>
							</Anchor>
						</Anchors>

						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
								self.Refresh = function(self)
									local a = {"Enable", "FadeAmount", "CustomSpell", "CombineWithHealth", "RangeHealthAmount", "DebuffCheck", "InteractNone", "Interact10", "Interact30", "Interact40"}
									for k,v in pairs(a) do
										local f = _G[self:GetName().."_"..v]
										if (f) then
											f:Hide()
											f:Show()
										end
									end
								end
							</OnLoad>
						</Scripts>

						<Layers>
							<Layer level="ARTWORK">
								<Texture name="$parentSeparator" file="Interface\TradeSkillFrame\UI-TradeSkill-SkillBorder">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="XPerl_Options_Area_Tabs" relativePoint="BOTTOMLEFT">
											<Offset>
												<AbsDimension x="3" y="107"/>
											</Offset>
										</Anchor>
										<Anchor point="BOTTOMRIGHT" relativeTo="XPerl_Options_Area_Tabs">
											<Offset>
												<AbsDimension x="-3" y="104"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0.1" right="1.0" top="0" bottom="0.25"/>
								</Texture>
							</Layer>
						</Layers>

						<Frames>
							<CheckButton name="$parent_On" inherits="XPerlCheckButtonTemplate">
								<Anchors><Anchor point="TOPLEFT"/></Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGEFINDER")
										self.Validate = function()
											XPerl_Options_EnableSibling(self,"OnlyInRaid")
											XPerl_Options_EnableSibling(self,"Main")
											XPerl_Options_EnableSibling(self,"NameFrame")
											XPerl_Options_EnableSibling(self,"StatsFrame")
											XPerl_Options_EnableSibling(self,"Enable")
											XPerl_Options_EnableSibling(self,"InteractNone")
											XPerl_Options_EnableSibling(self,"Interact10")
											XPerl_Options_EnableSibling(self,"Interact30")
											XPerl_Options_EnableSibling(self,"Interact40")
										end
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.rangeFinder.enabled)
										self:Validate()
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder.enabled = self:GetChecked()
										self:GetParent():Refresh()
										self:Validate()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_OnlyInRaid" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_On" relativePoint="BOTTOM">
										<Offset>
											<AbsDimension x="0" y="7"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_RAIDONLY")
										self.configBase = "XPerlDB.rangeFinder"
										self.configIndex = "raidOnly"
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Main" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_OnlyInRaid" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="2" y="5"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_Options.optRange = "Main"
										self:SetChecked(true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_MAIN")
									</OnLoad>
									<OnClick>
										XPerl_Options.optRange = "Main"
										XPerl_Options_CheckRadio(self,{"Main", "NameFrame", "StatsFrame"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_NameFrame" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Main" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(false)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_NAMEFRAME")
									</OnLoad>
									<OnClick>
										XPerl_Options.optRange = "NameFrame"
										XPerl_Options_CheckRadio(self,{"Main", "NameFrame", "StatsFrame"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_StatsFrame" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_NameFrame" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(false)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_STATSFRAME")
									</OnLoad>
									<OnClick>
										XPerl_Options.optRange = "StatsFrame"
										XPerl_Options_CheckRadio(self,{"Main", "NameFrame", "StatsFrame"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Enable" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="LEFT" relativeTo="$parent_On" relativePoint="RIGHT">
										<Offset><AbsDimension x="60" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_ENABLE")
									</OnLoad>
									<OnShow>
										local t = XPerl_Options_GetSibling("On",self)
										local t2 = _G[t:GetName().."Text"]
										self:SetPoint("LEFT", t, "RIGHT", t2:GetStringWidth() + 10, 0)
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].enabled)
										XPerl_Options_EnableCheck(self, XPerlDB.rangeFinder.enabled)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].enabled = self:GetChecked()
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_FadeAmount" inherits="XPerlSlider">
								<Size><AbsDimension x="75" y="16"/></Size>
								<Anchors>
									<Anchor point="TOP">
										<Offset><AbsDimension x="-20" y="-15"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGEFADEAMOUNT")
										_G[self:GetName().."Low"]:SetText(" ")
										_G[self:GetName().."High"]:SetText(" ")
										self:SetMinMaxValues(0.1, 0.8)
										self:SetValueStep(0.1)
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.rangeFinder[XPerl_Options.optRange].FadeAmount)
										if (XPerlDB.rangeFinder.enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].enabled) then
											self:EnableSlider()
										else
											self:DisableSlider()
										end
									</OnShow>
									<OnValueChanged>
										XPerlDB.rangeFinder[XPerl_Options.optRange].FadeAmount = floor((value + 0.05) * 10) / 10
										_G[self:GetName().."Current"]:SetText(string.format("%d%%", XPerlDB.rangeFinder[XPerl_Options.optRange].FadeAmount * 100))
									</OnValueChanged>
								</Scripts>
							</Slider>

							<Button name="$parent_CustomSpell" inherits="ActionButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_FadeAmount" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="5" y="-15"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.ShowMe = function(self)
											local icon = _G[self:GetName().."Icon"]
											local label = _G[self:GetName().."Text"]

											local tex, name = XPerl_Options_GetRangeTexture(self)

											if (GameTooltip:IsOwned(self)) then
												XPerl_Options_DoRangeTooltip(self)
												GameTooltip:Show()
											end

											if (tex) then
												label:SetText(name)
												icon:SetTexture(tex)
												return
											else
												label:SetText(XPERL_CONF_CUSTOMSPELL)
											end
										end

										self.CheckReset = function(self)
											if (IsAltKeyDown()) then
												XPerlDB.rangeFinder[XPerl_Options.optRange].spell = nil
												XPerlDB.rangeFinder[XPerl_Options.optRange].item = nil
												XPerl_StartupSpellRange()
												self:ShowMe()
											end
										end

										if (GetCursorInfo) then
											self.ReceiveDrag = function(self)
												if (XPerlDB.rangeFinder.enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].enabled) then
													local type, detail, subdetail = GetCursorInfo()
													if (type) then
														local ret
														if (type == "spell") then
                                                            local spellName, subSpellName
                                                            if select(4, _G.GetBuildInfo()) >= 40000 then
                                                                spellName, subSpellName = GetSpellBookItemName(detail, subdetail)
                                                            else
                                                                spellName, subSpellName = GetSpellName(detail, subdetail)
                                                            end
															if (spellName and SpellHasRange(spellName) and not IsAttackSpell(spellName) and not IsPassiveSpell(spellName)) then
																XPerlDB.rangeFinder[XPerl_Options.optRange].spell = spellName
																XPerlDB.rangeFinder[XPerl_Options.optRange].item = nil
																ret = true
															end
														elseif (type == "item") then
															local itemName = GetItemInfo(detail)
															if (ItemHasRange(itemName)) then
																XPerlDB.rangeFinder[XPerl_Options.optRange].spell = nil
																XPerlDB.rangeFinder[XPerl_Options.optRange].item = itemName
																ret = true
															end
														end
														ClearCursor()
														self:ShowMe()
														return ret
													end
												end
											end
										end
									</OnLoad>
									<OnReceiveDrag>
										if (GetCursorInfo) then
											self:ReceiveDrag()
										end
									</OnReceiveDrag>
									<OnMouseUp>
										if (button == "LeftButton") then
											if (GetCursorInfo) then
												if (not self:ReceiveDrag()) then
													self:CheckReset()
												end

											else
												self:CheckReset()
											end
										end
									</OnMouseUp>
									<OnEnter>
										_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
										XPerl_Options_DoRangeTooltip(self)
									</OnEnter>
									<OnLeave>
										_G[self:GetName().."Text"]:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
										GameTooltip:Hide()
									</OnLeave>
									<OnShow>
										self:ShowMe()
										XPerl_Options_EnableCheck(self, XPerlDB.rangeFinder.enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].enabled and not XPerlDB.rangeFinder[XPerl_Options.optRange].interact)
									</OnShow>
								</Scripts>

								<Layers>
									<Layer level="ARTWORK">
										<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="LEFT">
											<Anchors>
												<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
													<Offset>
														<AbsDimension x="6" y="0"/>
													</Offset>
												</Anchor>
												<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
													<Offset>
														<AbsDimension x="130" y="0"/>
													</Offset>
												</Anchor>
											</Anchors>
											<Color r="1" g="1" b="1"/>
										</FontString>
									</Layer>
								</Layers>
							</Button>

							<CheckButton name="$parent_InteractNone" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="LEFT" relativeTo="$parent_OnlyInRaid" relativePoint="RIGHT">
										<Offset><AbsDimension x="15" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(false)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_INTERACTNONE")
									</OnLoad>
									<OnShow>
										local t = XPerl_Options_GetSibling("OnlyInRaid",self)
										local t2 = _G[t:GetName().."Text"]
										self:SetPoint("LEFT", t, "RIGHT", t2:GetStringWidth() + 15, 0)
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].interact == nil)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].interact = nil
										XPerl_Options_CheckRadio(self,{"InteractNone", "Interact10", "Interact30", "Interact40"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Interact10" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_InteractNone" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(false)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_INTERACT10")
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].interact == 3)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].interact = 3
										XPerl_Options_CheckRadio(self,{"InteractNone", "Interact10", "Interact30", "Interact40"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Interact30" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Interact10" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(false)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_INTERACT30")
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].interact == 1)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].interact = 1
										XPerl_Options_CheckRadio(self,{"InteractNone", "Interact10", "Interact30", "Interact40"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Interact40" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Interact30" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(false)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGE_INTERACT40")
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].interact == 5)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].interact = 5
										XPerl_Options_CheckRadio(self,{"InteractNone", "Interact10", "Interact30", "Interact40"})
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_CombineWithHealth" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPRIGHT">
										<Offset><AbsDimension x="-150" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGEHEALTH")
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].PlusHealth)
										XPerl_Options_EnableCheck(self, XPerlDB.rangeFinder.enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].enabled)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].PlusHealth = self:GetChecked()
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_RangeHealthAmount" inherits="XPerlSlider">
								<Size>
									<AbsDimension x="100" y="16"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_CombineWithHealth" relativePoint="BOTTOMRIGHT">
										<Offset>
											<AbsDimension x="-5" y="-6"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(10, 95)
										self:SetValueStep(5)
										XPerl_SliderSetup(self, true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGEHEALTH_LOWPOINT")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.rangeFinder[XPerl_Options.optRange].HealthLowPoint * 100)
										if (XPerlDB.rangeFinder.enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].PlusHealth) then
											self:EnableSlider()
										else
											self:DisableSlider()
										end
									</OnShow>
									<OnValueChanged>
										XPerlDB.rangeFinder[XPerl_Options.optRange].HealthLowPoint = value / 100
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>

							<CheckButton name="$parent_DebuffCheck" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPRIGHT" relativeTo="$parent_RangeHealthAmount" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="5" y="-13"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RANGEDEBUFF")
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.rangeFinder[XPerl_Options.optRange].PlusDebuff)
										XPerl_Options_EnableCheck(self, XPerlDB.rangeFinder.enabled and XPerlDB.rangeFinder[XPerl_Options.optRange].enabled)
									</OnShow>
									<OnClick>
										XPerlDB.rangeFinder[XPerl_Options.optRange].PlusDebuff = self:GetChecked()
										self:GetParent():Refresh()
									</OnClick>
								</Scripts>
							</CheckButton>
						</Frames>
					</Frame>

					<CheckButton name="$parent_BuffTooltips" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP">
								<Offset><AbsDimension x="-20" y="-6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPS")
								self.configBase = "XPerlDB.tooltip"
								self.configIndex = "enableBuffs"
								--self.Validate = function()
								--	XPerl_Options_EnableSibling(self,"NotInCombat", "or", "UnitTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipAlways", "or", "UnitTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipAlt", "or", "UnitTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipShift", "or", "UnitTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipCtrl", "or", "UnitTooltips")
								--end
							</OnLoad>
							<OnEnter>
								XPerl_Options_CheckButton_OnEnter(self)
								XPerl_Options_TooltipConfig.type = "buff"
								XPerl_Options_TooltipConfig:SetParent(self)
								XPerl_Options_TooltipConfig:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 0, 6)
								XPerl_Options_TooltipConfig:Hide()
								XPerl_Options_TooltipConfig:Show()
							</OnEnter>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_UnitTooltips" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffTooltips" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_UNITTOOLTIPS")
								self.configBase = "XPerlDB.tooltip"
								self.configIndex = "enable"
								--self.Validate = function()
								--	XPerl_Options_EnableSibling(self,"NotInCombat", "or", "BuffTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipAlways", "or", "BuffTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipAlt", "or", "BuffTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipShift", "or", "BuffTooltips")
								--	XPerl_Options_EnableSibling(self,"TooltipCtrl", "or", "BuffTooltips")
								--end
							</OnLoad>
							<OnEnter>
								XPerl_Options_CheckButton_OnEnter(self)
								XPerl_Options_TooltipConfig.type = "unit"
								XPerl_Options_TooltipConfig:SetParent(self)
								XPerl_Options_TooltipConfig:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 0, 6)
								XPerl_Options_TooltipConfig:Hide()
								XPerl_Options_TooltipConfig:Show()
							</OnEnter>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_FadingTooltips" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_UnitTooltips" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FADINGTOOLTIP")
								self.configBase = "XPerlDB.tooltip"
								self.configIndex = "fading"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Fullscreen" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_FadingTooltips" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_FULLSCREEN")
								self.configBase = "XPerlDB.player.fullScreen"
								self.configIndex = "enable"
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"FullscreenWarn")
									XPerl_Options_EnableSibling(self,"FullscreenOK")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_FullscreenWarn" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="80" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Fullscreen" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="30" y="-2"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(1, 75)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_FULLSCREENWARN")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.player.fullScreen.lowHP)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.player.fullScreen.lowHP ~= value) then
									XPerlDB.player.fullScreen.lowHP = floor(value + 0.5)
									XPerl_Options_Global_Options_FullscreenOK:SetMinMaxValues(XPerlDB.player.fullScreen.lowHP, 100)
									XPerl_Options_Global_Options_FullscreenOKLow:SetText(XPerlDB.player.fullScreen.lowHP)
								end
								_G[self:GetName().."Current"]:SetText(XPerlDB.player.fullScreen.lowHP)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_FullscreenOK" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="80" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_FullscreenWarn" relativePoint="TOPRIGHT">
								<Offset>
									<AbsDimension x="8" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_FULLSCREENOK")
							</OnLoad>
							<OnShow>
								self:SetMinMaxValues((XPerlDB and XPerlDB.player.fullScreen.lowHP) or 0, 100)
								self:SetValue(XPerlDB.player.fullScreen.highHP)
							</OnShow>
							<OnValueChanged>
								XPerlDB.player.fullScreen.highHP = floor(value + 0.5)
								_G[self:GetName().."Current"]:SetText(XPerlDB.player.fullScreen.highHP)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_XPerlTooltips" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="-150" y="-6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_XPERL_TOOLTIP_INFO")
								self.configBase = "XPerlDB.tooltip"
								self.configIndex = "xperlInfo"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Minimap" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_XPerlTooltips" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MINIMAP_ICON")
								self.flashFrame = XPerl_MinimapButton_Frame
								self.configBase = "XPerlDB.minimap"
								self.configIndex = "enable"
								self.configClick = function()
											if (XPerlDB.minimap.enable) then
												XPerl_MinimapButton_Frame:Show()
											else
												XPerl_MinimapButton_Frame:Hide()
											end
										end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ShowAFK" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Minimap" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_SHOWAFKFLAG")
								self.configBase = "XPerlDB"
								self.configIndex = "showAFK"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ShowFD" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ShowAFK" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_SHOWFD")
								self.configBase = "XPerlDB"
								self.configIndex = "showFD"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ShowReadyCheck" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ShowFD" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_SHOWREADYCHECK")
								self.configBase = "XPerlDB"
								self.configIndex = "showReadyCheck"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>
					
                                        -- added by playerlin 20100820
                                        <CheckButton name="$parent_XPerlOldRoleIcons" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ShowReadyCheck" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-84" y="-6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_XPERLOLDROLEICONS")
								self.configBase = "XPerlDB"
								self.configIndex = "xperlOldroleicons"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>
                                        
					<CheckButton name="$parent_SettingsMethod" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="-200" y="215"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_SAVEPERCHARACTER")
							</OnLoad>
							<OnClick>
								XPerlConfigSavePerCharacter = self:GetChecked()
								XPerl_SetMyGlobal()
								XPerl_Options_DropDown_LoadSettings:Hide()
								XPerl_Options_DropDown_LoadSettings:Show()
							</OnClick>
							<OnShow>
								self: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_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RESET_DEFAULTS")
							</OnLoad>
							<OnClick>
								XPerl_Options_Mask:Show()
								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="-18" />
								</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_RegisterProtected(_G[self:GetName().."Button"])
								XPerl_Options_LoadSettings_OnLoad(self)
							</OnLoad>
							<OnShow>
								XPerl_Options_LoadSettings_OnLoad(self)
								if (not XPerlConfigSavePerCharacter) then
									self:Hide()
								end
							</OnShow>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -15, 0)
								GameTooltip:SetText(XPERL_CONF_LOAD_SETTINGS_DESC, nil, nil, nil, nil, 1)
								_G[self:GetName().."Label"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
							</OnEnter>
							<OnLeave>
								_G[self:GetName().."Label"]:SetTextColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
								GameTooltip:Hide()
							</OnLeave>
						</Scripts>
					</Frame>

					<Button name="$parent_ResetTutorial" inherits="XPerlButtonTemplate">
						<Size>
							<AbsDimension x="110" y="24"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent_SettingsMethod" relativePoint="TOPLEFT">
								<Offset>
									<AbsDimension x="0" y="0" />
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RESET_TUTORIAL")
							</OnLoad>
							<OnClick>
								XPerlDB.tutorialFlags = nil
							</OnClick>
						</Scripts>
					</Button>

					<CheckButton name="$parent_EnableTutorial" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent_ResetTutorial" relativePoint="TOPLEFT">
								<Offset><AbsDimension x="0" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_SHOW_TUTORIAL")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.showTutorials)
							</OnShow>
							<OnClick>
								XPerlDB.showTutorials = self:GetChecked() ~= nil
							</OnClick>
						</Scripts>
					</CheckButton>
				</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>

				<Scripts>
					<OnLoad>
						self:SetScale(0.95)
					</OnLoad>
					<OnShow>
						if (not IsAddOnLoaded("XPerl_ArcaneBar")) then
							local n = self:GetName().."_"
							_G[n.."OldCastBar"]:Disable()
							_G[n.."CastTime"]:Disable()
							_G[n.."ArcaneBar"]:Disable()
						end
					</OnShow>
				</Scripts>

				<Frames>
					<CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="6" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PORTRAIT")
								self.flashFrame = XPerl_PlayerportraitFrame
								self.configBase = "XPerlDB.player"
								self.configIndex = "portrait"
								self.configClick = XPerl_Player_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"Portrait3D")
									XPerl_Options_EnableSibling(self,"Extend")
									XPerl_Options_EnableSibling(self,"HitIndicator")
								end
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PLAYER_PORTRAIT3D")
								self.flashFrame = XPerl_PlayerportraitFrame
								self.configBase = "XPerlDB.player"
								self.configIndex = "portrait3D"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Extend" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_EXTENDPORTRAIT")
								self.flashFrame = XPerl_PlayerportraitFrame
								self.configBase = "XPerlDB.player"
								self.configIndex = "extendPortrait"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HitIndicator" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Extend" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_HIT_INDICATOR")
								self.configBase = "XPerlDB.player"
								self.configIndex = "hitIndicator"
							</OnLoad>
						</Scripts>
					</CheckButton>
					
					<CheckButton name="$parent_ShowRunes" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_HitIndicator" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								if (select(2, UnitClass("player")) ~= "DEATHKNIGHT") then
									self:Hide()
								end

								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_SHOW_RUNES")
								self.configBase = "XPerlDB.player"
								self.configIndex = "showRunes"
								self.configClick = XPerl_Player_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"DockRunes")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>
					
					<CheckButton name="$parent_DockRunes" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ShowRunes" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>  
								if (select(2, UnitClass("player")) ~= "DEATHKNIGHT") then
									self:Hide()
								end

								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_DOCKRUNES")
								self.configBase = "XPerlDB.player"
								self.configIndex = "dockRunes"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ArcaneBar" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ShowRunes" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								if (select(2, UnitClass("player")) ~= "DEATHKNIGHT") then
									self:ClearAllPoints()
									self:SetPoint("TOPLEFT", XPerl_Options_Player_Options_ShowRunes, "TOPLEFT")
								end

								XPerl_OptionsSetMyText(self, "XPERL_CONF_ARCANE_BAR")
								self.configBase = "XPerlDB.player.castBar"
								self.configIndex = "enable"
								self.configClick = XPerl_ArcaneBar_Set
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"CastTime")
									XPerl_Options_EnableSibling(self,"PreCast")
									XPerl_Options_EnableSibling(self,"CastTimeInside", "CastTime")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PreCast" 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(self, "XPERL_CONF_ARCANE_PRECAST")
								self.configBase = "XPerlDB.player.castBar"
								self.configIndex = "precast"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_CastTime" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PreCast" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_CAST_TIME")
								self.configBase = "XPerlDB.player.castBar"
								self.configIndex = "castTime"
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"CastTimeInside")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_CastTimeInside" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="22" y="22"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_CastTime" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_CAST_TIME_INSIDE")
								self.configBase = "XPerlDB.player.castBar"
								self.configIndex = "inside"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OldCastBar" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_CastTimeInside" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ORIGINAL_CASTBAR")
								self.configBase = "XPerlDB.player.castBar"
								self.configIndex = "original"
								self.configClick = XPerl_ArcaneBar_Set
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PlayerLevel" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_OldCastBar" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_LEVEL")
								self.flashFrame = XPerl_PlayerlevelFrame
								self.configBase = "XPerlDB.player"
								self.configIndex = "level"
								self.configClick = XPerl_Player_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PlayerClassIcon" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PlayerLevel" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_ICON")
								self.flashFrame = XPerl_PlayerclassFrame
								self.configBase = "XPerlDB.player"
								self.configIndex = "classIcon"
								self.configClick = XPerl_Player_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PlayerXP" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PlayerLevel" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_XP")
								self.flashFrame = XPerl_PlayerstatsFramexpBar
								self.configBase = "XPerlDB.player"
								self.configIndex = "xpBar"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_XPDeficit" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PlayerXP" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_XPDEFICIT")
								self.flashFrame = XPerl_PlayerstatsFramexpBar
								self.configBase = "XPerlDB.player"
								self.configIndex = "xpDeficit"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PlayerRep" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_XPDeficit" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_REP")
								self.flashFrame = XPerl_PlayerstatsFramerepBar
								self.configBase = "XPerlDB.player"
								self.configIndex = "repBar"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PlayerRep" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PVPICON")
								self.flashFrame = XPerl_PlayernameFramepvpIcon
								self.configBase = "XPerlDB.player"
								self.configIndex = "pvpIcon"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PVPIcon" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_VALUES")
								self.flashFrame = {XPerl_PlayerstatsFramehealthBartext, XPerl_PlayerstatsFramemanaBartext, XPerl_PlayerstatsFramexpBartext}
								self.configBase = "XPerlDB.player"
								self.configIndex = "values"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PERCENT")
								self.flashFrame = {XPerl_PlayerstatsFramehealthBarpercent, XPerl_PlayerstatsFramemanaBarpercent, XPerl_PlayerstatsFramexpBarpercent}
								self.configBase = "XPerlDB.player"
								self.configIndex = "percent"
								self.configClick = XPerl_Player_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PLAYER_ENERGY")
								self.flashFrame = XPerl_PlayerstatsFrameenergyTicker
								self.configBase = "XPerlDB.player"
								self.configIndex = "energyTicker"
								self.configClick = function()
									XPerl_Player_SetWidth(XPerl_Player)
								end
							</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(self, "XPERL_CONF_RAID_PARTY_NUM")
								self.flashFrame = XPerl_PlayergroupFrame
								self.configBase = "XPerlDB.player"
								self.configIndex = "partyNumber"
								self.configClick = function() XPerl_Player_UpdateLeader(XPerl_Player) end
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"WithName")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_WithName" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_Number" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_PARTYWITHNAME")
								self.configBase = "XPerlDB.player"
								self.configIndex = "withName"
								self.configClick = function() XPerl_Player_UpdateLeader(XPerl_Player) end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_WithName" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-16" y="5"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.getEnable = function() return XPerlDB.player.healerMode.enable end
								self.setEnable = function(n)
											XPerlDB.player.healerMode.enable = n
											XPerl_Player_Reset()
										end
								self.getType = function() return XPerlDB.player.healerMode.type end
								self.setType = function(n)
											XPerlDB.player.healerMode.type = n
											XPerl_Player_Reset()
										end
							</OnLoad>
						</Scripts>
					</Frame>

					<Slider name="$parent_Width" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="5" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_WIDTHBONUS")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.player.size.width or 0)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.player.size.width ~= value) then
									XPerlDB.player.size.width = value
									XPerl_Player_SetWidth(XPerl_Player)
								end
								_G[self:GetName().."Current"]:SetText(XPerlDB.player.size.width)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Frame name="$parent_Buffs">
						<Scripts>
							<OnShow>
								if (not IsAddOnLoaded("XPerl_PlayerBuffs")) then
									self:Hide()
								end
							</OnShow>
						</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="-15"/></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_PLAYERBUFF_OPTIONS">
										<Color r="1" g="1" b="1" a="1" />
											<Anchors>
												<Anchor point="LEFT" />
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Button>

							<CheckButton name="$parent_PlayerBuffs" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
										<Offset><AbsDimension x="0" y="-3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFFS")
										self.flashFrame = XPerl_PlayerbuffFrame
										self.configBase = "XPerlDB.player.buffs"
										self.configIndex = "enable"
										self.configClick = function()
											if (XPerl_Player_BuffSetup) then
												XPerl_Player_BuffSetup(XPerl_Player)
											end
											BuffFrame_Update()
										end
										self.Validate = function()
											XPerl_Options_EnableSibling(self,"PlayerDebuffs")
											XPerl_Options_EnableSibling(self,"PlayerBuffsAbove")
											XPerl_Options_EnableSibling(self,"HideBlizzardBuffBar")
											XPerl_Options_EnableSibling(self,"FlashExpiring")
											XPerl_Options_EnableSibling(self,"Cooldowns")
											XPerl_Options_EnableSibling(self,"MaxBuffs")
											XPerl_Options_EnableSibling(self,"BuffSize")
											XPerl_Options_EnableSibling(self,"DebuffSize")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_PlayerDebuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOP" relativeTo="$parent_PlayerBuffs" relativePoint="BOTTOMRIGHT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_DEBUFFS")
										self.flashFrame = XPerl_PlayerbuffFrame
										self.configBase = "XPerlDB.player.debuffs"
										self.configIndex = "enable"
										self.configClick = function()
											if (XPerl_Player_BuffSetup) then
												XPerl_Player_BuffSetup(XPerl_Player)
											end
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_PlayerBuffsAbove" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOP" relativeTo="$parent_PlayerDebuffs" relativePoint="BOTTOMRIGHT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFFSABOVE")
										self.flashFrame = XPerl_PlayerbuffFrame
										self.configBase = "XPerlDB.player.buffs"
										self.configIndex = "above"
										self.configClick = function() if (XPerl_Player_BuffSetup) then XPerl_Player_BuffSetup(XPerl_Player) end end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_HideBlizzardBuffBar" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_PlayerBuffsAbove" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFFSHIDEBLIZZ")
										self.flashFrame = XPerl_PlayerbuffFrame
										self.configBase = "XPerlDB.player.buffs"
										self.configIndex = "hideBlizzard"
										self.configClick =
											function()
												if (XPerl_Player_BuffSetup) then
													XPerl_Player_BuffSetup(XPerl_Player)
												end
												BuffFrame_Update()
											end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_FlashExpiring" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_HideBlizzardBuffBar" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFFSFLASHEXPIRE")
										self.flashFrame = XPerl_PlayerbuffFrame
										self.configBase = "XPerlDB.player.buffs"
										self.configIndex = "flash"
										self.configClick = function() if (XPerl_Player_BuffSetup) then XPerl_Player_BuffSetup(XPerl_Player) end end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Cooldowns" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_FlashExpiring" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFFSCOOLDOWNS")
										self.flashFrame = XPerl_PlayerbuffFrame
										self.configBase = "XPerlDB.player.buffs"
										self.configIndex = "cooldown"
										self.configClick = function() if (XPerl_Player_BuffSetup) then XPerl_Player_BuffSetup(XPerl_Player) end end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_MaxBuffs" inherits="XPerlSlider">
								<Size><AbsDimension x="110" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Cooldowns" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="6" y="-10"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(4, 40)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_MAXBUFFS")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.player.buffs.count)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.player.buffs.count ~= value) then
											XPerlDB.player.buffs.count = value
											if (XPerl_Player_BuffSetup) then
												XPerl_Player_BuffSetup(XPerl_Player)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>

							<Slider name="$parent_BuffSize" inherits="XPerlSlider">
								<Size><AbsDimension x="110" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_MaxBuffs">
										<Offset><AbsDimension x="0" y="-18" /></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(7, 38)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFFSIZE")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.player.buffs.size)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.player.buffs.size ~= value) then
											XPerlDB.player.buffs.size = value
											if (XPerl_Player_BuffSetup) then
												XPerl_Player_BuffSetup(XPerl_Player)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>

							<Slider name="$parent_DebuffSize" inherits="XPerlSlider">
								<Size><AbsDimension x="110" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="10" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(7, 45)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_DEBUFFSIZE")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.player.debuffs.size or XPerlDB.player.buffs.size)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.player.debuffs.size ~= value) then
											XPerlDB.player.debuffs.size = value
											if (XPerl_Player_BuffSetup) then
												XPerl_Player_BuffSetup(XPerl_Player)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>

							<CheckButton name="$parent_BuffWrap" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="-3" y="-8"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_WRAPBUFFS")
										self.flashFrame = {XPerl_PlayerbuffFrame, XPerl_PlayerdebuffFrame}
										self.configBase = "XPerlDB.player.buffs"
										self.configIndex = "wrap"
										self.configClick = XPerl_Player_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self,"MaxRows")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_MaxRows" inherits="XPerlSlider">
								<Size>
									<AbsDimension x="120" y="16"/>
								</Size>
								<Anchors>
									<Anchor point="LEFT" relativeTo="$parent_BuffWrap" relativePoint="RIGHT">
										<Offset><AbsDimension x="80" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetScale(0.8)
										self:SetMinMaxValues(1, 10)
										self:SetValueStep(1)

										local t = XPerl_Options_GetSibling("BuffWrap",self)
										local t2 = _G[t:GetName().."Text"]
										self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_BUFF_ROWS")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.player.buffs.rows or 2)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.player.buffs.rows ~= value) then
											XPerlDB.player.buffs.rows = value
											XPerl_Player_Reset()
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
						</Frames>
					</Frame>
					
					<Frame name="$parent_Totems">
						<Scripts>
							<OnLoad>
								if (select(2, UnitClass("player")) ~= "SHAMAN") then
									self:Hide()
								end
							</OnLoad>
						</Scripts>
						<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
							<EdgeSize>
								<AbsValue val="6"/>
							</EdgeSize>
						</Backdrop>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Buffs">
								<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>
						<Layers>
							<Layer level="ARTWORK">
								<FontString inherits="GameFontNormalSmall" text="XPERL_CONF_PLAYER_TOTEMS">
								<Color r="1" g="1" b="1" a="1" />
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset><AbsDimension x="5" y="-5"/></Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<CheckButton name="$parent_Enable" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset><AbsDimension x="5" y="-20"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_TOTEMS_ENABLE")
										self.configBase = "XPerlDB.player.totems"
										self.configIndex = "enable"
										self.configClick = function() TotemFrame_Update() end
									</OnLoad>
								</Scripts>
							</CheckButton>
							<Slider name="$parent_OffsetX" inherits="XPerlSlider">
								<Size><AbsDimension x="140" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Enable" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="5" y="-15"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_Options_RegisterProtected(self)
										self:SetMinMaxValues(-1100, 1100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_TOTEM_OFFSETX")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.player.totems and XPerlDB.player.totems.offsetX or 0)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.player.totems) then
											if (XPerlDB.player.totems.offsetX ~= value) then
												XPerlDB.player.totems.offsetX = value
												XPerl_Player_SetTotems(XPerl_Player)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
							<Slider name="$parent_OffsetY" inherits="XPerlSlider">
								<Size><AbsDimension x="140" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_OffsetX" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-20"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_Options_RegisterProtected(self)
										self:SetMinMaxValues(-800, 800)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_TOTEM_OFFSETY")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.player.totems and XPerlDB.player.totems.offsetY or 0)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.player.totems) then
											if (XPerlDB.player.totems.offsetY ~= value) then
												XPerlDB.player.totems.offsetY = value
												XPerl_Player_SetTotems(XPerl_Player)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
						</Frames>
					</Frame>
				</Frames>
			</Frame>

			-- Pet Options
			<Frame name="$parent_Pet_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_PetName" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="6" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_NAME")
								self.flashFrame = XPerl_Player_PetnameFrame
								self.configBase = "XPerlDB.pet"
								self.configIndex = "name"
								self.configClick = XPerl_Player_Pet_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PLAYER_PET_PORTRAIT")
								self.flashFrame = XPerl_Player_PetportraitFrame
								self.configBase = "XPerlDB.pet"
								self.configIndex = "portrait"
								self.configClick = XPerl_Player_Pet_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"Portrait3D")
									XPerl_Options_EnableSibling(self,"Extend")
									XPerl_Options_EnableSibling(self,"HitIndicator")
								end
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PLAYER_PET_PORTRAIT3D")
								self.flashFrame = XPerl_Player_PetportraitFrame
								self.configBase = "XPerlDB.pet"
								self.configIndex = "portrait3D"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Extend" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_EXTENDPORTRAIT")
								self.flashFrame = XPerl_PlayerportraitFrame
								self.configBase = "XPerlDB.pet"
								self.configIndex = "extendPortrait"
								self.configClick = XPerl_Player_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HitIndicator" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Extend" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_HIT_INDICATOR")
								self.configBase = "XPerlDB.pet"
								self.configIndex = "hitIndicator"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Threat" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_HitIndicator" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_THREAT")
								self.configBase = "XPerlDB.pet"
								self.configIndex = "threat"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatName" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Threat" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_THREAT_NAME")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.pet.threatMode == "nameFrame")
							</OnShow>
							<OnClick>
								XPerlDB.pet.threatMode = "nameFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Target_UpdateDisplay(XPerl_Target)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatPortrait" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_ThreatName" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_THREAT_PORTRAIT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.pet.threatMode == "portraitFrame")
							</OnShow>
							<OnClick>
								XPerlDB.pet.threatMode = "portraitFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Target_UpdateDisplay(XPerl_Target)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ArcaneBar" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Threat" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_CASTBAR")
								self.configBase = "XPerlDB.pet.castBar"
								self.configIndex = "enable"
								self.configClick = XPerl_ArcaneBar_Set
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Happiness" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ArcaneBar" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_HAPPINESS")
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"OnlySad")
									XPerl_Options_EnableSibling(self,"FlashSad")
								end
								self.flashFrame = XPerl_Player_PethappyFrame
								self.configBase = "XPerlDB.pet.happiness"
								self.configIndex = "enable"
								self.configClick = XPerl_Player_Pet_Reset
							</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(self, "XPERL_CONF_PLAYER_PET_ONLYSAD")
								self.flashFrame = XPerl_Player_PethappyFrame
								self.configBase = "XPerlDB.pet.happiness"
								self.configIndex = "onlyWhenSad"
								self.configClick = XPerl_Player_Pet_Reset
							</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(self, "XPERL_CONF_PLAYER_PET_FLASHSAD")
								self.flashFrame = XPerl_Player_PethappyFrame
								self.configBase = "XPerlDB.pet.happiness"
								self.configIndex = "flashWhenSad"
								self.configClick = XPerl_Player_Pet_Reset
							</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(self, "XPERL_CONF_PLAYER_PET_LEVEL")
								self.flashFrame = XPerl_Player_PetlevelFrame
								self.configBase = "XPerlDB.pet"
								self.configIndex = "level"
								self.configClick = XPerl_Player_Pet_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PLAYER_PET_XP")
								self.configBase = "XPerlDB.pet"
								self.configIndex = "xpBar"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</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(self, "XPERL_CONF_PLAYER_PET_VALUES")
								self.configBase = "XPerlDB.pet"
								self.configIndex = "values"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</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="0" y="-8" />
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.configBase = "XPerlDB.pet"
								self.configIndex = "scale"
								self.configClick = XPerl_Player_Pet_Reset
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_SCALE")
								XPerl_Options_RegisterScalingSlider(self)
							</OnLoad>
						</Scripts>
					</Slider>

					<Slider name="$parent_Width" 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>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_WIDTHBONUS")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.pet.size.width or 0)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.pet.size.width ~= value) then
									XPerlDB.pet.size.width = value
									XPerl_Player_Pet_SetWidth(XPerl_Player_Pet)
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Frame name="$parent_PetTarget">
						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
							</OnLoad>
							<OnShow>
								if (not IsAddOnLoaded("XPerl_TargetTarget")) then
									self:Hide()
								end
							</OnShow>
						</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="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_PETTARGET_OPTIONS">
										<Color r="1" g="1" b="1" a="1" />
											<Anchors>
												<Anchor point="LEFT" />
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Button>

							<CheckButton name="$parent_PetsTarget" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Title">
										<Offset><AbsDimension x="0" y="-3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_TARGET")
										self.Validate = function()
											XPerl_Options_EnableSibling(self,"Buffs")
											XPerl_Options_EnableSibling(self,"BigBuffs", "Buffs")
											XPerl_Options_EnableSibling(self,"BigDebuffs", "Buffs")
											XPerl_Options_EnableSibling(self,"BigPet", "Buffs", "BigBuffs")
											XPerl_Options_EnableSibling(self,"Above", "Buffs")
											XPerl_Options_EnableSibling(self,"Level")
											XPerl_Options_EnableSibling(self,"Values")
											XPerl_Options_EnableSibling(self,"Percent")
											XPerl_Options_EnableSibling(self,"Mana")
											XPerl_Options_EnableSibling(self,"ScalePT")
											XPerl_Options_EnableSibling(self,"Width")
											XPerl_Options_EnableSibling(self,"Healer_Healer")
											XPerl_Options_EnableSibling(self,"Healer_DeficitOnly", "Healer_Healer")
											XPerl_Options_EnableSibling(self,"Healer_DeficitMax", "Healer_Healer")
											XPerl_Options_EnableSibling(self,"Healer_CurMaxDeficit", "Healer_Healer")
										end
										self.flashFrame = XPerl_TargetTarget
										self.configClick = XPerl_TargetTarget_Set_Bits
										self.configBase = "XPerlDB.pettarget"
										self.configIndex = "enable"

										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOP" relativeTo="$parent_PetsTarget" relativePoint="BOTTOMRIGHT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_BUFFS")
										self.flashFrame = XPerl_PetTargetbuffFrame
										self.configBase = "XPerlDB.pettarget.buffs"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Set_Bits
										self.Validate = function()
											XPerl_Options_EnableSibling(self,"BigBuffs")
											XPerl_Options_EnableSibling(self,"BigDebuffs")
											XPerl_Options_EnableSibling(self,"Above")
										end
									</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(self, "XPERL_CONF_PETTARGET_BUFFSABOVE")
										self.flashFrame = XPerl_PetTargetbuffFrame
										self.configBase = "XPerlDB.pettarget.buffs"
										self.configIndex = "above"
										self.configClick = XPerl_TargetTarget_Set_Bits
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_BIGBUFFS")
										self.flashFrame = XPerl_PetTargetbuffFrame
										self.configBase = "XPerlDB.pettarget.buffs"
										self.configIndex = "big"
										self.configClick = XPerl_TargetTarget_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self,"BigPet")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigDebuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="80" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_BIGDEBUFFS")
										self.flashFrame = {XPerl_PetTargetbuffFrame, XPerl_PetTargetdebuffFrame}
										self.configBase = "XPerlDB.pettarget.debuffs"
										self.configIndex = "big"
										self.configClick = XPerl_TargetTarget_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_BIGPETBUFFS")
										self.flashFrame = {XPerl_PetTargetbuffFrame, XPerl_PetTargetdebuffFrame}
										self.configBase = "XPerlDB.pettarget.buffs"
										self.configIndex = "bigpet"
										self.configClick = XPerl_TargetTarget_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPRIGHT" relativeTo="$parent_BigPet" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_LEVEL")
										self.flashFrame = XPerl_PetTargetlevelFrame
										self.configBase = "XPerlDB.pettarget"
										self.configIndex = "level"
										self.configClick = XPerl_TargetTarget_Set_Bits
										XPerl_Options_RegisterProtected(self)
									</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(self, "XPERL_CONF_PETTARGET_MANA")
										self.flashFrame = {XPerl_PetTargetstatsFramemanaBar, XPerl_PetTargetTargetstatsFramemanaBar}
										self.configBase = "XPerlDB.pettarget"
										self.configIndex = "mana"
										self.configClick = XPerl_TargetTarget_Set_Bits
									</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(self, "XPERL_CONF_PETTARGET_VALUES")
										self.flashFrame = {XPerl_PetTargetstatsFramehealthBartext, XPerl_PetTargetstatsFramemanaBartext}
										self.configBase = "XPerlDB.pettarget"
										self.configIndex = "values"
										self.configClick = XPerl_TargetTarget_Set_Bits
									</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(self, "XPERL_CONF_PETTARGET_PERCENT")
										self.flashFrame = {XPerl_PetTargetstatsFramehealthBarpercent, XPerl_PetTargetstatsFramemanaBarpercent}
										self.configBase = "XPerlDB.pettarget"
										self.configIndex = "percent"
										self.configClick = XPerl_TargetTarget_Set_Bits
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_ScalePT" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-10"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.configBase = "XPerlDB.pettarget"
										self.configIndex = "scale"
										self.configClick = function() XPerl_TargetTarget_SetWidth(XPerl_PetTarget) end
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_SCALE")
										XPerl_Options_RegisterScalingSlider(self, 40)
									</OnLoad>
								</Scripts>
							</Slider>

							<Slider name="$parent_Width" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ScalePT" relativePoint="TOPRIGHT">
										<Offset>
											<AbsDimension x="10" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(0, 100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PETTARGET_WIDTHBONUS")
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.pettarget.size.width or 0)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.pettarget.size.width ~= value) then
											XPerlDB.pettarget.size.width = value
											if (XPerl_PetTarget) then
												XPerl_TargetTarget_SetWidth(XPerl_PetTarget)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
							<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ScalePT" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-10"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.getEnable = function() return XPerlDB.pettarget.healerMode.enable end
										self.setEnable = function(n)
													XPerlDB.pettarget.healerMode.enable = n
													XPerl_TargetTarget_Reset()
												end
										self.getType = function() return XPerlDB.pettarget.healerMode.type end
										self.setType = function(n)
													XPerlDB.pettarget.healerMode.type = n
													XPerl_TargetTarget_Reset()
												end
									</OnLoad>
								</Scripts>
							</Frame>
						</Frames>
					</Frame>

					<CheckButton name="$parent_BuffsEnable" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PetTarget" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_BUFFS")
								self.configBase = "XPerlDB.pet.buffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Player_Pet_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self,"Castable")
									XPerl_Options_EnableSibling(self,"BuffSize")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Castable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativePoint="BOTTOMRIGHT" relativeTo="$parent_BuffsEnable">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_CASTABLE")
								self.configBase = "XPerlDB.pet.buffs"
								self.configIndex = "castable"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_DebuffsEnable" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_Castable" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_DEBUFFS")
								self.configBase = "XPerlDB.pet.debuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Player_Pet_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Curable")
									XPerl_Options_EnableSibling(self, "DebuffSize")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Curable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativePoint="BOTTOMRIGHT" relativeTo="$parent_DebuffsEnable">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_CURABLE")
								self.configBase = "XPerlDB.pet.debuffs"
								self.configIndex = "curable"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Above" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativePoint="BOTTOM" relativeTo="$parent_Curable">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_ABOVE")
								self.configBase = "XPerlDB.pet.buffs"
								self.configIndex = "above"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="7"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_BIGBUFFS")
								self.flashFrame = {XPerl_Player_PetbuffFrame, XPerl_Player_PetdebuffFrame}
								self.configBase = "XPerlDB.pet.buffs"
								self.configIndex = "big"
								self.configClick = XPerl_Player_Pet_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "BigPet")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigDebuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="80" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_BIGDEBUFFS")
								self.flashFrame = {XPerl_Player_PetbuffFrame, XPerl_Player_PetdebuffFrame}
								self.configBase = "XPerlDB.pet.debuffs"
								self.configIndex = "big"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="7"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_BIGPETBUFFS")
								self.flashFrame = {XPerl_Player_PetbuffFrame, XPerl_Player_PetdebuffFrame}
								self.configBase = "XPerlDB.pet.buffs"
								self.configIndex = "bigpet"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffWrap" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_BigPet" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="7"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_WRAPBUFFS")
								self.flashFrame = {XPerl_Player_PetbuffFrame, XPerl_Player_PetdebuffFrame}
								self.configBase = "XPerlDB.pet.buffs"
								self.configIndex = "wrap"
								self.configClick = XPerl_Player_Pet_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_MaxRows" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_BuffWrap" relativePoint="RIGHT">
								<Offset><AbsDimension x="80" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(1, 10)
								self:SetValueStep(1)

								local t = XPerl_Options_GetSibling("BuffWrap",self)
								local t2 = _G[t:GetName().."Text"]
								self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_BUFF_ROWS")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.target.buffs.rows or 2)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.target.buffs.rows ~= value) then
									XPerlDB.target.buffs.rows = value
									XPerlDB.targettarget.buffs.rows = value
									XPerlDB.targettargettarget.buffs.rows = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_BuffSize" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_BuffWrap">
								<Offset><AbsDimension x="0" y="-6" /></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 38)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_BUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.pet.buffs.size or 20)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.pet.buffs.size ~= value) then
									XPerlDB.pet.buffs.size = value
									XPerl_Player_Pet_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_DebuffSize" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="10" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 38)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PLAYER_PET_DEBUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.pet.debuffs.size or 20)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.pet.debuffs.size ~= value) then
									XPerlDB.pet.debuffs.size = value
									XPerl_Player_Pet_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>
				</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>

				<Scripts>
					<OnLoad>
						self:SetScale(0.92)
					</OnLoad>
					<OnShow>
						if (not IsAddOnLoaded("XPerl_ArcaneBar")) then
							local n = self:GetName().."_"
							_G[n.."ArcaneBar"]:Disable()
						end
					</OnShow>
				</Scripts>

				<Frames>
					<CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="6" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_PORTRAIT")
								self.flashFrame = XPerl_TargetportraitFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "portrait"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Portrait3D")
									XPerl_Options_EnableSibling(self, "HitIndicator")
									XPerl_Options_EnableSibling(self, "OnlyMine", "HitIndicator")
								end
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_TARGET_PORTRAIT3D")
								self.flashFrame = XPerl_TargetportraitFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "portrait3D"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HitIndicator" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_HIT_INDICATOR")
								self.configBase = "XPerlDB.target"
								self.configIndex = "hitIndicator"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "OnlyMine")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMine" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="24" y="24"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_HitIndicator" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_HIT_ONLYMINE")
								self.configBase = "XPerlDB.target"
								self.configIndex = "ownDamageOnly"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Defer" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Portrait" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="120" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEFER")
								self.configBase = "XPerlDB.target"
								self.configIndex = "defer"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_TargetSounds" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Defer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_SOUNDS")
								self.configBase = "XPerlDB.target"
								self.configIndex = "sound"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Threat" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_OnlyMine" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_THREAT")
								self.configBase = "XPerlDB.target"
								self.configIndex = "threat"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatName" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Threat" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_THREAT_NAME")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.threatMode == "nameFrame")
							</OnShow>
							<OnClick>
								XPerlDB.target.threatMode = "nameFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Target_UpdateDisplay(XPerl_Target)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatPortrait" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_ThreatName" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_THREAT_PORTRAIT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.threatMode == "portraitFrame")
							</OnShow>
							<OnClick>
								XPerlDB.target.threatMode = "portraitFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Target_UpdateDisplay(XPerl_Target)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ArcaneBar" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Threat" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_ARCANE_BAR")
								self.configBase = "XPerlDB.target.castBar"
								self.configIndex = "enable"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Mana" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ArcaneBar" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="120" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_MANA")
								self.flashFrame = XPerl_TargetstatsFramemanaBar
								self.configBase = "XPerlDB.target"
								self.configIndex = "mana"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Reaction" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ArcaneBar" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_REACTION")
								self.flashFrame = XPerl_TargetnameFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "reactionHighlight"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_TARGET_ICON")
								self.flashFrame = XPerl_TargettypeFramePlayerclassTexture
								self.configBase = "XPerlDB.target"
								self.configIndex = "classIcon"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "ClassText")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ClassText" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent_ClassIcon" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CLASSTEXT")
								self.flashFrame = XPerl_TargetbossFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "classText"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_TARGET_MOBTYPE")
								self.flashFrame = XPerl_TargetcreatureTypeFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "mobType"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_TARGET_LEVEL")
								self.flashFrame = XPerl_TargetlevelFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "level"
								self.configClick = XPerl_Target_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Elite" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Level" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_ELITE")
							</OnLoad>
							<OnShow>
								self:SetChecked(not XPerlDB.target.eliteGfx)
							</OnShow>
							<OnClick>
								XPerlDB.target.elite = true
								XPerlDB.target.eliteGfx = nil
								XPerl_Options_CheckRadio(self,{"Elite", "EliteGfx"})
								XPerl_Target_UpdateDisplay(XPerl_Target)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_EliteGfx" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Elite" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="65" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_ELITEGFX")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.eliteGfx)
							</OnShow>
							<OnClick>
								XPerlDB.target.elite = true
								XPerlDB.target.eliteGfx = true
								XPerl_Options_CheckRadio(self,{"Elite", "EliteGfx"})
								XPerl_Target_UpdateDisplay(XPerl_Target)
							</OnClick>
						</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(self, "XPERL_CONF_TARGET_VALUES")
								self.flashFrame = {XPerl_TargetstatsFramehealthBartext, XPerl_TargetstatsFramemanaBartext}
								self.configBase = "XPerlDB.target"
								self.configIndex = "values"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_PERCENT")
								self.flashFrame = {XPerl_TargetstatsFramehealthBarpercent, XPerl_TargetstatsFramemanaBarpercent}
								self.configBase = "XPerlDB.target"
								self.configIndex = "percent"
								self.configClick = XPerl_Target_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Talents" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_TALENTS")
								self.flashFrame = XPerl_TargetcreatureTypeFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "showTalents"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "TalentsAsText")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_TalentsAsText" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent_Talents" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_TALENTSASTEXT")
								self.flashFrame = XPerl_TargetcreatureTypeFrame
								self.configBase = "XPerlDB.target"
								self.configIndex = "talentsAsText"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Talents" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_PVPICON")
								self.flashFrame = XPerl_TargetnameFramepvpIcon
								self.configBase = "XPerlDB.target"
								self.configIndex = "pvpIcon"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_CPBlizzard" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PVPIcon" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CPBLIZZ")
								self.flashFrame = ComboFrame
								self.configBase = "XPerlDB.target.combo"
								self.configIndex = "blizzard"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Top")
									XPerl_Options_EnableSibling(self, "Bottom")
									XPerl_Options_EnableSibling(self, "Left")
									XPerl_Options_EnableSibling(self, "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>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CPBLIZZ_POSTOP")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.combo.pos == "top")
							</OnShow>
							<OnClick>
								XPerlDB.target.combo.pos = "top"
								XPerl_Options_CheckRadio(self,{"Top", "Bottom", "Left", "Right"})
								XPerl_Target_Reset()
							</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>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CPBLIZZ_POSBOTTOM")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.combo.pos == "bottom")
							</OnShow>
							<OnClick>
								XPerlDB.target.combo.pos = "bottom"
								XPerl_Options_CheckRadio(self,{"Top", "Bottom", "Left", "Right"})
								XPerl_Target_Reset()
							</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>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CPBLIZZ_POSLEFT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.combo.pos == "left")
							</OnShow>
							<OnClick>
								XPerlDB.target.combo.pos = "left"
								XPerl_Options_CheckRadio(self,{"Top", "Bottom", "Left", "Right"})
								XPerl_Target_Reset()
							</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>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CPBLIZZ_POSRIGHT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.combo.pos == "right")
							</OnShow>
							<OnClick>
								XPerlDB.target.combo.pos = "right"
								XPerl_Options_CheckRadio(self,{"Top", "Bottom", "Left", "Right"})
								XPerl_Target_Reset()
							</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(self, "XPERL_CONF_TARGET_CP")
								self.flashFrame = XPerl_TargetnameFrame
								self.configBase = "XPerlDB.target.combo"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_TARGET_RAIDICON_ALT")
								self.flashFrame = XPerl_TargetnameFrameraidIcon
								self.configBase = "XPerlDB.target"
								self.configIndex = "raidIconAlternate"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_TARGET_30YD")
								self.configBase = "XPerlDB.target"
								self.configIndex = "range30yard"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_30yd" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.getEnable = function() return XPerlDB.target.healerMode.enable end
								self.setEnable = function(n)
											XPerlDB.target.healerMode.enable = n
											XPerl_Target_Reset()
										end
								self.getType = function() return XPerlDB.target.healerMode.type end
								self.setType = function(n)
											XPerlDB.target.healerMode.type = n
											XPerl_Target_Reset()
										end
							</OnLoad>
						</Scripts>
					</Frame>

					<Slider name="$parent_Width" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="5" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_WIDTHBONUS")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.target.size.width or 0)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.target.size.width ~= value) then
									XPerlDB.target.size.width = value
									if (XPerl_Target) then
										XPerl_Target_SetWidth(XPerl_Target)
									end
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Frame name="$parent_TargetTarget">
						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
							</OnLoad>
							<OnShow>
								if (not XPerl_TargetTarget) then
									self:Hide()
								end
							</OnShow>
						</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="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_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(self, "XPERL_CONF_TARGETS_TARGET")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "TargetsTargetsTarget")
											XPerl_Options_EnableSibling(self, "Buffs")
											XPerl_Options_EnableSibling(self, "BigBuffs", "Buffs")
											XPerl_Options_EnableSibling(self, "BigDebuffs", "Buffs")
											XPerl_Options_EnableSibling(self, "Above", "Buffs")
											XPerl_Options_EnableSibling(self, "TTTBuffs", "TargetsTargetsTarget")
											XPerl_Options_EnableSibling(self, "Level")
											XPerl_Options_EnableSibling(self, "Values")
											XPerl_Options_EnableSibling(self, "Percent")
											XPerl_Options_EnableSibling(self, "Mana")
											XPerl_Options_EnableSibling(self, "ScaleTT")
											XPerl_Options_EnableSibling(self, "Width")
											XPerl_Options_EnableSibling(self, "Healer_Healer")
											XPerl_Options_EnableSibling(self, "Healer_DeficitOnly", "Healer_Healer")
											XPerl_Options_EnableSibling(self, "Healer_DeficitMax", "Healer_Healer")
											XPerl_Options_EnableSibling(self, "Healer_CurMaxDeficit", "Healer_Healer")
										end
										self.flashFrame = XPerl_TargetTarget
										self.configBase = "XPerlDB.targettarget"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Reset
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Buffs" 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(self, "XPERL_CONF_TARGETTARGET_BUFFS")
										self.flashFrame = XPerl_TargetTarget_BuffFrame
										self.configBase = "XPerlDB.targettarget.buffs"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "BigBuffs")
											XPerl_Options_EnableSibling(self, "BigDebuffs")
										end
									</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(self, "XPERL_CONF_TARGETTARGET_BUFFSABOVE")
										self.flashFrame = XPerl_TargetTarget_BuffFrame
										self.configBase = "XPerlDB.targettarget.buffs"
										self.configIndex = "above"
										self.configClick = function()
													XPerlDB.targettargettarget.buffs.above = XPerlDB.targettarget.buffs.above
													XPerl_TargetTarget_Reset()
												end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETTARGET_BIGBUFFS")
										self.flashFrame = XPerl_TargetTarget_BuffFrame
										self.configBase = "XPerlDB.targettarget.buffs"
										self.configIndex = "big"
										self.configClick = function()
											XPerlDB.targettargettarget.buffs.big = XPerlDB.targettarget.buffs.big
											XPerl_TargetTarget_Reset ()
										end
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "BigPet")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigDebuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="80" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETTARGET_BIGDEBUFFS")
										self.flashFrame = {XPerl_TargetTargetbuffFrame, XPerl_TargetTargetdebuffFrame}
										self.configBase = "XPerlDB.targettarget.debuffs"
										self.configIndex = "big"
										self.configClick = function()
											XPerlDB.targettargettarget.debuffs.big = XPerlDB.targettarget.debuffs.big
											XPerl_TargetTarget_Reset()
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETTARGET_BIGPETBUFFS")
										self.flashFrame = {XPerl_TargetTargetbuffFrame, XPerl_TargetTargetdebuffFrame}
										self.configBase = "XPerlDB.targettarget.buffs"
										self.configIndex = "bigpet"
										self.configClick = function()
											XPerlDB.targettargettarget.debuffs.bigpet = XPerlDB.targettarget.debuffs.bigpet
											XPerl_TargetTarget_Reset()
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_TargetsTargetsTarget" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPRIGHT" relativeTo="$parent_BigPet" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETS_TARGETS_TARGET")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "TTTBuffs")
										end
										self.flashFrame = XPerl_TargetTargetTarget
										self.configBase = "XPerlDB.targettargettarget"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Reset
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetWidth(160)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETTARGETTARGET_BUFFS")
										self.flashFrame = XPerl_TargetTargetTarget_BuffFrame
										self.configBase = "XPerlDB.targettargettarget.buffs"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Reset
									</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(self, "XPERL_CONF_TARGETTARGET_LEVEL")
										self.flashFrame = XPerl_TargetTargetlevelFrame
										self.configBase = "XPerlDB.targettarget"
										self.configIndex = "level"
										self.configClick = function()
													XPerlDB.targettargettarget.level = XPerlDB.targettarget.level
													XPerl_TargetTarget_Reset()
												end
										XPerl_Options_RegisterProtected(self)
									</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(self, "XPERL_CONF_TARGETTARGET_MANA")
										self.flashFrame = {XPerl_TargetTargetstatsFramemanaBar, XPerl_TargetTargetTargetstatsFramemanaBar}
										self.configBase = "XPerlDB.targettarget"
										self.configIndex = "mana"
										self.configClick = function()
													XPerlDB.targettargettarget.mana = XPerlDB.targettarget.mana
													XPerl_TargetTarget_Reset()
												end
									</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(self, "XPERL_CONF_TARGETTARGET_VALUES")
										self.flashFrame = {XPerl_TargetTargetstatsFramehealthBartext, XPerl_TargetTargetstatsFramemanaBartext, XPerl_TargetTargetTargetstatsFramehealthBartext, XPerl_TargetTargetTargetstatsFramemanaBartext}
										self.configBase = "XPerlDB.targettarget"
										self.configIndex = "values"
										self.configClick = function()
													XPerlDB.targettargettarget.values = XPerlDB.targettarget.values
													XPerl_TargetTarget_Reset()
												end
									</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(self, "XPERL_CONF_TARGETTARGET_PERCENT")
										self.flashFrame = {XPerl_TargetTargetstatsFramehealthBarpercent, XPerl_TargetTargetstatsFramemanaBarpercent, XPerl_TargetTargetTargetstatsFramehealthBarpercent, XPerl_TargetTargetTargetstatsFramemanaBarpercent}
										self.configBase = "XPerlDB.targettarget"
										self.configIndex = "percent"
										self.configClick = function()
													XPerlDB.targettargettarget.percent = XPerlDB.targettarget.percent
													XPerl_TargetTarget_Reset()
												end
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_ScaleTT" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-10"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.configBase = "XPerlDB.targettarget"
										self.configIndex = "scale"
										self.configClick = function()
													XPerlDB.targettargettarget.scale = XPerlDB.targettarget.scale
													XPerl_TargetTarget_Reset()
												end
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETTARGET_SCALE")
										XPerl_Options_RegisterScalingSlider(self)
									</OnLoad>
								</Scripts>
							</Slider>

							<Slider name="$parent_Width" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ScaleTT" relativePoint="TOPRIGHT">
										<Offset>
											<AbsDimension x="10" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(0, 100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGETTARGET_WIDTHBONUS")
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.targettarget.size.width or 0)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.targettarget.size.width ~= value) then
											XPerlDB.targettarget.size.width = value
											XPerlDB.targettargettarget.size.width = value
											if (XPerl_TargetTarget) then
												XPerl_TargetTarget_SetWidth(XPerl_TargetTarget)
												if (XPerl_TargetTargetTarget) then
													XPerl_TargetTarget_SetWidth(XPerl_TargetTargetTarget)
												end
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
							<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ScaleTT" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-10"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.getEnable = function() return XPerlDB.targettarget.healerMode.enable end
										self.setEnable = function(n)
													XPerlDB.targettarget.healerMode.enable = n
													XPerlDB.targettargettarget.healerMode.enable = n
													XPerl_TargetTarget_Reset()
												end
										self.getType = function() return XPerlDB.targettarget.healerMode.type end
										self.setType = function(n)
													XPerlDB.targettarget.healerMode.type = n
													XPerlDB.targettargettarget.healerMode.type = n
													XPerl_TargetTarget_Reset()
												end
									</OnLoad>
								</Scripts>
							</Frame>
						</Frames>
					</Frame>

					<CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_TargetTarget" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BUFFS_ENABLE")
								self.flashFrame = XPerl_TargetbuffFrame
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Castable")
									XPerl_Options_EnableSibling(self, "OnlyMyBuffs")
									XPerl_Options_EnableSibling(self, "BigBuffs")
									XPerl_Options_EnableSibling(self, "BigPet", "BigBuffs")
									XPerl_Options_EnableSibling(self, "BigBuffsStealable")
									XPerl_Options_EnableSibling(self, "BuffSize")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Castable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Buffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CASTABLE")
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "castable"
								self.configClick = function()
										XPerlDB.targettarget.buffs.castable = XPerlDB.target.buffs.castable
										XPerlDB.targettargettarget.buffs.castable = XPerlDB.target.buffs.castable
										XPerl_Target_Reset()
										XPerl_TargetTarget_Reset()
									end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMyBuffs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Castable" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_ONLYMYBUFFS")
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "onlyMine"
								self.configClick = function()
										XPerlDB.targettarget.buffs.onlyMine = XPerlDB.target.buffs.onlyMine
										XPerlDB.targettargettarget.buffs.onlyMine = XPerlDB.target.buffs.onlyMine
										XPerl_Target_Reset()
										XPerl_TargetTarget_Reset()
									end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_OnlyMyBuffs" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BIGBUFFS")
								self.flashFrame = {XPerl_TargetbuffFrame, XPerl_TargetdebuffFrame}
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "big"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "BigPet")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="7"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BIGPETBUFFS")
								self.flashFrame = {XPerl_TargetbuffFrame, XPerl_TargetdebuffFrame}
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "bigpet"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigBuffsStealable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigPet" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BIGSTEALABLE")
								self.flashFrame = XPerl_Target_BuffFrame
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "bigStealable"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Debuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Buffs" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="100" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEBUFFS_ENABLE")
								self.flashFrame = XPerl_TargetbuffFrame
								self.configBase = "XPerlDB.target.debuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Curable")
									XPerl_Options_EnableSibling(self, "OnlyMyDebuffs")
									XPerl_Options_EnableSibling(self, "BigDebuffs")
									XPerl_Options_EnableSibling(self, "DebuffSize")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Curable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Debuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_CURABLE")
								self.configBase = "XPerlDB.target.debuffs"
								self.configIndex = "curable"
								self.configClick = XPerl_Target_Reset
								self.configClick = function()
										XPerlDB.targettarget.debuffs.curable = XPerlDB.target.debuffs.curable
										XPerlDB.targettargettarget.debuffs.curable = XPerlDB.target.debuffs.curable
										XPerl_Target_Reset()
										XPerl_TargetTarget_Reset()
									end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMyDebuffs" 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(self, "XPERL_CONF_TARGET_ONLYMYDEBUFFS")
								self.configBase = "XPerlDB.target.debuffs"
								self.configIndex = "onlyMine"
								self.configClick = function()
										XPerlDB.targettarget.buffs.onlyMine = XPerlDB.target.debuffs.onlyMine
										XPerlDB.targettargettarget.buffs.onlyMine = XPerlDB.target.debuffs.onlyMine
										XPerl_Target_Reset()
										XPerl_TargetTarget_Reset()
									end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigDebuffs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_OnlyMyDebuffs" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BIGDEBUFFS")
								self.flashFrame = {XPerl_TargetbuffFrame, XPerl_TargetdebuffFrame}
								self.configBase = "XPerlDB.target.debuffs"
								self.configIndex = "big"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_BuffSize" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffsStealable" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="-24" y="-12"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 38)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.target.buffs.size)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.target.buffs.size ~= value) then
									XPerlDB.target.buffs.size = value
									XPerlDB.targettarget.buffs.size = value
									XPerlDB.targettargettarget.buffs.size = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_DebuffSize" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="120" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="TOPRIGHT">
								<Offset>
									<AbsDimension x="10" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 45)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEBUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.target.debuffs.size or XPerlDB.target.buffs.size)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.target.debuffs.size ~= value) then
									XPerlDB.target.debuffs.size = value
									XPerlDB.targettarget.debuffs.size = value
									XPerlDB.targettargettarget.debuffs.size = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_BuffWrap" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-3" y="-6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_WRAPBUFFS")
								self.flashFrame = {XPerl_TargetbuffFrame, XPerl_TargetdebuffFrame}
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "wrap"
								self.configClick = function()
											XPerlDB.targettarget.buffs.wrap = XPerlDB.target.buffs.wrap
											XPerlDB.targettargettarget.buffs.wrap = XPerlDB.target.buffs.wrap
											XPerlDB.pettarget.buffs.wrap = XPerlDB.target.buffs.wrap
											XPerl_Target_Reset()
											XPerl_TargetTarget_Reset()
										end
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "MaxRows")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_MaxRows" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="120" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_BuffWrap" relativePoint="RIGHT">
								<Offset><AbsDimension x="80" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(1, 10)
								self:SetValueStep(1)

								local t = XPerl_Options_GetSibling("BuffWrap",self)
								local t2 = _G[t:GetName().."Text"]
								self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BUFF_ROWS")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.target.buffs.rows or 2)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.target.buffs.rows ~= value) then
									XPerlDB.target.buffs.rows = value
									XPerlDB.targettarget.buffs.rows = value
									XPerlDB.targettargettarget.buffs.rows = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_Above" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffWrap" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_BUFFSABOVE")
								self.flashFrame = {XPerl_TargetbuffFrame, XPerl_TargetdebuffFrame}
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "above"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_DebuffHighlight" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEBUFFHIGHLIGHT")
								self.configBase = "XPerlDB.target.highlightDebuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "All")
									XPerl_Options_EnableSibling(self, "Friend")
									XPerl_Options_EnableSibling(self, "Enemy")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_All" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_DebuffHighlight" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="6"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEBUFFHIGHLIGHT_ALL")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.highlightDebuffs.who == 1)
							</OnShow>
							<OnClick>
								XPerlDB.target.highlightDebuffs.who = 1
								XPerl_Options_CheckRadio(self,{"All", "Friend", "Enemy"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Friend" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_All" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="50" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEBUFFHIGHLIGHT_FRIEND")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.highlightDebuffs.who == 2)
							</OnShow>
							<OnClick>
								XPerlDB.target.highlightDebuffs.who = 2
								XPerl_Options_CheckRadio(self,{"All", "Friend", "Enemy"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Enemy" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Friend" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="50" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_TARGET_DEBUFFHIGHLIGHT_FOE")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.target.highlightDebuffs.who == 3)
							</OnShow>
							<OnClick>
								XPerlDB.target.highlightDebuffs.who = 3
								XPerl_Options_CheckRadio(self,{"All", "Friend", "Enemy"})
							</OnClick>
						</Scripts>
					</CheckButton>
				</Frames>
			</Frame>

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

				<Scripts>
					<OnLoad>
						self:SetScale(0.92)
					</OnLoad>
					<OnShow>
						if (not IsAddOnLoaded("XPerl_ArcaneBar")) then
							local n = self:GetName().."_"
							_G[n.."ArcaneBar"]:Disable()
						end
					</OnShow>
				</Scripts>

				<Frames>
					<CheckButton name="$parent_Enable" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="6" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_ENABLE")
								self.configBase = "XPerlDB.focus"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								XPerl_Options_RegisterProtected(self)
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Portrait")
									XPerl_Options_EnableSibling(self, "Portrait3D", "Portrait")
									XPerl_Options_EnableSibling(self, "HitIndicator", "Portrait")
									XPerl_Options_EnableSibling(self, "OnlyMine", "HitIndicator", "Enable")
									XPerl_Options_EnableSibling(self, "Threat")
									XPerl_Options_EnableSibling(self, "ThreatName", "Threat")
									XPerl_Options_EnableSibling(self, "ThreatPortrait", "Threat")
									XPerl_Options_EnableSibling(self, "ArcaneBar")
									XPerl_Options_EnableSibling(self, "Mana")
									XPerl_Options_EnableSibling(self, "Reaction")
									XPerl_Options_EnableSibling(self, "ClassIcon")
									XPerl_Options_EnableSibling(self, "ClassText", "ClassIcon")
									XPerl_Options_EnableSibling(self, "MobType")
									XPerl_Options_EnableSibling(self, "Level")
									XPerl_Options_EnableSibling(self, "Elite")
									XPerl_Options_EnableSibling(self, "EliteGfx")
									XPerl_Options_EnableSibling(self, "Values")
									XPerl_Options_EnableSibling(self, "Percent")
									XPerl_Options_EnableSibling(self, "PVPIcon")
									XPerl_Options_EnableSibling(self, "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Healer_DeficitOnly", "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Healer_DeficitMax", "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Healer_CurMaxDeficit", "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Width")
									XPerl_Options_EnableSibling(self, "Buffs")
									XPerl_Options_EnableSibling(self, "Debuffs")
									XPerl_Options_EnableSibling(self, "BuffSize")
									XPerl_Options_EnableSibling(self, "DebuffSize")
									XPerl_Options_EnableSibling(self, "BuffWrap")
									XPerl_Options_EnableSibling(self, "MaxRows")
									XPerl_Options_EnableSibling(self, "Castable")
									XPerl_Options_EnableSibling(self, "Curable")
									XPerl_Options_EnableSibling(self, "Above")
									XPerl_Options_EnableSibling(self, "BigBuffs")
									XPerl_Options_EnableSibling(self, "BigDebuffs")
									XPerl_Options_EnableSibling(self, "BigPet", "BigBuffs")
									XPerl_Options_EnableSibling(self, "DebuffHighlight")
									XPerl_Options_EnableSibling(self, "All", "DebuffHighlight")
									XPerl_Options_EnableSibling(self, "Friend", "DebuffHighlight")
									XPerl_Options_EnableSibling(self, "Enemy", "DebuffHighlight")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Portrait" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Enable" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_PORTRAIT")
								self.flashFrame = XPerl_FocusportraitFrame
								self.configBase = "XPerlDB.focus"
								self.configIndex = "portrait"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Portrait3D", "Enable")
									XPerl_Options_EnableSibling(self, "OnlyMine", "HitIndicator", "Enable")
									XPerl_Options_EnableSibling(self, "HitIndicator", "Enable")
								end
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_FOCUS_PORTRAIT3D")
								self.flashFrame = XPerl_FocusportraitFrame
								self.configBase = "XPerlDB.focus"
								self.configIndex = "portrait3D"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HitIndicator" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_HIT_INDICATOR")
								self.configBase = "XPerlDB.focus"
								self.configIndex = "hitIndicator"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "OnlyMine")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMine" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="24" y="24"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_HitIndicator" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_HIT_ONLYMINE")
								self.configBase = "XPerlDB.focus"
								self.configIndex = "ownDamageOnly"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Threat" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_OnlyMine" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_THREAT")
								self.configBase = "XPerlDB.focus"
								self.configIndex = "threat"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatName" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Threat" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_THREAT_NAME")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.focus.threatMode == "nameFrame")
							</OnShow>
							<OnClick>
								XPerlDB.focus.threatMode = "nameFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Target_UpdateDisplay(XPerl_Focus)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatPortrait" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_ThreatName" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_THREAT_PORTRAIT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.focus.threatMode == "portraitFrame")
							</OnShow>
							<OnClick>
								XPerlDB.focus.threatMode = "portraitFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Target_UpdateDisplay(XPerl_Focus)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ArcaneBar" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Threat" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_ARCANE_BAR")
								self.configBase = "XPerlDB.focus.castBar"
								self.configIndex = "enable"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Mana" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ArcaneBar" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_MANA")
								self.flashFrame = XPerl_FocusstatsFramemanaBar
								self.configBase = "XPerlDB.focus"
								self.configIndex = "mana"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Reaction" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ArcaneBar" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_REACTION")
								self.flashFrame = XPerl_FocusnameFrame
								self.configBase = "XPerlDB.focus"
								self.configIndex = "reactionHighlight"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_FOCUS_ICON")
								self.flashFrame = XPerl_Focus_ClassTexture
								self.configBase = "XPerlDB.focus"
								self.configIndex = "classIcon"
								self.configClick = XPerl_Target_Reset
								XPerl_Options_RegisterProtected(self)
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "ClassText", "Enable")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ClassText" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent_ClassIcon" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="95" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_CLASSTEXT")
								self.flashFrame = XPerl_Focus_BossFrame
								self.configBase = "XPerlDB.focus"
								self.configIndex = "classText"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_FOCUS_MOBTYPE")
								self.flashFrame = XPerl_Focus_TypeFrame
								self.configBase = "XPerlDB.focus"
								self.configIndex = "mobType"
								self.configClick = XPerl_Target_Reset
							</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(self, "XPERL_CONF_FOCUS_LEVEL")
								self.flashFrame = XPerl_FocuslevelFrame
								self.configBase = "XPerlDB.focus"
								self.configIndex = "level"
								self.configClick = XPerl_Target_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Elite" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Level" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_ELITE")
							</OnLoad>
							<OnShow>
								self:SetChecked(not XPerlDB.focus.eliteGfx)
							</OnShow>
							<OnClick>
								XPerlDB.focus.elite = true
								XPerlDB.focus.eliteGfx = nil
								XPerl_Options_CheckRadio(self,{"Elite", "EliteGfx"})
								XPerl_Target_UpdateDisplay(XPerl_Focus)
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_EliteGfx" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Elite" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="65" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_ELITEGFX")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.focus.eliteGfx)
							</OnShow>
							<OnClick>
								XPerlDB.focus.elite = true
								XPerlDB.focus.eliteGfx = true
								XPerl_Options_CheckRadio(self,{"Elite", "EliteGfx"})
								XPerl_Target_UpdateDisplay(XPerl_Focus)
							</OnClick>
						</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(self, "XPERL_CONF_FOCUS_VALUES")
								self.flashFrame = {XPerl_FocusstatsFramehealthBartext, XPerl_FocusstatsFramemanaBartext}
								self.configBase = "XPerlDB.focus"
								self.configIndex = "values"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Percent" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="85" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_PERCENT")
								self.flashFrame = {XPerl_FocusstatsFramehealthBarpercent, XPerl_FocusstatsFramemanaBarpercent}
								self.configBase = "XPerlDB.focus"
								self.configIndex = "percent"
								self.configClick = XPerl_Target_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_PVPIcon" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_PVPICON")
								self.flashFrame = XPerl_FocusnameFramepvpIcon
								self.configBase = "XPerlDB.focus"
								self.configIndex = "pvpIcon"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PVPIcon" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.getEnable = function() return XPerlDB.focus.healerMode.enable end
								self.setEnable = function(n)
											XPerlDB.focus.healerMode.enable = n
											XPerl_Target_Reset()
										end
								self.getType = function() return XPerlDB.focus.healerMode.type end
								self.setType = function(n)
											XPerlDB.focus.healerMode.type = n
											XPerl_Target_Reset()
										end
							</OnLoad>
						</Scripts>
					</Frame>

					<Slider name="$parent_Width" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="5" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_WIDTHBONUS")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.focus.size.width or 0)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.focus.size.width ~= value) then
									XPerlDB.focus.size.width = value
									if (XPerl_Focus) then
										XPerl_Target_SetWidth(XPerl_Focus)
									end
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Frame name="$parent_FocusTarget">
						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
							</OnLoad>
							<OnShow>
								if (not XPerl_TargetTarget) then
									self:Hide()
								end
							</OnShow>
						</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="20"/></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_FOCUSTARGET_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(self, "XPERL_CONF_FOCUS_TARGET")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "Buffs")
											XPerl_Options_EnableSibling(self, "BigBuffs", "Buffs")
											XPerl_Options_EnableSibling(self, "BigDebuffs", "Buffs")
											XPerl_Options_EnableSibling(self, "BigPet", "Buffs", "BigBuffs")
											XPerl_Options_EnableSibling(self, "Above", "Buffs")
											XPerl_Options_EnableSibling(self, "Level")
											XPerl_Options_EnableSibling(self, "Values")
											XPerl_Options_EnableSibling(self, "Percent")
											XPerl_Options_EnableSibling(self, "Mana")
											XPerl_Options_EnableSibling(self, "ScaleFT")
											XPerl_Options_EnableSibling(self, "Width")
											XPerl_Options_EnableSibling(self, "Healer_Healer")
											XPerl_Options_EnableSibling(self, "Healer_DeficitOnly", "Healer_Healer")
											XPerl_Options_EnableSibling(self, "Healer_DeficitMax", "Healer_Healer")
											XPerl_Options_EnableSibling(self, "Healer_CurMaxDeficit", "Healer_Healer")
										end
										self.flashFrame = XPerl_FocusTarget
										self.configBase = "XPerlDB.focustarget"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Reset
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Buffs" 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(self, "XPERL_CONF_FOCUSTARGET_BUFFS")
										self.flashFrame = {XPerl_FocusTargetbuffFrame, XPerl_FocusTargetdebuffFrame}
										self.configBase = "XPerlDB.focustarget.buffs"
										self.configIndex = "enable"
										self.configClick = XPerl_TargetTarget_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "Above")
											XPerl_Options_EnableSibling(self, "BigBuffs")
											XPerl_Options_EnableSibling(self, "BigDebuffs")
										end
									</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(self, "XPERL_CONF_FOCUSTARGET_BUFFSABOVE")
										self.flashFrame = {XPerl_FocusTargetbuffFrame, XPerl_FocusTargetdebuffFrame}
										self.configBase = "XPerlDB.focustarget.buffs"
										self.configIndex = "above"
										self.configClick = XPerl_TargetTarget_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUSTARGET_BIGBUFFS")
										self.flashFrame = {XPerl_FocusTargetbuffFrame, XPerl_FocusTargetdebuffFrame}
										self.configBase = "XPerlDB.focustarget.buffs"
										self.configIndex = "big"
										self.configClick = XPerl_TargetTarget_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "BigPet")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigDebuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="80" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUSTARGET_BIGDEBUFFS")
										self.flashFrame = {XPerl_FocusTargetbuffFrame, XPerl_FocusTargetdebuffFrame}
										self.configBase = "XPerlDB.pettarget.debuffs"
										self.configIndex = "big"
										self.configClick = XPerl_TargetTarget_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUSTARGET_BIGPETBUFFS")
										self.flashFrame = {XPerl_FocusTargetbuffFrame, XPerl_FocusTargetdebuffFrame}
										self.configBase = "XPerlDB.focustarget.buffs"
										self.configIndex = "bigpet"
										self.configClick = XPerl_TargetTarget_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPRIGHT" relativeTo="$parent_BigPet" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="7"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUSTARGET_LEVEL")
										self.flashFrame = XPerl_FocusTargetlevelFrame
										self.configBase = "XPerlDB.focustarget"
										self.configIndex = "level"
										self.configClick = XPerl_TargetTarget_Reset
										XPerl_Options_RegisterProtected(self)
									</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(self, "XPERL_CONF_FOCUSTARGET_MANA")
										self.flashFrame = {XPerl_FocusTargetstatsFramemanaBar, XPerl_FocusTargetTargetstatsFramemanaBar}
										self.configBase = "XPerlDB.focustarget"
										self.configIndex = "mana"
										self.configClick = XPerl_TargetTarget_Reset
									</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(self, "XPERL_CONF_FOCUSTARGET_VALUES")
										self.flashFrame = {XPerl_FocusTargetstatsFramehealthBartext, XPerl_FocusTargetstatsFramemanaBartext, XPerl_FocusTargetTargetstatsFramehealthBartext, XPerl_FocusTargetTargetstatsFramemanaBartext}
										self.configBase = "XPerlDB.focustarget"
										self.configIndex = "values"
										self.configClick = XPerl_TargetTarget_Reset
									</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(self, "XPERL_CONF_FOCUSTARGET_PERCENT")
										self.flashFrame = {XPerl_FocusTargetstatsFramehealthBarpercent, XPerl_FocusTargetstatsFramemanaBarpercent, XPerl_FocusTargetTargetstatsFramehealthBarpercent, XPerl_FocusTargetTargetstatsFramemanaBarpercent}
										self.configBase = "XPerlDB.focustarget"
										self.configIndex = "percent"
										self.configClick = XPerl_TargetTarget_Reset
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_ScaleFT" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-10"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.configBase = "XPerlDB.focustarget"
										self.configIndex = "scale"
										self.configClick = XPerl_TargetTarget_Reset
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUSTARGET_SCALE")
										XPerl_Options_RegisterScalingSlider(self, 40)
									</OnLoad>
								</Scripts>
							</Slider>

							<Slider name="$parent_Width" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ScaleFT" relativePoint="TOPRIGHT">
										<Offset>
											<AbsDimension x="10" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(0, 100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUSTARGET_WIDTHBONUS")
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.focustarget.size.width or 0)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.focustarget.size.width ~= value) then
											XPerlDB.focustarget.size.width = value
											if (XPerl_FocusTarget) then
												XPerl_TargetTarget_SetWidth(XPerl_FocusTarget)
											end
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
							<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ScaleFT" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-10"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self.getEnable = function() return XPerlDB.focustarget.healerMode.enable end
										self.setEnable = function(n)
													XPerlDB.focustarget.healerMode.enable = n
													XPerl_TargetTarget_Reset()
												end
										self.getType = function() return XPerlDB.focustarget.healerMode.type end
										self.setType = function(n)
													XPerlDB.focustarget.healerMode.type = n
													XPerl_TargetTarget_Reset()
												end
									</OnLoad>
								</Scripts>
							</Frame>
						</Frames>
					</Frame>

					<CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_FocusTarget" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BUFFS_ENABLE")
								self.flashFrame = XPerl_FocusbuffFrame
								self.configBase = "XPerlDB.focus.buffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Castable")
									XPerl_Options_EnableSibling(self, "OnlyMyBuffs")
									XPerl_Options_EnableSibling(self, "BigBuffs")
									XPerl_Options_EnableSibling(self, "BigPet", "BigBuffs")
									XPerl_Options_EnableSibling(self, "BuffSize")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Castable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Buffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_CASTABLE")
								self.configBase = "XPerlDB.focus.buffs"
								self.configIndex = "castable"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMyBuffs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Castable" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_ONLYMYBUFFS")
								self.configBase = "XPerlDB.target.buffs"
								self.configIndex = "onlyMine"
								self.configClick = function()
										XPerlDB.focustarget.buffs.onlyMine = XPerlDB.focus.buffs.onlyMine
										XPerl_Target_Reset()
										XPerl_TargetTarget_Reset()
									end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_OnlyMyBuffs" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BIGBUFFS")
								self.flashFrame = {XPerl_FocusbuffFrame, XPerl_FocusdebuffFrame}
								self.configBase = "XPerlDB.focus.buffs"
								self.configIndex = "big"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="7"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BIGPETBUFFS")
								self.flashFrame = {XPerl_FocusbuffFrame, XPerl_FocusdebuffFrame}
								self.configBase = "XPerlDB.focus.buffs"
								self.configIndex = "bigpet"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Debuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Buffs" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="100" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_DEBUFFS_ENABLE")
								self.flashFrame = XPerl_FocusdebuffFrame
								self.configBase = "XPerlDB.focus.debuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Curable")
									XPerl_Options_EnableSibling(self, "OnlyMyDebuffs")
									XPerl_Options_EnableSibling(self, "BigDebuffs")
									XPerl_Options_EnableSibling(self, "DebuffSize")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Curable" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Debuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_CURABLE")
								self.configBase = "XPerlDB.focus.debuffs"
								self.configIndex = "curable"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMyDebuffs" 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(self, "XPERL_CONF_FOCUS_ONLYMYDEBUFFS")
								self.configBase = "XPerlDB.focus.debuffs"
								self.configIndex = "onlyMine"
								self.configClick = function()
										XPerlDB.focustarget.debuffs.onlyMine = XPerlDB.focus.debuffs.onlyMine
										XPerl_Target_Reset()
										XPerl_TargetTarget_Reset()
									end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigDebuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_OnlyMyDebuffs" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BIGDEBUFFS")
								self.flashFrame = {XPerl_FocusbuffFrame, XPerl_FocusdebuffFrame}
								self.configBase = "XPerlDB.focus.debuffs"
								self.configIndex = "big"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "BigPet")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_BuffSize" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigPet" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="-24" y="-12"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 38)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.focus.buffs.size)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.focus.buffs.size ~= value) then
									XPerlDB.focus.buffs.size = value
									XPerlDB.focustarget.buffs.size = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_DebuffSize" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="120" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="TOPRIGHT">
								<Offset>
									<AbsDimension x="10" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 45)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_DEBUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.focus.debuffs.size or XPerlDB.focus.buffs.size)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.focus.debuffs.size ~= value) then
									XPerlDB.focus.debuffs.size = value
									XPerlDB.focustarget.debuffs.size = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_BuffWrap" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-3" y="-6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_WRAPBUFFS")
								self.flashFrame = {XPerl_FocusbuffFrame, XPerl_FocusdebuffFrame}
								self.configBase = "XPerlDB.focus.buffs"
								self.configIndex = "wrap"
								self.configClick = function()
											XPerlDB.focustarget.buffs.wrap = XPerlDB.focus.buffs.wrap
											XPerl_Target_Reset()
											XPerl_TargetTarget_Reset()
										end
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "MaxRows")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_MaxRows" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="120" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_BuffWrap" relativePoint="RIGHT">
								<Offset><AbsDimension x="80" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(1, 10)
								self:SetValueStep(1)

								local t = XPerl_Options_GetSibling("BuffWrap",self)
								local t2 = _G[t:GetName().."Text"]
								self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BUFF_ROWS")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.focus.buffs.rows or 2)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.focus.buffs.rows ~= value) then
									XPerlDB.focus.buffs.rows = value
									XPerlDB.focustarget.buffs.rows = value
									XPerl_Target_Reset()
									XPerl_TargetTarget_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_Above" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffWrap" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_BUFFSABOVE")
								self.flashFrame = {XPerl_FocusbuffFrame, XPerl_FocusdebuffFrame}
								self.configBase = "XPerlDB.focus.buffs"
								self.configIndex = "above"
								self.configClick = XPerl_Target_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_DebuffHighlight" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Above" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_DEBUFFHIGHLIGHT")
								self.configBase = "XPerlDB.focus.highlightDebuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Target_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "All")
									XPerl_Options_EnableSibling(self, "Friend")
									XPerl_Options_EnableSibling(self, "Enemy")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_All" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_DebuffHighlight" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="6"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_DEBUFFHIGHLIGHT_ALL")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.focus.highlightDebuffs.who == 1)
							</OnShow>
							<OnClick>
								XPerlDB.focus.highlightDebuffs.who = 1
								XPerl_Options_CheckRadio(self,{"All", "Friend", "Enemy"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Friend" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_All" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="50" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_DEBUFFHIGHLIGHT_FRIEND")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.focus.highlightDebuffs.who == 2)
							</OnShow>
							<OnClick>
								XPerlDB.focus.highlightDebuffs.who = 2
								XPerl_Options_CheckRadio(self,{"All", "Friend", "Enemy"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Enemy" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Friend" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="50" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_FOCUS_DEBUFFHIGHLIGHT_FOE")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.focus.highlightDebuffs.who == 3)
							</OnShow>
							<OnClick>
								XPerlDB.focus.highlightDebuffs.who = 3
								XPerl_Options_CheckRadio(self,{"All", "Friend", "Enemy"})
							</OnClick>
						</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>

				<Scripts>
					<OnShow>
						if (not IsAddOnLoaded("XPerl_ArcaneBar")) then
							local n = self:GetName().."_"
							_G[n.."ArcaneBar"]:Disable()
						end
					</OnShow>
				</Scripts>

				<Frames>
					<CheckButton name="$parent_Name" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="6" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_NAMES")
								self.flashFrame = {XPerl_party1nameFrame, XPerl_party2nameFrame, XPerl_party3nameFrame, XPerl_party4nameFrame}
								self.configBase = "XPerlDB.party"
								self.configIndex = "name"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PARTY_PORTRAIT")
								self.flashFrame = {XPerl_party1portraitFrame, XPerl_party2portraitFrame, XPerl_party3portraitFrame, XPerl_party4portraitFrame}
								self.configBase = "XPerlDB.party"
								self.configIndex = "portrait"
								self.configClick = XPerl_Party_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Portrait3D")
									XPerl_Options_EnableSibling(self, "HitIndicator")
								end
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PARTY_PORTRAIT3D")
								self.flashFrame = {XPerl_party1portraitFrame, XPerl_party2portraitFrame, XPerl_party3portraitFrame, XPerl_party4portraitFrame}
								self.configBase = "XPerlDB.party"
								self.configIndex = "portrait3D"
								self.configClick = XPerl_Party_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HitIndicator" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Portrait3D" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_HIT_INDICATOR")
								self.configBase = "XPerlDB.party"
								self.configIndex = "hitIndicator"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Threat" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_HitIndicator" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_THREAT")
								self.configBase = "XPerlDB.party"
								self.configIndex = "threat"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatName" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Threat" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_THREAT_NAME")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.party.threatMode == "nameFrame")
							</OnShow>
							<OnClick>
								XPerlDB.party.threatMode = "nameFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Party_Reset()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ThreatPortrait" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_ThreatName" relativePoint="RIGHT">
								<Offset><AbsDimension x="45" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_THREAT_PORTRAIT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.party.threatMode == "portraitFrame")
							</OnShow>
							<OnClick>
								XPerlDB.party.threatMode = "portraitFrame"
								XPerl_Options_CheckRadio(self,{"ThreatName", "ThreatPortrait"})
								XPerl_Party_Reset()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ArcaneBar" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Threat" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_ARCANE_BAR")
								self.configBase = "XPerlDB.party.castBar"
								self.configIndex = "enable"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Level" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_ArcaneBar" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_LEVEL")
								self.flashFrame = {XPerl_party1levelFrame, XPerl_party2levelFrame, XPerl_party3levelFrame, XPerl_party4levelFrame}
								self.configBase = "XPerlDB.party"
								self.configIndex = "level"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PARTY_TARGET")
								self.flashFrame = {XPerl_party1targetFrame, XPerl_party2targetFrame, XPerl_party3targetFrame, XPerl_party4targetFrame}
								self.configBase = "XPerlDB.party.target"
								self.configIndex = "enable"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "TargetSize")
									XPerl_Options_EnableSibling(self, "TargetLarge")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_TargetLarge" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Target" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_TARGETLARGE")
								self.configBase = "XPerlDB.party.target"
								self.configIndex = "large"
								self.configClick = XPerl_Party_Set_Bits
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_TargetSize" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="75" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_Target" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="80" y="-12"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(66, 200)
								self:SetValueStep(1)

								local t = XPerl_Options_GetSibling("Target",self)
								local t2 = _G[t:GetName().."Text"]
								self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_TARGETSIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.party.target.size)
							</OnShow>
							<OnValueChanged>
								XPerlDB.party.target.size = value
								_G[self:GetName().."Current"]:SetText(value)
								XPerl_Party_Set_Bits()
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_Icon" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_TargetLarge" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_ICON")
								self.flashFrame = {XPerl_party1levelFrameclassTexture, XPerl_party2levelFrameclassTexture, XPerl_party3levelFrameclassTexture, XPerl_party4levelFrameclassTexture}
								self.configBase = "XPerlDB.party"
								self.configIndex = "classIcon"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PARTY_VALUES")
								self.flashFrame = {XPerl_party1statsFramehealthBartext, XPerl_party2statsFramehealthBartext, XPerl_party3statsFramehealthBartext, XPerl_party4statsFramehealthBartext,
											XPerl_party1statsFramemanaBartext, XPerl_party2statsFramemanaBartext, XPerl_party3statsFramemanaBartext, XPerl_party4statsFramemanaBartext}
								self.configBase = "XPerlDB.party"
								self.configIndex = "values"
								self.configClick = XPerl_Party_Reset
							</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(self, "XPERL_CONF_PARTY_PERC")
								self.flashFrame = {XPerl_party1statsFramehealthBarpercent, XPerl_party2statsFramehealthBarpercent, XPerl_party3statsFramehealthBarpercent, XPerl_party4statsFramehealthBarpercent,
											XPerl_party1statsFramemanaBarpercent, XPerl_party2statsFramemanaBarpercent, XPerl_party3statsFramemanaBarpercent, XPerl_party4statsFramemanaBarpercent}
								self.configBase = "XPerlDB.party"
								self.configIndex = "percent"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PARTY_PVPICON")
								self.flashFrame = XPerl_PlayernameFramepvpIcon
								self.configBase = "XPerlDB.party"
								self.configIndex = "pvpIcon"
								self.configClick = XPerl_Party_Set_Bits
							</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(self, "XPERL_CONF_PARTY_INRAID")
								self.configBase = "XPerlDB.party"
								self.configIndex = "inRaid"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
							</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(self, "XPERL_CONF_PARTY_30YD")
								self.configBase = "XPerlDB.party"
								self.configIndex = "range30yard"
								self.configClick = XPerl_Party_Set_Bits
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_SmallRaid" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_30yd" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_SMALLRAID")
								self.configBase = "XPerlDB.party"
								self.configIndex = "smallRaid"
								self.configClick = XPerl_Party_Reset
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_SmallRaid" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.getEnable = function() return XPerlDB.party.healerMode.enable end
								self.setEnable = function(n)
											XPerlDB.party.healerMode.enable = n
											XPerl_Party_Reset()
										end
								self.getType = function() return XPerlDB.party.healerMode.type end
								self.setType = function(n)
											XPerlDB.party.healerMode.type = n
											XPerl_Party_Reset()
										end
							</OnLoad>
						</Scripts>
					</Frame>

					<Slider name="$parent_Width" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="5" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_WIDTHBONUS")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.party.size.width or 0)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.party.size.width ~= value) then
									XPerlDB.party.size.width = value
									for i = 1,4 do
										local f = _G["XPerl_party"..i]
										if (f) then
											XPerl_Party_SetWidth(f)
										end
									end
									XPerl_Party_Virtual(true)
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOP">
								<Offset><AbsDimension x="0" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_BUFFS")
								self.flashFrame = {XPerl_party1buffFrame, XPerl_party2buffFrame, XPerl_party3buffFrame, XPerl_party4buffFrame}
								self.configBase = "XPerlDB.party.buffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Party_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Castable")
									XPerl_Options_EnableSibling(self, "OnlyMyBuffs")
									XPerl_Options_EnableSibling(self, "BuffSize")
								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(self, "XPERL_CONF_PARTY_CASTABLE")
								self.configBase = "XPerlDB.party.buffs"
								self.configIndex = "castable"
								self.configClick = XPerl_Party_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_OnlyMyBuffs" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Castable" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_ONLYMYBUFFS")
								self.configBase = "XPerlDB.party.buffs"
								self.configIndex = "onlyMine"
								self.configClick = XPerl_Party_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Debuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_OnlyMyBuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_DEBUFFS")
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Curable")
									XPerl_Options_EnableSibling(self, "Below")
									XPerl_Options_EnableSibling(self, "HalfSize")
									XPerl_Options_EnableSibling(self, "DebuffSize")
								end
								self.flashFrame = {XPerl_party1buffFrame, XPerl_party2buffFrame, XPerl_party3buffFrame, XPerl_party4buffFrame}
								self.configBase = "XPerlDB.party.debuffs"
								self.configIndex = "enable"
								self.configClick = XPerl_Party_Reset
							</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(self, "XPERL_CONF_PARTY_CURABLE")
								self.configBase = "XPerlDB.party.debuffs"
								self.configIndex = "curable"
								self.configClick = XPerl_Party_Reset
							</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(self, "XPERL_CONF_PARTY_DEBUFFSBELOW")
								self.flashFrame = {XPerl_party1buffFrame, XPerl_party2buffFrame, XPerl_party3buffFrame, XPerl_party4buffFrame}
								self.configBase = "XPerlDB.party.debuffs"
								self.configIndex = "below"
								self.configClick = XPerl_Party_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HalfSize" inherits="XPerlCheckButtonTemplate">
						<Size>
							<AbsDimension x="26" y="26"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Below" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_DEBUFFSHALFSIZE")
								self.flashFrame = {XPerl_party1debuffFrame, XPerl_party2debuffFrame, XPerl_party3debuffFrame, XPerl_party4debuffFrame}
								self.configBase = "XPerlDB.party.debuffs"
								self.configIndex = "halfSize"
								self.configClick = XPerl_Party_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_BuffSize" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HalfSize" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-13" y="-13"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 38)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_BUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.party.buffs.size)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.party.buffs.size ~= value) then
									XPerlDB.party.buffs.size = value
									XPerl_Party_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_DebuffSize" inherits="XPerlSlider">
						<Size><AbsDimension x="120" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="10" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(7, 45)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_DEBUFF_SIZE")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.party.debuffs.size or XPerlDB.party.buffs.size)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.party.debuffs.size ~= value) then
									XPerlDB.party.debuffs.size = value
									XPerl_Party_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_BuffWrap" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-3" y="-6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_WRAPBUFFS")
								self.flashFrame = {XPerl_party1buffFrame, XPerl_party2buffFrame, XPerl_party3buffFrame, XPerl_party4buffFrame}
								self.configBase = "XPerlDB.party.buffs"
								self.configIndex = "wrap"
								self.configClick = XPerl_Party_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "MaxRows")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_MaxRows" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="120" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parent_BuffWrap" relativePoint="RIGHT">
								<Offset><AbsDimension x="80" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetScale(0.8)
								self:SetMinMaxValues(1, 10)
								self:SetValueStep(1)

								local t = XPerl_Options_GetSibling("BuffWrap",self)
								local t2 = _G[t:GetName().."Text"]
								self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_BUFF_ROWS")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.party.buffs.rows or 2)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.party.buffs.rows ~= value) then
									XPerlDB.party.buffs.rows = value
									XPerl_Party_Reset()
								end
								_G[self:GetName().."Current"]:SetText(value)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_BigBuffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffWrap" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_BIGBUFFS")
								self.flashFrame = {XPerl_party1buffFrame, XPerl_party2buffFrame, XPerl_party3buffFrame, XPerl_party4buffFrame}
								self.configBase = "XPerlDB.party.buffs"
								self.configIndex = "big"
								self.configClick = XPerl_Party_Reset
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "BigPet")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BigPet" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BigBuffs" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="7"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_BIGPETBUFFS")
								self.flashFrame = {XPerl_party1buffFrame, XPerl_party2buffFrame, XPerl_party3buffFrame, XPerl_party4buffFrame}
								self.configBase = "XPerlDB.party.buffs"
								self.configIndex = "bigpet"
								self.configClick = XPerl_Party_Reset
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_PartyPets">
						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
							</OnLoad>
							<OnShow>
								if (not IsAddOnLoaded("XPerl_PartyPet")) then
									self:Hide()
								end
							</OnShow>
						</Scripts>
						<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="-25"/></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="6" y="-3"/></Offset>
									</Anchor>
								</Anchors>
								<Layers>
									<Layer level="ARTWORK">
										<FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_PARTY_PETS_TITLE">
										<Color r="1" g="1" b="1" a="1" />
											<Anchors>
												<Anchor point="LEFT" />
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Button>

							<CheckButton name="$parent_Pets" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="-3" y="-3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_PETS")
										self.flashFrame = {XPerl_partypet1, XPerl_partypet2, XPerl_partypet3, XPerl_partypet4}
										self.configBase = "XPerlDB.partypet"
										self.configIndex = "enable"
										self.configClick = function()
											XPerl_Party_Reset()
											XPerl_PartyPet_Reset()
										end
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "PetNames")
											XPerl_Options_EnableSibling(self, "PetLevel", "PetNames")
											XPerl_Options_EnableSibling(self, "PetMana")
											XPerl_Options_EnableSibling(self, "PetBuffs")
											XPerl_Options_EnableSibling(self, "BuffSize", "PetBuffs")
											XPerl_Options_EnableSibling(self, "DebuffSize", "PetBuffs")
										end
										XPerl_Options_RegisterProtected(self)
									</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(self, "XPERL_CONF_PARTY_PETNAME")
										self.flashFrame = {XPerl_partypet1nameFrame, XPerl_partypet2nameFrame, XPerl_partypet3nameFrame, XPerl_partypet4nameFrame}
										self.configBase = "XPerlDB.partypet"
										self.configIndex = "name"
										self.configClick = XPerl_PartyPet_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "PetLevel")
										end
										XPerl_Options_RegisterProtected(self)
									</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(self, "XPERL_CONF_PARTY_PETLEVEL")
										self.flashFrame = {XPerl_partypet1nameFramelevel, XPerl_partypet2nameFramelevel, XPerl_partypet3nameFramelevel, XPerl_partypet4nameFramelevel}
										self.configBase = "XPerlDB.partypet"
										self.configIndex = "name"
										self.configClick = XPerl_PartyPet_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_PetMana" 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(self, "XPERL_CONF_PARTY_PETMANA")
										self.flashFrame = {XPerl_partypet1statsFramemanaBar, XPerl_partypet2statsFramemanaBar, XPerl_partypet3statsFramemanaBar, XPerl_partypet4statsFramemanaBar}
										self.configBase = "XPerlDB.partypet"
										self.configIndex = "mana"
										self.configClick = XPerl_PartyPet_Reset
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_PetBuffs" inherits="XPerlCheckButtonTemplate">
								<Size><AbsDimension x="26" y="26"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_PetMana" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_PETBUFFS")
										self.flashFrame = {XPerl_partypet1nameFrame, XPerl_partypet2nameFrame, XPerl_partypet3nameFrame, XPerl_partypet4nameFrame}
										self.configBase = "XPerlDB.partypet.buffs"
										self.configIndex = "enable"
										self.configClick = XPerl_PartyPet_Reset
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "BuffSize")
											XPerl_Options_EnableSibling(self, "DebuffSize")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_BuffSize" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_PetBuffs" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="-13" y="-13"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(5, 20)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_PETBUFF_SIZE")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.partypet.buffs.size)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.partypet.buffs.size ~= value) then
											XPerlDB.partypet.buffs.size = value
											XPerl_Party_Reset()
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
							<Slider name="$parent_DebuffSize" inherits="XPerlSlider">
								<Size><AbsDimension x="120" y="16"/></Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_BuffSize" relativePoint="TOPRIGHT">
										<Offset>
											<AbsDimension x="10" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(5, 20)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_PARTY_PETDEBUFF_SIZE")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.partypet.debuffs.size or XPerlDB.partypet.buffs.size)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.partypet.debuffs.size ~= value) then
											XPerlDB.partypet.debuffs.size = value
											XPerl_Party_Reset()
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
						</Frames>
					</Frame>
				</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(self, "XPERL_CONF_RAID_SHOW")
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "NotInBG")
									XPerl_Options_EnableSibling(self, "Titles")
									XPerl_Options_EnableSibling(self, "Mana")
									XPerl_Options_EnableSibling(self, "ManaPercent", "Mana")
									XPerl_Options_EnableSibling(self, "HealthText")
									XPerl_Options_EnableSibling(self, "Percent", "HealthText")
									XPerl_Options_EnableSibling(self, "Values", "HealthText")
									XPerl_Options_EnableSibling(self, "Buffs")
									XPerl_Options_EnableSibling(self, "Debuffs")
									XPerl_Options_EnableSibling(self, "Castable")
									XPerl_Options_EnableSibling(self, "BuffsRight")
									XPerl_Options_EnableSibling(self, "BuffsInside", "BuffsRight")
									XPerl_Options_EnableSibling(self, "BuffsUntilDebuffed")
									XPerl_Options_EnableSibling(self, "BuffTooltipHelper")
									XPerl_Options_EnableSibling(self, "BuffHelperNoSort", "BuffTooltipHelper")
									XPerl_Options_EnableSibling(self, "BuffHelperSortGroup", "BuffTooltipHelper")
									XPerl_Options_EnableSibling(self, "BuffHelperSortClass", "BuffTooltipHelper")
									XPerl_Options_EnableSibling(self, "BuffTooltipHelperVis", "BuffTooltipHelper")
									XPerl_Options_EnableSibling(self, "Healer")
									for i = 1,10 do
										XPerl_Options_EnableSibling(self, "Groups_Grp"..i)
									end
									for i = 1,10 do
										XPerl_Options_EnableSibling(self, "Groups_ClassSel"..i.."_Enable")
										XPerl_Options_EnableSibling(self, "Groups_ClassSel"..i.."_Up")
										XPerl_Options_EnableSibling(self, "Groups_ClassSel"..i.."_Down")
									end

									XPerl_Options_EnableSibling(self, "Groups_All")
									XPerl_Options_EnableSibling(self, "Groups_None")
									XPerl_Options_EnableSibling(self, "Groups_ByClass")
									XPerl_Options_EnableSibling(self, "Groups_Alphabetical")
									XPerl_Options_EnableSibling(self, "Groups_VSpacing")
								end
								self.configBase = "XPerlDB.raid"
								self.configIndex = "enable"
								self.configClick = XPerl_Raid_OptionActions
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_NotInBG" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Enable" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_NOTINBG")
								self.configBase = "XPerlDB.raid"
								self.configIndex = "notInBG"
								self.configClick = XPerl_RaidPets_OptionActions
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_RaidPets" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_NotInBG" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_PETS")
								self.configBase = "XPerlDB.raidpet"
								self.configIndex = "enable"
								self.configClick = XPerl_RaidPets_OptionActions
								self.Validate = function()
									--XPerl_Options_EnableSibling(self, "Huntards")
									--XPerl_Options_EnableSibling(self, "Moredots")
									XPerl_Options_EnableSibling(self, "AlignToRaid")
								end
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_AlignToRaid" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_RaidPets" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_PETS_ALIGN")
								self.configBase = "XPerlDB.raidpet"
								self.configIndex = "alignToRaid"
								self.configClick = XPerl_RaidPets_OptionActions
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Titles" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_AlignToRaid" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnShow>
								if (IsAddOnLoaded("XPerl_RaidPets")) then
									XPerl_Options_GetSibling("RaidPets",self):Show()
									--XPerl_Options_GetSibling("Huntards",self):Show()
									--XPerl_Options_GetSibling("Moredots",self):Show()
									XPerl_Options_GetSibling("AlignToRaid",self):Show()
									self:SetPoint("TOP", XPerl_Options_GetSibling("AlignToRaid",self), "BOTTOMLEFT", 0, 6)
								else
									XPerl_Options_GetSibling("RaidPets",self):Hide()
									--XPerl_Options_GetSibling("Huntards",self):Hide()
									--XPerl_Options_GetSibling("Moredots",self):Hide()
									XPerl_Options_GetSibling("AlignToRaid",self):Hide()
									self:SetPoint("TOPLEFT", XPerl_Options_GetSibling("Enable",self), "BOTTOMLEFT", 0, 6)
								end
							</OnShow>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_TITLES")
								self.configBase = "XPerlDB.raid"
								self.configIndex = "titles"
								self.configClick = XPerl_Raid_OptionActions
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_HealthText" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Titles" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_HEALTHTEXT")
								self.configBase = "XPerlDB.raid"
								self.configIndex = "percent"
								self.configClick = XPerl_Raid_OptionActions
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Percent")
									XPerl_Options_EnableSibling(self, "Values")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Percent" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_HealthText" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="4"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_PERCENTS")
							</OnLoad>
							<OnShow>
								self:SetChecked(not XPerlDB.raid.values)
							</OnShow>
							<OnClick>
								self:SetChecked(true)
								XPerlDB.raid.values = nil
								XPerl_Raid_OptionActions()
								XPerl_Options_CheckRadio(self,{"Percent", "Values"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Values" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Percent" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_VALUES")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.raid.values)
							</OnShow>
							<OnClick>
								self:SetChecked(true)
								XPerlDB.raid.values = 1
								XPerl_Raid_OptionActions()
								XPerl_Options_CheckRadio(self,{"Percent", "Values"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Mana" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_Values" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_MANA")
								self.configBase = "XPerlDB.raid"
								self.configIndex = "mana"
								self.configClick = XPerl_Raid_OptionActions
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "ManaPercent")
								end
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_ManaPercent" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_Mana" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_MANAPERCENT")
								self.configBase = "XPerlDB.raid"
								self.configIndex = "manaPercent"
								self.configClick = XPerl_Raid_OptionActions
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Buffs" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_ManaPercent" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_BUFFS")
								self.configBase = "XPerlDB.raid.buffs"
								self.configIndex = "enable"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Castable", "or", _G[self:GetParent():GetName().."_Debuffs"])
								end
								self.configClick = function()
										if (XPerlDB.raid.buffs.enable) then
											XPerlDB.raid.debuffs.enable = nil
											_G[self:GetParent():GetName().."_Debuffs"]:SetChecked(0)
										end
										self.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(self, "XPERL_CONF_RAID_DEBUFFS")
								self.configBase = "XPerlDB.raid.debuffs"
								self.configIndex = "enable"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Castable", "or", "Buffs")
								end
								self.configClick = function()
										if (XPerlDB.raid.debuffs.enable) then
											XPerlDB.raid.buffs.enable = nil
											_G[self:GetParent():GetName().."_Buffs"]:SetChecked(0)
										end
										self.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(self, "XPERL_CONF_RAID_CASTABLE")
								self.configBase = "XPerlDB.raid.buffs"
								self.configIndex = "castable"
								self.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(self, "XPERL_CONF_RAID_BUFFSRIGHT")
								self.configBase = "XPerlDB.raid.buffs"
								self.configIndex = "right"
								self.configClick = XPerl_Raid_OptionActions
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "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(self, "XPERL_CONF_RAID_BUFFSINSIDE")
								self.configBase = "XPerlDB.raid.buffs"
								self.configIndex = "inside"
								self.configClick = XPerl_Raid_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffsUntilDebuffed" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_BuffsInside" relativePoint="BOTTOM">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFSUNTILDEBUFFED")
								self.configBase = "XPerlDB.raid.buffs"
								self.configIndex = "untilDebuffed"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffTooltipHelper" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffsUntilDebuffed" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPHELPER")
								self.configBase = "XPerlDB.buffHelper"
								self.configIndex = "enable"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "BuffTooltipHelperVis")
									XPerl_Options_EnableSibling(self, "BuffHelperNoSort")
									XPerl_Options_EnableSibling(self, "BuffHelperSortGroup")
									XPerl_Options_EnableSibling(self, "BuffHelperSortClass")
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffHelperNoSort" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffTooltipHelper" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPHELPER_NOSORT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.buffHelper.sort == nil)
							</OnShow>
							<OnClick>
								self:SetChecked(true)
								XPerlDB.buffHelper.sort = nil
								XPerl_Options_CheckRadio(self,{"BuffHelperSortGroup", "BuffHelperSortClass"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffHelperSortGroup" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffHelperNoSort" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="55" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPHELPER_SORTGROUP")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.buffHelper.sort == "group")
							</OnShow>
							<OnClick>
								self:SetChecked(true)
								XPerlDB.buffHelper.sort = "group"
								XPerl_Options_CheckRadio(self,{"BuffHelperNoSort", "BuffHelperSortClass"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffHelperSortClass" inherits="XPerlRadioButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffHelperSortGroup" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="65" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPHELPER_SORTCLASS")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlDB.buffHelper.sort == "class")
							</OnShow>
							<OnClick>
								self:SetChecked(true)
								XPerlDB.buffHelper.sort = "class"
								XPerl_Options_CheckRadio(self,{"BuffHelperNoSort", "BuffHelperSortGroup"})
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_BuffTooltipHelperVis" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_BuffHelperNoSort" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="1"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_BUFFTOOLTIPHELPER_VIS")
								self.configBase = "XPerlDB.buffHelper"
								self.configIndex = "visible"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Healer" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="$parent_BuffTooltipHelperVis" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_HEALER_MODE", true)
								self.configBase = "XPerlDB.raid.healerMode"
								self.configIndex = "enable"
								self.configClick = XPerl_Raid_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Groups">
						<Scripts>
							<OnLoad>
								self:SetScale(0.9)
							</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="130"/></Offset>
							</Anchor>
						</Anchors>
						<Frames>
							<Button name="$parent_Title">
								<Size>
									<AbsDimension x="60" y="10"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset><AbsDimension x="6" 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="-3" y="-3"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										_G[self:GetName().."Text"]:SetText("1")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 1
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("2")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 2
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("3")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 3
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("4")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 4
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("5")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 5
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("6")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 6
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("7")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 7
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</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>
										_G[self:GetName().."Text"]:SetText("8")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 8
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>
							<CheckButton name="$parent_Grp9" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Grp8" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										_G[self:GetName().."Text"]:SetText("9")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 9
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>
							<CheckButton name="$parent_Grp10" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Grp9" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										_G[self:GetName().."Text"]:SetText("10")
										self.tooltipText = XPERL_CONF_RAID_GROUP_DESC
										self.configBase = "XPerlDB.raid.group"
										self.configIndex = 10
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Frame name="$parent_Title2">
								<Size>
									<AbsDimension x="60" y="10"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="10" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Layers>
									<Layer level="ARTWORK">
										<FontString name="$parentText" inherits="GameFontNormalSmall" text="XPERL_CONF_CLASSES">
										<Color r="1" g="1" b="1" a="1" />
											<Anchors>
												<Anchor point="LEFT" />
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>

							<Frame name="$parent_ClassSel1" inherits="XPerl_OptClassSelTemplate" id="1">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Title2" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="-3" y="-3"/></Offset>
									</Anchor>
								</Anchors>
							</Frame>
							<Frame name="$parent_ClassSel2" inherits="XPerl_OptClassSelTemplate" id="2">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel1" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel3" inherits="XPerl_OptClassSelTemplate" id="3">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel2" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel4" inherits="XPerl_OptClassSelTemplate" id="4">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel3" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel5" inherits="XPerl_OptClassSelTemplate" id="5">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel4" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel6" inherits="XPerl_OptClassSelTemplate" id="6">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel5" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel7" inherits="XPerl_OptClassSelTemplate" id="7">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel6" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel8" inherits="XPerl_OptClassSelTemplate" id="8">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel7" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel9" inherits="XPerl_OptClassSelTemplate" id="9">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel8" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>
							<Frame name="$parent_ClassSel10" inherits="XPerl_OptClassSelTemplate" id="10">
								<Anchors><Anchor point="TOPLEFT" relativeTo="$parent_ClassSel9" relativePoint="BOTTOMLEFT"/></Anchors>
							</Frame>

							<Button name="$parent_All" inherits="XPerlButtonTemplate">
								<Size>
									<AbsDimension x="70" y="24"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Grp9" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="3" y="-22"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_SELECTALL")
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
									<OnClick>
										XPerl_Options_RaidSelectAll(self, 1)
									</OnClick>
								</Scripts>
							</Button>

							<Button name="$parent_None" inherits="XPerlButtonTemplate">
								<Size>
									<AbsDimension x="70" y="24"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_All" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="6" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_SELECTNONE")
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
									<OnClick>
										XPerl_Options_RaidSelectAll(self)
									</OnClick>
								</Scripts>
							</Button>

							<CheckButton name="$parent_ByClass" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_All" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="-3" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_SORTBYCLASS")
										self.configBase = "XPerlDB.raid"
										self.configIndex = "sortByClass"
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Alphabetical" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ByClass" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_ALPHABETICAL")
										self.configBase = "XPerlDB.raid"
										self.configIndex = "sortAlpha"
										self.configClick = function() XPerl_Raid_ChangeAttributes() XPerl_Raid_OptionActions() end
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_VSpacing" inherits="XPerlSlider">
								<Size>
									<AbsDimension x="150" y="16"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Alphabetical">
										<Offset>
											<AbsDimension x="4" y="-10" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(-5, 20)
										self:SetValueStep(1)
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_SPACING")
										XPerl_Options_RegisterProtected(self)
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.raid.spacing)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.raid.spacing ~= value) then
											XPerlDB.raid.spacing = value
											XPerl_Raid_ChangeAttributes()
											XPerl_RaidTitles()
										end
										_G[self:GetName().."Current"]:SetText(value)
									</OnValueChanged>
								</Scripts>
							</Slider>
						</Frames>
					</Frame>

					<Frame name="$parent_Custom">
						<Scripts>
							if (select(6, GetAddOnInfo("XPerl_CustomHighlight")) == "MISSING") then
								self:Hide()
							end
						</Scripts>
						<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
							<EdgeSize>
								<AbsValue val="6"/>
							</EdgeSize>
						</Backdrop>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Groups">
								<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>
							<CheckButton name="$parent_Enable" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset><AbsDimension x="4" y="-15"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_ENABLE")
										self.configBase = "XPerlDB.custom"
										self.configIndex = "enable"
										self.configClick = function()
											if (XPerl_Custom) then
												XPerl_Custom:PLAYER_ENTERING_WORLD()
											end
										end
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "Config")
											XPerl_Options_EnableSibling(self, "Alpha")
											XPerl_Options_EnableSibling(self, "Add")
											XPerl_Options_EnableSibling(self, "Blend")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Button name="$parent_Config" inherits="XPerlButtonTemplate">
								<Size>
									<AbsDimension x="70" y="24"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Enable" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_CONFIG")
									</OnLoad>
									<OnClick>
										XPerl_Custom_Config:Show()
									</OnClick>
								</Scripts>
							</Button>
							<Slider name="$parent_Alpha" inherits="XPerlSlider">
								<Size><AbsDimension x="150" y="20"/></Size>
								<Anchors>
									<Anchor point="LEFT" relativeTo="$parent_Enable" relativePoint="RIGHT">
										<Offset><AbsDimension x="80" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_ALPHA")
										self:SetMinMaxValues(0, 1)
										self:SetValueStep(0.05)
										_G[self:GetName().."Low"]:SetText("0%")
										_G[self:GetName().."High"]:SetText("100%")
									</OnLoad>
									<OnShow>
										self:SetValue(XPerlDB.custom and XPerlDB.custom.alpha or 0.5)
									</OnShow>
									<OnValueChanged>
										if (XPerlDB.custom) then
											XPerlDB.custom.alpha = self:GetValue()
											_G[self:GetName().."Current"]:SetFormattedText("%d%%", XPerlDB.custom.alpha * 100)
										end
									</OnValueChanged>
								</Scripts>
							</Slider>
							<CheckButton name="$parent_Add" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Alpha" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="-13"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(XPerlDB and XPerlDB.custom and XPerlDB.custom.blend == "ADD")
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_BLEND_ADD")
									</OnLoad>
									<OnClick>
										if (XPerlDB.custom) then
											XPerlDB.custom.blend = "ADD"
										end
										XPerl_Options_CheckRadio(self,{"Add", "Blend"})
									</OnClick>
								</Scripts>
							</CheckButton>
							<CheckButton name="$parent_Blend" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Add" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetChecked(XPerlDB and XPerlDB.custom and XPerlDB.custom.blend == "BLEND")
										XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_BLEND_BLEND")
									</OnLoad>
									<OnClick>
										if (XPerlDB.custom) then
											XPerlDB.custom.blend = "BLEND"
										end
										XPerl_Options_CheckRadio(self,{"Add", "Blend"})
									</OnClick>
								</Scripts>
							</CheckButton>							
						</Frames>
						<Layers>
							<Layer level="BORDER">
								<FontString inherits="GameFontNormalSmall" text="XPERL_CONF_RAID_CUSTOM">
									<Color r="1" g="1" b="1" a="1" />
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset><AbsDimension x="3" y="-3"/></Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</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_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALL_PORTRAIT")
								self.flashFrame = {XPerl_PlayerportraitFrame, XPerl_Player_PetportraitFrame, XPerl_TargetportraitFrame, XPerl_FocusportraitFrame, XPerl_party1portraitFrame, XPerl_party2portraitFrame, XPerl_party3portraitFrame, XPerl_party4portraitFrame}
								self.configClick = XPerl_OptionActions
								self.configSelection = {"XPerlDB.player", "XPerlDB.pet", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.party"}
								self.configIndex = "portrait"
							</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(self, "XPERL_CONF_ALL_PORTRAIT3D")
								self.flashFrame = {XPerl_PlayerportraitFrame, XPerl_Player_PetportraitFrame, XPerl_TargetportraitFrame, XPerl_FocusportraitFrame, XPerl_party1portraitFrame, XPerl_party2portraitFrame, XPerl_party3portraitFrame, XPerl_party4portraitFrame}
								self.configClick = XPerl_OptionActions
								self.configSelection = {"XPerlDB.player", "XPerlDB.pet", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.party"}
								self.configIndex = "portrait3D"
							</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(self, "XPERL_CONF_ALL_LEVEL")
								self.flashFrame = {XPerl_PlayerlevelFrame, XPerl_Player_PetlevelFrame, XPerl_TargetlevelFrame, XPerl_FocuslevelFrame, XPerl_TargetTargetlevelFrame, XPerl_TargetTargetTargetlevelFrame, XPerl_party1levelFrame, XPerl_party2levelFrame, XPerl_party3levelFrame, XPerl_party4levelFrame}
								self.configClick = XPerl_OptionActions
								self.configSelection = {"XPerlDB.player", "XPerlDB.pet", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.targettarget", "XPerlDB.party", "XPerlDB.pettarget", "XPerlDB.focustarget", "XPerlDB.targettargettarget"}
								self.configIndex = "level"
							</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(self, "XPERL_CONF_ALL_ICON")
								self.flashFrame = {XPerl_PlayerclassFrame, XPerl_TargettypeFramePlayerclassTexture, XPerl_FocustypeFramePlayerclassTexture, XPerl_party1levelFrameclassTexture, XPerl_party2levelFrameclassTexture, XPerl_party3levelFrameclassTexture, XPerl_party4levelFrameclassTexture}
								self.configSelection = {"XPerlDB.player", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.party"}
								self.configIndex = "classIcon"
								self.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(self, "XPERL_CONF_ALL_PVPFLAG")
								self.flashFrame = {XPerl_PlayernameFramepvpIcon, XPerl_TargetnameFramepvpIcon, XPerl_FocusnameFramepvpIcon, XPerl_TargetTargetnameFramepvpIcon, XPerl_TargetTargetTargetnameFramepvpIcon, XPerl_party1nameFramepvpIcon, XPerl_party2nameFramepvpIcon, XPerl_party3nameFramepvpIcon, XPerl_party4nameFramepvpIcon}
								self.configSelection = {"XPerlDB.player", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.party", "XPerlDB.targettarget", "XPerlDB.targettargettarget", "XPerlDB.pettarget", "XPerlDB.focustarget"}
								self.configIndex = "pvpIcon"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Values" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_PVPIcon" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALL_VALUES")
								self.flashFrame = {XPerl_PlayerstatsFramehealthBartext, XPerl_PlayerstatsFramemanaBartext, XPerl_PlayerstatsFramexpBartext, XPerl_TargetstatsFramehealthBartext, XPerl_TargetstatsFramemanaBartext, XPerl_FocusstatsFramehealthBartext, XPerl_FocusstatsFramemanaBartext, XPerl_TargetTargetstatsFramehealthBartext, XPerl_TargetTargetstatsFramemanaBartext, XPerl_TargetTargetTargetstatsFramehealthBartext, XPerl_TargetTargetTargetstatsFramemanaBartext, XPerl_party1statsFramehealthBartext, XPerl_party1statsFramemanaBartext, XPerl_party2statsFramehealthBartext, XPerl_party2statsFramemanaBartext, XPerl_party3statsFramehealthBartext, XPerl_party3statsFramemanaBartext, XPerl_party4statsFramehealthBartext, XPerl_party4statsFramemanaBartext}
								self.configSelection = {"XPerlDB.player", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.party", "XPerlDB.targettarget", "XPerlDB.targettargettarget", "XPerlDB.pettarget", "XPerlDB.focustarget"}
								self.configIndex = "values"
								self.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_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALL_PERCENT")
								self.flashFrame = {XPerl_PlayerstatsFramehealthBarpercent, XPerl_PlayerstatsFramemanaBarpercent, XPerl_PlayerstatsFramexpBarpercent, XPerl_TargetstatsFramehealthBarpercent, XPerl_TargetstatsFramemanaBarpercent, XPerl_FocusstatsFramehealthBarpercent, XPerl_FocusstatsFramemanaBarpercent, XPerl_TargetTargetstatsFramehealthBarpercent, XPerl_TargetTargetTargetstatsFramehealthBarpercent, XPerl_TargetTargetstatsFramemanaBarpercent, XPerl_TargetTargetTargetstatsFramemanaBarpercent, XPerl_party1statsFramehealthBarpercent, XPerl_party1statsFramemanaBarpercent, XPerl_party2statsFramehealthBarpercent, XPerl_party2statsFramemanaBarpercent, XPerl_party3statsFramehealthBarpercent, XPerl_party3statsFramemanaBarpercent, XPerl_party4statsFramehealthBarpercent, XPerl_party1statsFramemanaBarpercent, XPerl_party1statsFramehealthBarpercent, XPerl_party4statsFramemanaBarpercent}
								self.configSelection = {"XPerlDB.player", "XPerlDB.target", "XPerlDB.focus", "XPerlDB.party", "XPerlDB.targettarget", "XPerlDB.targettargettarget", "XPerlDB.pettarget", "XPerlDB.focustarget"}
								self.configIndex = "percent"
								self.configClick = XPerl_OptionActions
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Percent" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.getEnable = function() return XPerlDB.player.healerMode.enable end
								self.setEnable = function(n)
											XPerlDB.player.healerMode.enable = n
											XPerlDB.pettarget.healerMode.enable = n
											XPerlDB.target.healerMode.enable = n
											XPerlDB.targettarget.healerMode.enable = n
											XPerlDB.targettargettarget.healerMode.enable = n
											XPerlDB.focus.healerMode.enable = n
											XPerlDB.focustarget.healerMode.enable = n
											XPerlDB.party.healerMode.enable = n
											XPerlDB.raid.healerMode.enable = n
											XPerl_OptionActions()
										end
								self.getType = function() return XPerlDB.player.healerMode.type end
								self.setType = function(n)
											XPerlDB.player.healerMode.type = n
											XPerlDB.pettarget.healerMode.type = n
											XPerlDB.target.healerMode.type = n
											XPerlDB.targettarget.healerMode.type = n
											XPerlDB.targettargettarget.healerMode.type = n
											XPerlDB.focus.healerMode.type = n
											XPerlDB.focustarget.healerMode.type = n
											XPerlDB.party.healerMode.type = n
											XPerl_OptionActions()
										end
							</OnLoad>
						</Scripts>
					</Frame>

					<Slider name="$parent_Width" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="5" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ALL_WIDTHBONUS")
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlDB.player.size.width or 0)
							</OnShow>
							<OnValueChanged>
								if (XPerlDB.player.size.width ~= value) then
									XPerlDB.player.size.width = value
									XPerlDB.pet.size.width = value
									XPerlDB.pettarget.size.width = value
									XPerlDB.target.size.width = value
									XPerlDB.targettarget.size.width = value
									XPerlDB.targettargettarget.size.width = value
									XPerlDB.party.size.width = value
									XPerlDB.focus.size.width = value
									XPerlDB.focustarget.size.width = value

									if (XPerl_Player) then		XPerl_Player_SetWidth(XPerl_Player)		end
									if (XPerl_Player_Pet) then	XPerl_Player_Pet_SetWidth(XPerl_Player_Pet)	end
									if (XPerl_PetTarget) then	XPerl_TargetTarget_SetWidth(XPerl_PetTarget)	end
									if (XPerl_Target) then		XPerl_Target_SetWidth(XPerl_Target)		end
									if (XPerl_TargetTarget) then	XPerl_TargetTarget_SetWidth(XPerl_TargetTarget)	end
									if (XPerl_Focus) then		XPerl_Target_SetWidth(XPerl_Focus)		end
									if (XPerl_FocusTarget) then	XPerl_TargetTarget_SetWidth(XPerl_FocusTarget)	end
									if (XPerl_Party_Virtual) then
										for i = 1,4 do
											local f = _G["XPerl_party"..i]
											if (f) then
												XPerl_Party_SetWidth(f)
											end
											XPerl_Party_Virtual(true)
										end
									end

									_G[self:GetName().."Current"]:SetText(value)
								end
							</OnValueChanged>
						</Scripts>
					</Slider>

					<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(self, "XPERL_CONF_ADDON_PLAYER")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "PlayerPet")
											XPerl_Options_EnableSibling(self, "PlayerBuffs")
										end
									</OnLoad>
									<OnShow>
										self:SetChecked(IsAddOnLoaded("XPerl_Player"))
									</OnShow>
									<OnClick>
										if (self:GetChecked()) then
											EnableAddOn("XPerl_Player")
										else
											DisableAddOn("XPerl_Player")
										end
										self:Validate()
									</OnClick>
								</Scripts>
							</CheckButton>

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

							<CheckButton name="$parent_PlayerPet" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_PlayerBuffs" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_ADDON_PET")
									</OnLoad>
									<OnShow>
										self:SetChecked(IsAddOnLoaded("XPerl_PlayerPet"))
									</OnShow>
									<OnClick>
										if (self: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(self, "XPERL_CONF_ADDON_TARGET")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "TargetTarget")
										end
									</OnLoad>
									<OnShow>
										self:SetChecked(IsAddOnLoaded("XPerl_Target"))
									</OnShow>
									<OnClick>
										if (self:GetChecked()) then
											EnableAddOn("XPerl_Target")
										else
											DisableAddOn("XPerl_Target")
										end
										self:Validate()
									</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(self, "XPERL_CONF_ADDON_TARGETTARGET")
									</OnLoad>
									<OnShow>
										self:SetChecked(IsAddOnLoaded("XPerl_TargetTarget"))
									</OnShow>
									<OnClick>
										if (self: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(self, "XPERL_CONF_ADDON_PARTY")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "PartyPet")
										end
									</OnLoad>
									<OnShow>
										self:SetChecked(IsAddOnLoaded("XPerl_Party"))
									</OnShow>
									<OnClick>
										if (self:GetChecked()) then
											EnableAddOn("XPerl_Party")
										else
											DisableAddOn("XPerl_Party")
										end
										self:Validate()
									</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(self, "XPERL_CONF_ADDON_PARTYPET")
									</OnLoad>
									<OnShow>
										self:SetChecked(IsAddOnLoaded("XPerl_PartyPet"))
									</OnShow>
									<OnClick>
										if (self:GetChecked()) then
											EnableAddOn("XPerl_PartyPet")
										else
											DisableAddOn("XPerl_PartyPet")
										end
									</OnClick>
								</Scripts>
							</CheckButton>

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

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

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

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

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

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

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

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

											if (enable) then
												self:Enable()
											else
												self:Disable()
											end
										end
									</OnLoad>
									<OnUpdate>
										self: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>
					<Frame name="$parent_BarColours">
						<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="-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_COLOUR_BARS">
										<Color r="1" g="1" b="1" a="1" />
											<Anchors>
												<Anchor point="LEFT" />
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Button>

							<CheckButton name="$parent_Coloured" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="2" y="-2" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_NAMES")
										self.configBase = "XPerlDB.colour"
										self.configIndex = "class"
										self.configClick = XPerl_OptionActions
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "ApplyToGuild")
										end
									</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(self, "XPERL_CONF_COLOUR_APPLYTOGUILDLIST")
										self.configBase = "XPerlDB.colour"
										self.configIndex = "guildList"
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_ClassBar" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPRIGHT" relativeTo="$parent_ApplyToGuild" relativePoint="BOTTOM">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_CLASSBARS")
										self.configBase = "XPerlDB.colour"
										self.configIndex = "classbar"
										self.configClick = XPerl_OptionActions
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "Brightness")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Slider name="$parent_Brightness" inherits="XPerlSlider">
								<Size>
									<AbsDimension x="95" y="16"/>
								</Size>
								<Anchors>
									<Anchor point="LEFT" relativeTo="$parent_ClassBar" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="80" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetScale(0.8)

										local t = XPerl_Options_GetSibling("ClassBar",self)
										local t2 = _G[t:GetName().."Text"]
										self:SetPoint("LEFT", t, "RIGHT", (t2:GetStringWidth() + 10) / 0.8, 0)

										XPerl_SliderSetup(self)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_CLASSBARS_BRIGHT")
										_G[self:GetName().."Low"]:SetText("0.5")
										_G[self:GetName().."High"]:SetText("2")
										self:SetMinMaxValues(5, 200)
										self:SetValueStep(1)
									</OnLoad>
									<OnShow>
										self:SetValue(floor(((XPerlDB.colour.classbarBright or 1) + 0.005) * 100))
									</OnShow>
									<OnValueChanged>
										XPerlDB.colour.classbarBright = value / 100
										_G[self:GetName().."Current"]:SetText(string.format("%.2f", XPerlDB.colour.classbarBright))
										XPerl_ResetBarColourCache()
										XPerl_OptionActions()
									</OnValueChanged>
								</Scripts>
							</Slider>

							<CheckButton name="$parent_ClassicHealth" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ClassBar" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="0" y="6"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_CLASSIC")
										self.configBase = "XPerlDB.colour"
										self.configIndex = "classic"
										self.configClick = XPerl_OptionActions
									</OnLoad>
								</Scripts>
							</CheckButton>

							<Button name="$parent_ColourHealthBarEmpty" inherits="XPerlColorPickerTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ClassicHealth" relativePoint="BOTTOMLEFT">
										<Offset><AbsDimension x="5" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_HEALTHEMPTY")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.healthEmpty.r, XPerlDB.colour.bar.healthEmpty.g, XPerlDB.colour.bar.healthEmpty.b)
									</OnShow>
									<OnClick>
										XPerlDB.colour.classic = nil
										_G[self:GetParent():GetName().."_ClassicHealth"]:SetChecked(0)

										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.healthEmpty end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.healthEmpty.r = n.r
														XPerlDB.colour.bar.healthEmpty.g = n.g
														XPerlDB.colour.bar.healthEmpty.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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(self, "XPERL_CONF_COLOUR_HEALTHFULL")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.healthFull.r, XPerlDB.colour.bar.healthFull.g, XPerlDB.colour.bar.healthFull.b)
									</OnShow>
									<OnClick>
										XPerlDB.colour.classic = nil
										_G[self:GetParent():GetName().."_ClassicHealth"]:SetChecked(0)

										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.healthFull end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.healthFull.r = n.r
														XPerlDB.colour.bar.healthFull.g = n.g
														XPerlDB.colour.bar.healthFull.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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(self, "XPERL_CONF_COLOUR_MANA")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.mana.r, XPerlDB.colour.bar.mana.g, XPerlDB.colour.bar.mana.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.mana end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.mana.r = n.r
														XPerlDB.colour.bar.mana.g = n.g
														XPerlDB.colour.bar.mana.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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(self, "XPERL_CONF_COLOUR_ENERGY")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.energy.r, XPerlDB.colour.bar.energy.g, XPerlDB.colour.bar.energy.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.energy end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.energy.r = n.r
														XPerlDB.colour.bar.energy.g = n.g
														XPerlDB.colour.bar.energy.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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(self, "XPERL_CONF_COLOUR_RAGE")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.rage.r, XPerlDB.colour.bar.rage.g, XPerlDB.colour.bar.rage.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.rage end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.rage.r = n.r
														XPerlDB.colour.bar.rage.g = n.g
														XPerlDB.colour.bar.rage.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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(self, "XPERL_CONF_COLOUR_FOCUS")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.focus.r, XPerlDB.colour.bar.focus.g, XPerlDB.colour.bar.focus.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.focus end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.focus.r = n.r
														XPerlDB.colour.bar.focus.g = n.g
														XPerlDB.colour.bar.focus.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										XPerl_ColourPicker:Show()
									</OnClick>
								</Scripts>
							</Button>

							<Button name="$parent_ColourRunicBar" inherits="XPerlColorPickerTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_ColourFocusBar" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-2" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_RUNIC")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.bar.runic_power.r, XPerlDB.colour.bar.runic_power.g, XPerlDB.colour.bar.runic_power.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.bar.runic_power end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.bar.runic_power.r = n.r
														XPerlDB.colour.bar.runic_power.g = n.g
														XPerlDB.colour.bar.runic_power.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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="BOTTOMRIGHT">
										<Offset>
											<AbsDimension x="-10" y="10" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_RESET_MAIN")
									</OnLoad>
									<OnClick>
										XPerlDB.colour.bar = XPerl_DefaultBarColours()
										self:GetParent():Hide()
										self:GetParent():Show()
										XPerl_OptionActions()
									</OnClick>
								</Scripts>
							</Button>
						</Frames>
					</Frame>

					<Frame name="$parent_UnitReactions">
						<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
							<EdgeSize>
								<AbsValue val="6"/>
							</EdgeSize>
						</Backdrop>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_BarColours">
								<Offset><AbsDimension x="0" y="-10"/></Offset>
							</Anchor>
							<Anchor point="BOTTOMRIGHT" relativePoint="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_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="5" y="-6" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRIEND")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.reaction.friend.r, XPerlDB.colour.reaction.friend.g, XPerlDB.colour.reaction.friend.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.reaction.friend end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.reaction.friend.r = n.r
														XPerlDB.colour.reaction.friend.g = n.g
														XPerlDB.colour.reaction.friend.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										XPerl_ColourPicker:Show()
									</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(self, "XPERL_CONF_COLOUR_NEUTRAL")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.reaction.neutral.r, XPerlDB.colour.reaction.neutral.g, XPerlDB.colour.reaction.neutral.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.reaction.neutral end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.reaction.neutral.r = n.r
														XPerlDB.colour.reaction.neutral.g = n.g
														XPerlDB.colour.reaction.neutral.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										XPerl_ColourPicker:Show()
									</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(self, "XPERL_CONF_COLOUR_UNFRIENDLY")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.reaction.unfriendly.r, XPerlDB.colour.reaction.unfriendly.g, XPerlDB.colour.reaction.unfriendly.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.reaction.unfriendly end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.reaction.unfriendly.r = n.r
														XPerlDB.colour.reaction.unfriendly.g = n.g
														XPerlDB.colour.reaction.unfriendly.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										XPerl_ColourPicker:Show()
									</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(self, "XPERL_CONF_COLOUR_ENEMY")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.reaction.enemy.r, XPerlDB.colour.reaction.enemy.g, XPerlDB.colour.reaction.enemy.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.reaction.enemy end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.reaction.enemy.r = n.r
														XPerlDB.colour.reaction.enemy.g = n.g
														XPerlDB.colour.reaction.enemy.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										XPerl_ColourPicker:Show()
									</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(self, "XPERL_CONF_COLOUR_NONE")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.reaction.none.r, XPerlDB.colour.reaction.none.g, XPerlDB.colour.reaction.none.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.reaction.none end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.reaction.none.r = n.r
														XPerlDB.colour.reaction.none.g = n.g
														XPerlDB.colour.reaction.none.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										XPerl_Options:Hide()
										XPerl_ColourPicker:Show()
									</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(self, "XPERL_CONF_COLOUR_TAPPED")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.reaction.tapped.r, XPerlDB.colour.reaction.tapped.g, XPerlDB.colour.reaction.tapped.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.reaction.tapped end
										XPerl_ColourPicker.varSet = function(n)
														XPerlDB.colour.reaction.tapped.r = n.r
														XPerlDB.colour.reaction.tapped.g = n.g
														XPerlDB.colour.reaction.tapped.b = n.b
													end
										XPerl_ColourPicker.alpha = nil
										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="BOTTOMRIGHT">
										<Offset>
											<AbsDimension x="-10" y="10" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_RESET_REACTION")
									</OnLoad>
									<OnClick>
										XPerlDB.colour.reaction = XPerl_DefaultReactionColours()
										self:GetParent():Hide()
										self:GetParent():Show()
										XPerl_OptionActions()
									</OnClick>
								</Scripts>
							</Button>
						</Frames>
					</Frame>

					<Frame name="$parent_Appearance">
						<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
							<EdgeSize>
								<AbsValue val="6"/>
							</EdgeSize>
						</Backdrop>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="5" y="-5"/></Offset>
							</Anchor>
							<Anchor point="BOTTOMRIGHT" relativePoint="CENTER" relativeTo="XPerl_Options_Area_Tabs">
								<Offset><AbsDimension x="-5" y="-5"/></Offset>
							</Anchor>
						</Anchors>

						<Frames>
							<Button name="$parent_Title">
								<Size>
									<AbsDimension x="60" y="20"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
										<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="5" y="-2" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_GLOBAL_BORDERS")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.border.r, XPerlDB.colour.border.g, XPerlDB.colour.border.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.border end
										XPerl_ColourPicker.varSet = function(n)
												XPerlDB.colour.border.r = n.r
												XPerlDB.colour.border.g = n.g
												XPerlDB.colour.border.b = n.b
												XPerlDB.colour.border.a = n.a
											end
										XPerl_ColourPicker.alpha = true
										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(self, "XPERL_CONF_GLOBAL_BACKGROUND")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.frame.r, XPerlDB.colour.frame.g, XPerlDB.colour.frame.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.frame end
										XPerl_ColourPicker.varSet = function(n)
												XPerlDB.colour.frame.r = n.r
												XPerlDB.colour.frame.g = n.g
												XPerlDB.colour.frame.b = n.b
												XPerlDB.colour.frame.a = n.a
											end
										XPerl_ColourPicker.alpha = true
										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>
										self:SetMinMaxValues(0,100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self, true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FRAME_TRANSPARENCY")
									</OnLoad>
									<OnShow>
										self:SetValue(floor(100 * XPerlDB.transparency.frame + 0.5))
									</OnShow>
									<OnValueChanged>
										if (value ~= floor(100 * XPerlDB.transparency.frame + 0.5)) then
											XPerlDB.transparency.frame = value / 100
											XPerl_SetAllFrames()
										end
										_G[self:GetName().."Current"]:SetText(floor(value + 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>
										self:SetMinMaxValues(0,100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self, true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_TEXT_TRANSPARENCY")
									</OnLoad>
									<OnShow>
										self:SetValue(floor(100 * XPerlDB.transparency.text + 0.5))
									</OnShow>
									<OnValueChanged>
										if (value ~= floor(100 * XPerlDB.transparency.text + 0.5)) then
											XPerlDB.transparency.text = value / 100
											XPerl_SetTextTransparency()
										end
										_G[self:GetName().."Current"]:SetText(floor(value + 0.5).."%")
									</OnValueChanged>
								</Scripts>
							</Slider>

							<Slider name="$parent_Scale" inherits="XPerlSlider">
								<Anchors>
									<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_TextTransparency">
										<Offset>
											<AbsDimension x="0" y="-23" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:SetMinMaxValues(100, 400)
										self:SetValueStep(25)
										XPerl_SliderSetup(self, true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_MAXIMUM_SCALE")
									</OnLoad>
									<OnShow>
										self:SetValue(floor(XPerlDB.maximumScale * 100 + 0.5))
									</OnShow>
									<OnValueChanged>
										if (floor(XPerlDB.maximumScale * 100 + 0.5) ~= value) then
											XPerlDB.maximumScale = value / 100
											XPerl_Options_MaxScaleSet()
										end
										_G[self:GetName().."Current"]:SetText(floor(value + 0.5).."%")
									</OnValueChanged>
								</Scripts>
							</Slider>

							<Button name="$parent_Reset" inherits="XPerlButtonTemplate">
								<FontString inherits="GameFontNormalSmall"/>
								<Size>
									<AbsDimension x="70" y="24"/>
								</Size>
								<Anchors>
									<Anchor point="BOTTOMRIGHT">
										<Offset>
											<AbsDimension x="-10" y="10" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_FRAME_APPEARANCE_RESET")
									</OnLoad>
									<OnClick>
										XPerl_DefaultFrameAppearance()
										self:GetParent():Hide()
										self:GetParent():Show()
										XPerl_OptionActions()
									</OnClick>
								</Scripts>
							</Button>
						</Frames>
					</Frame>

					<Frame name="$parent_FrameColours">
						<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
							<EdgeSize>
								<AbsValue val="6"/>
							</EdgeSize>
						</Backdrop>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_Appearance">
								<Offset><AbsDimension x="0" y="-10"/></Offset>
							</Anchor>
							<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM" 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_COLOUR_FRAMES">
										<Color r="1" g="1" b="1" a="1" />
											<Anchors>
												<Anchor point="LEFT" />
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Button>

							<CheckButton name="$parent_Gradient" inherits="XPerlCheckButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Title" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="2" y="-2" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRAMES_GRADIENT")
										self.configBase = "XPerlDB.colour.gradient"
										self.configIndex = "enable"
										self.configClick = function()
													XPerl_OptionActions()
												end
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "Vertical")
											XPerl_Options_EnableSibling(self, "Horizontal")
											XPerl_Options_EnableSibling(self, "Start")
											XPerl_Options_EnableSibling(self, "End")
										end
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Vertical" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Gradient" relativePoint="BOTTOMRIGHT">
										<Offset><AbsDimension x="0" y="8"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRAMES_VERTICAL")
										self.configClick = function()
													XPerl_OptionActions()
												end
									</OnLoad>
									<OnShow>
										self:SetChecked(not XPerlDB.colour.gradient.horizontal)
									</OnShow>
									<OnClick>
										XPerlDB.colour.gradient.horizontal = nil
										XPerl_OptionActions()
										XPerl_Options_CheckRadio(self,{"Vertical", "Horizontal"})
									</OnClick>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_Horizontal" inherits="XPerlRadioButtonTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Vertical" relativePoint="TOPRIGHT">
										<Offset><AbsDimension x="40" y="0"/></Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRAMES_HORIZONTAL")
										self.configClick = function()
													XPerl_Options:Hide()
													XPerl_Options:Show()
													XPerl_OptionActions()
												end
									</OnLoad>
									<OnShow>
										self:SetChecked(XPerlDB.colour.gradient.horizontal)
									</OnShow>
									<OnClick>
										XPerlDB.colour.gradient.horizontal = 1
										XPerl_OptionActions()
										XPerl_Options_CheckRadio(self,{"Vertical", "Horizontal"})
									</OnClick>
								</Scripts>
							</CheckButton>

							<Button name="$parent_Start" inherits="XPerlColorPickerTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Vertical" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-5" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRAMES_GRADSTART")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.gradient.s.r, XPerlDB.colour.gradient.s.g, XPerlDB.colour.gradient.s.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.gradient.s end
										XPerl_ColourPicker.varSet = function(n)
													XPerlDB.colour.gradient.s = n
													XPerl_OptionActions()
												end
										XPerl_ColourPicker.alpha = true
										XPerl_ColourPicker:Show()
									</OnClick>
								</Scripts>
							</Button>

							<Button name="$parent_End" inherits="XPerlColorPickerTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="$parent_Start" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="0" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRAMES_GRADEND")
									</OnLoad>
									<OnShow>
										local f = _G[self:GetName().."_Colour"]
										f:SetVertexColor(XPerlDB.colour.gradient.e.r, XPerlDB.colour.gradient.e.g, XPerlDB.colour.gradient.e.b)
									</OnShow>
									<OnClick>
										XPerlLocked = 1
										XPerl_ColourPicker.ParentFrame = XPerl_Options
										XPerl_ColourPicker.varGet = function() return XPerlDB and XPerlDB.colour.gradient.e end
										XPerl_ColourPicker.varSet = function(n)
													XPerlDB.colour.gradient.e = n
													XPerl_OptionActions()
												end
										XPerl_ColourPicker.alpha = true
										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="BOTTOMRIGHT">
										<Offset>
											<AbsDimension x="-10" y="10" />
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										XPerl_OptionsSetMyText(self, "XPERL_CONF_COLOUR_FRAMES_RESET")
									</OnLoad>
									<OnClick>
										XPerlDB.colour.gradient = XPerl_DefaultGradientColours()
										self:GetParent():Hide()
										self: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(self, "XPERL_CONF_RAIDHELP_ENABLE")
								self.XconfigVar = "RaidHelper"
								self.configClick = function()
											XPerl_EnableDisable()
											XPerl_Options:Hide()
											XPerl_Options:Show()
										   end

								self.Validate = function()
									XPerl_Options_EnableSibling(self, "CTTargets")
									XPerl_Options_EnableSibling(self, "BlizzTargets")
									XPerl_Options_EnableSibling(self, "NoAuto")
									XPerl_Options_EnableSibling(self, "Tooltips")
									XPerl_Options_EnableSibling(self, "GrowUp")
									XPerl_Options_EnableSibling(self, "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Healer_DeficitOnly", "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Healer_DeficitMax", "Healer_Healer")
									XPerl_Options_EnableSibling(self, "Healer_CurMaxDeficit", "Healer_Healer")
									XPerl_Options_EnableSibling(self, "MaxTanks")
									XPerl_Options_EnableSibling(self, "UnitWidth")
									XPerl_Options_EnableSibling(self, "UnitHeight")
									XPerl_Options_EnableSibling(self, "Transparency")
									XPerl_Options_EnableSibling(self, "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(self, "XPERL_CONF_RAIDHELP_CTTARGETS")
								self.XconfigVar = "UseCTRATargets"
								self.configClick = XPerl_MTRosterChanged
								XPerl_Options_RegisterProtected(self)
							</OnLoad>
						</Scripts>
					</CheckButton>

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

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

					<CheckButton name="$parent_GrowUp" 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(self, "XPERL_CONF_RAIDHELP_GROWUP")
								self.XconfigVar = "MTListUpward"
								self.configClick = XPerl_MakeTankList
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Frame name="$parent_Healer" inherits="XPerl_Options_HealerModeTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_GrowUp" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.hideOptions = "2"
								self.getEnable = function() return XPerlDB.player.healerMode.enable end
								self.setEnable = function(n)
											XPerlConfigHelper.HealerMode = n
											XPerl_MakeTankList()
										end
								self.getType = function() return XPerlDB.player.healerMode.type end
								self.setType = function(n)
											XPerlConfigHelper.HealerModeType = n
											XPerl_MakeTankList()
										end
								self:SetScale(0.9)
							</OnLoad>
						</Scripts>
					</Frame>

					<Slider name="$parent_MaxTanks" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="155" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Healer" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="-10" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(1, 10)
								self:SetValueStep(1)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAIDHELP_MAXTANKS")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlConfigHelper.MaxMainTanks)
							</OnShow>
							<OnValueChanged>
								if (XPerlConfigHelper.MaxMainTanks ~= value) then
									XPerlConfigHelper.MaxMainTanks = value
									XPerl_MakeTankList()
									XPerl_SetTitle()
								end
								_G[self: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>
								if (XPERL_UNIT_WIDTH_MIN) then
									self:SetMinMaxValues(XPERL_UNIT_WIDTH_MIN, XPERL_UNIT_WIDTH_MAX)
								else
									self:SetMinMaxValues(50, 125)
								end
								self:SetValueStep(5)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAIDHELP_UNITWIDTH")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlConfigHelper.UnitWidth)
							</OnShow>
							<OnValueChanged>
								if (XPerlConfigHelper.UnitWidth ~= value) then
									XPerlConfigHelper.UnitWidth = value
									XPerl_MTList_ApplyUnitSizes()
									XPerl_SetFrameSizes()
								end
								_G[self: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>
								if (XPERL_UNIT_HEIGHT_MIN) then
									self:SetMinMaxValues(XPERL_UNIT_HEIGHT_MIN, XPERL_UNIT_HEIGHT_MAX)
								else
									self:SetMinMaxValues(17, 30)
								end
								self:SetValueStep(1)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAIDHELP_UNITHEIGHT")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlConfigHelper.UnitHeight)
							</OnShow>
							<OnValueChanged>
								if (XPerlConfigHelper.UnitHeight ~= value) then
									XPerlConfigHelper.UnitHeight = value
									XPerl_MTList_ApplyUnitSizes()
									XPerl_SetFrameSizes()
								end
								_G[self:GetName().."Current"]:SetText(XPerlConfigHelper.UnitHeight)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_Transparency" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="155" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent_UnitWidth">
								<Offset><AbsDimension x="0" y="-19"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self, true)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAIDHELP_ALPHA")
							</OnLoad>
							<OnShow>
								self:SetValue(floor(XPerlConfigHelper.Targets_Transparency * 100))
							</OnShow>
							<OnValueChanged>
								if (XPerlConfigHelper.Targets_Transparency ~= value / 100) then
									XPerlConfigHelper.Targets_Transparency = value / 100
									XPerl_Frame:SetAlpha(XPerlConfigHelper.Targets_Transparency)
								end
								_G[self:GetName().."Current"]:SetText(value.."%")
							</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>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self, true)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAIDHELP_BACKALPHA")
							</OnLoad>
							<OnShow>
								self:SetValue(floor(XPerlConfigHelper.Background_Transparency * 100))
							</OnShow>
							<OnValueChanged>
								if (XPerlConfigHelper.Background_Transparency ~= value / 100) then
									XPerlConfigHelper.Background_Transparency = value / 100
									if (XPerl_Frame) then
										XPerl_SetupFrameSimple(XPerl_Frame, XPerlConfigHelper.Background_Transparency)
									end
								end
								_G[self:GetName().."Current"]:SetText(value.."%")
							</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(self, "XPERL_CONF_RAIDHELP_TOOLTIPS")
								self.XconfigVar = "Tooltips"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "TooltipTarget", XPerl_Options_Helper_Options_Enabled)
									XPerl_Options_EnableSibling(self, "TooltipTank", XPerl_Options_Helper_Options_Enabled)
									XPerl_Options_EnableSibling(self, "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(self, "XPERL_CONF_RAIDHELP_TOOLTIPS_TARGET")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlConfigHelper.TooltipsWhich == 0)
							</OnShow>
							<OnClick>
								XPerlConfigHelper.TooltipsWhich = 0
								XPerl_Options_CheckRadio(self,{"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(self, "XPERL_CONF_RAIDHELP_TOOLTIPS_TANK")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlConfigHelper.TooltipsWhich == 1)
							</OnShow>
							<OnClick>
								XPerlConfigHelper.TooltipsWhich = 1
								XPerl_Options_CheckRadio(self,{"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(self, "XPERL_CONF_RAIDHELP_TOOLTIPS_BOTH")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlConfigHelper.TooltipsWhich == 2)
							</OnShow>
							<OnClick>
								XPerlConfigHelper.TooltipsWhich = 2
								XPerl_Options_CheckRadio(self,{"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(self, "XPERL_CONF_TARGET_COUNTERS")
										self.Validate = function()
											XPerl_Options_EnableSibling(self, "TargetCountersSelf")
											XPerl_Options_EnableSibling(self, "Enemy")
											XPerl_Options_EnableSibling(self, "ShowCounters")
											XPerl_Options_EnableSibling(self, "AggroWarning")
											XPerl_Options_EnableSibling(self, "Transparency")
											XPerl_Options_EnableSibling(self, "BackTransparency")
										end
										self.XconfigVar = "TargetCounters"
										self.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(self, "XPERL_CONF_TARGET_COUNTERSSELF")
										self.XconfigVar = "TargetCountersSelf"
										self.configClick = XPerl_UpdateAssists
									</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(self, "XPERL_CONF_TARGET_COUNTERSENEMY")
										self.XconfigVar = "TargetCountersEnemy"
										self.configClick = XPerl_UpdateAssists
									</OnLoad>
								</Scripts>
							</CheckButton>

							<CheckButton name="$parent_ShowCounters" 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(self, "XPERL_CONF_TARGET_SHOWCOUNTERS")
										self.XconfigVar = "ShowTargetCounters"
										self.configClick = XPerl_UpdateAssists
									</OnLoad>
								</Scripts>
							</CheckButton>

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

							<Slider name="$parent_Transparency" 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>
										self:SetMinMaxValues(0, 100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self, true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_ASSIST_ALPHA")
									</OnLoad>
									<OnShow>
										self:SetValue(floor(XPerlConfigHelper.AssistsFrame_Transparency * 100))
									</OnShow>
									<OnValueChanged>
										if (XPerlConfigHelper.AssistsFrame_Transparency ~= value / 100) then
											XPerlConfigHelper.AssistsFrame_Transparency = value / 100
											XPerl_SetupFrames()
										end
										_G[self:GetName().."Current"]:SetText(value.."%")
									</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>
										self:SetMinMaxValues(0, 100)
										self:SetValueStep(1)
										XPerl_SliderSetup(self, true)
										XPerl_OptionsSetMyText(self, "XPERL_CONF_ASSIST_BACKALPHA")
									</OnLoad>
									<OnShow>
										self:SetValue(floor(XPerlConfigHelper.Assists_BackTransparency * 100))
									</OnShow>
									<OnValueChanged>
										if (XPerlConfigHelper.Assists_BackTransparency ~= value / 100) then
											XPerlConfigHelper.Assists_BackTransparency = value / 100
											if (XPerl_Assists_Frame) then
												XPerl_SetupFrameSimple(XPerl_Assists_Frame, XPerlConfigHelper.Assists_BackTransparency)
											end
										end
										_G[self:GetName().."Current"]:SetText(value.."%")
									</OnValueChanged>
								</Scripts>
							</Slider>
						</Frames>
					</Frame>
				</Frames>
			</Frame>

			<Frame name="$parent_Monitor_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="5" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_ENABLE")
								self.XconfigVars = "XPerlRaidMonConfig"
								self.XconfigVar = "enabled"
								self.Validate = function()
									XPerl_Options_EnableSibling(self, "Priest")
									XPerl_Options_EnableSibling(self, "Druid")
									XPerl_Options_EnableSibling(self, "Shaman")
									XPerl_Options_EnableSibling(self, "Paladin")
									XPerl_Options_EnableSibling(self, "Mage")
									XPerl_Options_EnableSibling(self, "Warlock")
									XPerl_Options_EnableSibling(self, "Hunter")
									XPerl_Options_EnableSibling(self, "Rogue")
									XPerl_Options_EnableSibling(self, "Warrior")
									XPerl_Options_EnableSibling(self, "LowMana")
									XPerl_Options_EnableSibling(self, "HighMana")
									XPerl_Options_EnableSibling(self, "UnitWidth")
									XPerl_Options_EnableSibling(self, "UnitHeight")
									XPerl_Options_EnableSibling(self, "TargetWidth")
									XPerl_Options_EnableSibling(self, "GrowUp")
									XPerl_Options_EnableSibling(self, "Tooltips")
									XPerl_Options_EnableSibling(self, "Alpha")
									XPerl_Options_EnableSibling(self, "BackgroundAlpha")
								end
								self.configClick = function()	XPerl_RaidMonitor_Frame:Init()	end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Priest" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOP" relativeTo="$parent_Enable" relativePoint="BOTTOMRIGHT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_PRIEST")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.PRIEST)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.PRIEST = not XPerlRaidMonConfig.classes.PRIEST
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Druid" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Priest" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_DRUID")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.DRUID)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.DRUID = not XPerlRaidMonConfig.classes.DRUID
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Shaman" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Druid" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_SHAMAN")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.SHAMAN)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.SHAMAN = not XPerlRaidMonConfig.classes.SHAMAN
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Paladin" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Shaman" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_PALADIN")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.PALADIN)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.PALADIN = not XPerlRaidMonConfig.classes.PALADIN
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Mage" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Paladin" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_MAGE")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.MAGE)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.MAGE = not XPerlRaidMonConfig.classes.MAGE
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Warlock" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Mage" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_WARLOCK")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.WARLOCK)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.WARLOCK = not XPerlRaidMonConfig.classes.WARLOCK
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Hunter" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Warlock" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_HUNTER")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.HUNTER)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.HUNTER = not XPerlRaidMonConfig.classes.HUNTER
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Rogue" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Hunter" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_ROGUE")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.ROGUE)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.ROGUE = not XPerlRaidMonConfig.classes.ROGUE
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Warrior" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Rogue" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_WARRIOR")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.WARRIOR)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.WARRIOR = not XPerlRaidMonConfig.classes.WARRIOR
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_DeathKnight" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Warrior" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="6"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_DEATHKNIGHT")
							</OnLoad>
							<OnShow>
								self:SetChecked(XPerlRaidMonConfig.classes.DEATHKNIGHT)
							</OnShow>
							<OnClick>
								XPerlRaidMonConfig.classes.DEATHKNIGHT = not XPerlRaidMonConfig.classes.DEATHKNIGHT
								XPerl_RaidMonitor_Frame:Init()
							</OnClick>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_LowMana" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="75" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_DeathKnight" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-10"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(5)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_LOWMANA")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlRaidMonConfig.LowMana)
							</OnShow>
							<OnValueChanged>
								if (XPerlRaidMonConfig.LowMana ~= value) then
									XPerlRaidMonConfig.LowMana = value
								end
								_G[self:GetName().."Current"]:SetText(XPerlRaidMonConfig.LowMana)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_HighMana" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="75" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_LowMana" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="5" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(5)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_HIGHMANA")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlRaidMonConfig.HighMana)
							</OnShow>
							<OnValueChanged>
								if (XPerlRaidMonConfig.HighMana ~= value) then
									XPerlRaidMonConfig.HighMana = value
								end
								_G[self:GetName().."Current"]:SetText(XPerlRaidMonConfig.HighMana)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_UnitWidth" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="75" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_LowMana" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-28"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(XPERL_RAIDMON_UNIT_WIDTH_MIN or 50, XPERL_RAIDMON_UNIT_WIDTH_MAX or 150)
								self:SetValueStep(5)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_UNITWIDTH")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlRaidMonConfig.UnitWidth)
							</OnShow>
							<OnValueChanged>
								if (XPerlRaidMonConfig.UnitWidth ~= value) then
									XPerlRaidMonConfig.UnitWidth = value
									XPerl_RaidMonitor_Frame:SetUnitSizes()
									XPerl_RaidMonitor_Frame:SetFrameSizes()
								end
								_G[self:GetName().."Current"]:SetText(XPerlRaidMonConfig.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>
								self:SetMinMaxValues(XPERL_RAIDMON_UNIT_HEIGHT_MIN or 9, XPERL_RAIDMON_UNIT_HEIGHT_MAX or 20)
								self:SetValueStep(1)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_UNITHEIGHT")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlRaidMonConfig.UnitHeight)
							</OnShow>
							<OnValueChanged>
								if (XPerlRaidMonConfig.UnitHeight ~= value) then
									XPerlRaidMonConfig.UnitHeight = value
									XPerl_RaidMonitor_Frame:SetUnitSizes()
									XPerl_RaidMonitor_Frame:SetFrameSizes()
								end
								_G[self:GetName().."Current"]:SetText(XPerlRaidMonConfig.UnitHeight)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_TargetWidth" inherits="XPerlSlider">
						<Size>
							<AbsDimension x="75" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_UnitHeight" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="5" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(XPERL_RAIDMON_TARGET_WIDTH_MIN or 50, XPERL_RAIDMON_TARGET_WIDTH_MAX or 150)
								self:SetValueStep(5)
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_TARGETWIDTH")
							</OnLoad>
							<OnShow>
								self:SetValue(XPerlRaidMonConfig.TargetWidth)
							</OnShow>
							<OnValueChanged>
								if (XPerlRaidMonConfig.TargetWidth ~= value) then
									XPerlRaidMonConfig.TargetWidth = value
									XPerl_RaidMonitor_Frame:SetUnitSizes()
									XPerl_RaidMonitor_Frame:SetFrameSizes()
								end
								_G[self:GetName().."Current"]:SetText(XPerlRaidMonConfig.TargetWidth)
							</OnValueChanged>
						</Scripts>
					</Slider>

					<CheckButton name="$parent_GrowUp" inherits="XPerlCheckButtonTemplate">
						<Size><AbsDimension x="26" y="26"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_UnitWidth" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-10"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_Options_RegisterProtected(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_GROWUP")
								self.configBase = "XPerlRaidMonConfig"
								self.configIndex = "GrowUp"
								self.configClick = function()
									XPerl_RaidMonitor_Frame:Init()
									XPerl_RaidMonitor_Frame:SetFrameSizes()
								end
							</OnLoad>
						</Scripts>
					</CheckButton>

					<CheckButton name="$parent_Tooltips" inherits="XPerlCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP">
								<Offset><AbsDimension x="0" y="-3"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_TOOLTIPS")
								self.configBase = "XPerlRaidMonConfig"
								self.configIndex = "Tooltips"
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider name="$parent_Alpha" inherits="XPerlSlider">
						<Size><AbsDimension x="160" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Tooltips" relativePoint="BOTTOMLEFT">
								<Offset><AbsDimension x="0" y="-10"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0,100)
								self:SetValueStep(1)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_ALPHA")
								XPerl_SliderSetup(self)
							</OnLoad>
							<OnShow>
								self:SetValue(floor(100 * XPerlRaidMonConfig.Alpha + 0.5))
							</OnShow>
							<OnValueChanged>
								if (floor(100 * XPerlRaidMonConfig.Alpha + 0.5) ~= value) then
									XPerlRaidMonConfig.Alpha = value / 100
									XPerl_RaidMonitor_Frame:SetupAlpha()
								end
								_G[self:GetName().."Current"]:SetText(floor(100 * XPerlRaidMonConfig.Alpha + 0.5).."%")
							</OnValueChanged>
						</Scripts>
					</Slider>

					<Slider name="$parent_BackgroundAlpha" inherits="XPerlSlider">
						<Size><AbsDimension x="160" y="16"/></Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Alpha" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-28"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetMinMaxValues(0,100)
								self:SetValueStep(1)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_MONITOR_BGALPHA")
								XPerl_SliderSetup(self)
							</OnLoad>
							<OnShow>
								self:SetValue(floor(100 * XPerlRaidMonConfig.BackgroundAlpha + 0.5))
							</OnShow>
							<OnValueChanged>
								if (floor(100 * XPerlRaidMonConfig.BackgroundAlpha + 0.5) ~= value) then
									XPerlRaidMonConfig.BackgroundAlpha = value / 100
									XPerl_RaidMonitor_Frame:SetupAlpha()
								end
								_G[self:GetName().."Current"]:SetText(floor(100 * XPerlRaidMonConfig.BackgroundAlpha + 0.5).."%")
							</OnValueChanged>
						</Scripts>
					</Slider>

				</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(self, "XPERL_CONF_ADMIN_AUTOHIDESHOW")
								self.XconfigVars = "XPerl_Admin"
								self.XconfigVar = "AutoHideShow"
								self.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>
								self:SetMinMaxValues(0, 100)
								self:SetValueStep(1)
								XPerl_SliderSetup(self)
								XPerl_OptionsSetMyText(self, "XPERL_CONF_ADMIN_ALPHA")
							</OnLoad>
							<OnShow>
								self:SetValue(floor(100 * XPerl_Admin.Transparency + 0.5))
							</OnShow>
							<OnValueChanged>
								if (floor(100 * XPerl_Admin.Transparency + 0.5) ~= value) then
									XPerl_Admin.Transparency = value / 100
									if (XPerl_AdminSetupFrames) then
										XPerl_AdminSetupFrames()
									end
								end
								_G[self:GetName().."Current"]:SetText(floor(100 * XPerl_Admin.Transparency + 0.5).."%")
							</OnValueChanged>
						</Scripts>
					</Slider>
				</Frames>
			</Frame>
		</Frames>
	</Frame>

	<Button name="XPerlCustomLineTemplate" virtual="true">
		<NormalFont style="GameFontNormalSmall"/>
		<ButtonText name="$parentText" justifyH="LEFT" setAllPoints="true">
			<Color r="1" g="1" b="1"/>
		</ButtonText>
		<Size>
			<AbsDimension x="190" y="12"/>
		</Size>
		<Scripts>
			<OnLoad>
				self.master = self:GetParent()
				if (not self.master.line) then
					self.master.line = {}
				end
				self.master.line[self:GetID()] = self
			</OnLoad>
			<OnShow>
				XPerl_Options_Custom_Buttons(XPerl_Custom_Config)
			</OnShow>
			<OnClick>
				self.master.selection = self:GetID() + self.master.start - 1
				self.master:FillList()
				self.master:OnClick(self)
				XPerl_Options_Custom_Buttons(XPerl_Custom_Config)
			</OnClick>
			<OnMouseWheel>
				local arg1 = delta
				if (arg1 > 0) then
					self.master.scrollBar.bar:SetValue(self.master.scrollBar.bar:GetValue() - 2)
				else
					self.master.scrollBar.bar:SetValue(self.master.scrollBar.bar:GetValue() + 2)
				end
			</OnMouseWheel>
		</Scripts>
		<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
	</Button>
	
	<Frame name="XPerlCustomListTemplate" virtual="true">
		<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="9"/>
			</EdgeSize>
		</Backdrop>
		<Size>
			<AbsDimension x="200" y="130"/>
		</Size>
		<Scripts>
			<OnMouseWheel>
				local arg1 = delta
				if (arg1 > 0) then
					self.scrollBar.bar:SetValue(self.scrollBar.bar:GetValue() - 2)
				else
					self.scrollBar.bar:SetValue(self.scrollBar.bar:GetValue() + 2)
				end
				self:FillList()
			</OnMouseWheel>
			<OnShow>
				self:FillList()
			</OnShow>
		</Scripts>
		<Layers>
			<Layer level="BORDER">
				<FontString name="$parenttitle" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="-12" />
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="0" y="0" />
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parent1" inherits="XPerlCustomLineTemplate" text="Line" id="1">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="4" y="-3"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent2" inherits="XPerlCustomLineTemplate" text="Line" id="2">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent1" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent3" inherits="XPerlCustomLineTemplate" text="Line" id="3">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent2" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent4" inherits="XPerlCustomLineTemplate" text="Line" id="4">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent3" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent5" inherits="XPerlCustomLineTemplate" text="Line" id="5">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent4" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent6" inherits="XPerlCustomLineTemplate" text="Line" id="6">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent5" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent7" inherits="XPerlCustomLineTemplate" text="Line" id="7">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent6" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent8" inherits="XPerlCustomLineTemplate" text="Line" id="8">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent7" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent9" inherits="XPerlCustomLineTemplate" text="Line" id="9">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent8" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<Button name="$parent10" inherits="XPerlCustomLineTemplate" text="Line" id="10">
				<Anchors><Anchor point="TOPLEFT" relativeTo="$parent9" relativePoint="BOTTOMLEFT"/></Anchors>
			</Button>
			<ScrollFrame name="$parentscrollBar" inherits="FauxScrollFrameTemplate">
				<Size>
					<AbsDimension x="20" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" relativeTo="$parent1">
						<Offset>
							<AbsDimension x="-20" y="1"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
				<Scripts>
					<OnVerticalScroll>
						FauxScrollFrame_OnVerticalScroll(self, offset, 1, function() self:GetParent():FillList() end)
					</OnVerticalScroll>
					<OnMouseWheel>
						local arg1 = delta
						local f = _G[self:GetName().."ScrollBar"]
						if (arg1 > 0) then
							f:SetValue(f:GetValue() + 3)
						else
							f:SetValue(f:GetValue() - 3)
						end

						GetParent():FillList()
					</OnMouseWheel>
				</Scripts>
			</ScrollFrame>
		</Frames>
	</Frame>
	
	<Frame name="XPerl_Custom_Config" frameStrata="DIALOG" inherits="XPerl_OptionsTemplateNaked" parent="UIParent" hidden="true">
		<Scripts>
			<OnShow>
				XPerl_Custom_Config_OnShow(self)
			</OnShow>
			<OnHide>
				XPerl_Options_Mask:Hide()
				XPerl_Options_Custom_CleanupIconDB(self)
			</OnHide>
		</Scripts>
		<Anchors>
			<Anchor point="TOP" relativeTo="XPerl_Options">
				<Offset><AbsDimension x="0" y="-100"/></Offset>
			</Anchor>
		</Anchors>
		<Size>
			<AbsDimension x="425" y="195"/>
		</Size>
		<Frames>
			<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="3" y="2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide()
					</OnClick>
				</Scripts>
			</Button>
		
			<Frame name="$parentzoneList" inherits="XPerlCustomListTemplate">
				<Scripts>
					<OnLoad>
						XPerl_Options_Custom_InitList(self, "zone")
					</OnLoad>
				</Scripts>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-25"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>

			<Frame name="$parentdebuffs" inherits="XPerlCustomListTemplate">
				<Scripts>
					<OnLoad>
						XPerl_Options_Custom_InitList(self, "debuff")
					</OnLoad>
				</Scripts>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentzoneList" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="5" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			
			<StatusBar name="$parenticonCollect" orientation="VERTICAL">
				<BarTexture file="Interface\Tooltips\UI-Tooltip-Background"/>
				<Scripts>
					<OnShow>
						XPerl_Custom_Config.progress = self
					</OnShow>
				</Scripts>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentzoneList" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="1" y="-5"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentzoneList" relativePoint="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="3" y="5"/>
						</Offset>
					</Anchor>
				</Anchors>
			</StatusBar>
			
			<Frame name="$parentEdit">
				<Scripts>
					<OnShow>
						XPerl_Options_Custom_Buttons(XPerl_Custom_Config)
					</OnShow>
				</Scripts>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentzoneList" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="5" y="-5"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-10" y="10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Button name="$parent_Defaults" inherits="XPerlButtonTemplate">
						<FontString inherits="GameFontNormalSmall"/>
						<Size>
							<AbsDimension x="70" y="24"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_DEFAULTS")
							</OnLoad>
							<OnClick>
								if (not XPerl_Custom) then
									LoadAddOn("XPerl_CustomHighlight")
								end
								if (XPerl_Custom) then
									XPerl_Custom:SetDefaults()
									XPerl_Custom_Config.listzone:FillList()
									XPerl_Custom_Config.listdebuff:FillList()
								end
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parent_New" inherits="XPerlButtonTemplate">
						<FontString inherits="GameFontNormalSmall"/>
						<Size>
							<AbsDimension x="70" y="24"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOP"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "XPERL_CONF_RAID_CUSTOM_NEW")
							</OnLoad>
							<OnClick>
								XPerl_Custom_ConfigNew:Show()
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parent_Delete" inherits="XPerlButtonTemplate">
						<FontString inherits="GameFontNormalSmall"/>
						<Size>
							<AbsDimension x="70" y="24"/>
						</Size>
						<Anchors>
							<Anchor point="TOPRIGHT"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "DELETE", true)
							</OnLoad>
							<OnClick>
								XPerl_Options_Custom_OnDelete(XPerl_Custom_Config)
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Frame name="$parentNew" hidden="true">
				<Scripts>
					<OnShow>
						XPerl_Options_Custom_ScanForIcons(XPerl_Custom_Config)
						XPerl_Custom_ConfigEdit:Hide()
						XPerl_SwitchAnchor(XPerl_Custom_Config, "TOPLEFT")
						XPerl_Custom_Config:SetHeight(340)
					</OnShow>
					<OnHide>
						XPerl_Custom_ConfigEdit:Show()
						XPerl_SwitchAnchor(XPerl_Custom_Config, "TOPLEFT")
						XPerl_Custom_Config:SetHeight(195)
					</OnHide>
				</Scripts>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentzoneList" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="5" y="-5"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-10" y="10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<EditBox name="$parent_Zone" inherits="XPerlOptEditBox" letters="100">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="50" y="0"/></Offset>
							</Anchor>
						</Anchors>
						<Size><AbsDimension x="180" y="24"/></Size>
						<Scripts>
							<OnShow>
								self:SetText(GetRealZoneText())
							</OnShow>
							<OnTextChanged>
							</OnTextChanged>
						</Scripts>
						<Layers>
							<Layer level="ARTWORK">
								<FontString inherits="GameFontNormal" text="XPERL_CONF_RAID_CUSTOM_ZONE" justifyH="LEFT">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT">
											<Offset><AbsDimension x="-7" y="0"/></Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</EditBox>
					<EditBox name="$parent_Search" inherits="XPerlOptEditBox" letters="100">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parent_Zone" relativePoint="BOTTOMLEFT"/>
						</Anchors>
						<Size><AbsDimension x="180" y="24"/></Size>
						<Scripts>
							<OnShow>
								self:SetFocus()
							</OnShow>
							<OnTextChanged>
								XPerl_Options_Custom_ScanForIcons(XPerl_Custom_Config)
							</OnTextChanged>
						</Scripts>
						<Layers>
							<Layer level="ARTWORK">
								<FontString inherits="GameFontNormal" text="XPERL_CONF_RAID_CUSTOM_SEARCH" justifyH="LEFT">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT">
											<Offset><AbsDimension x="-7" y="0"/></Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</EditBox>
					<Button name="$parent_Cancel" inherits="XPerlButtonTemplate">
						<FontString inherits="GameFontNormalSmall"/>
						<Size>
							<AbsDimension x="70" y="24"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMRIGHT"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_OptionsSetMyText(self, "CANCEL", true)
							</OnLoad>
							<OnClick>
								XPerl_Custom_ConfigNew:Hide()
							</OnClick>
						</Scripts>
					</Button>
					<Frame name="$parent_Icons">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset><AbsDimension x="0" y="-55"/></Offset>
							</Anchor>
							<Anchor point="BOTTOMRIGHT" relativeTo="$parent_Cancel" relativePoint="TOPRIGHT">
								<Offset><AbsDimension x="0" y="5"/></Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								XPerl_Custom_Config.icons = self
							</OnLoad>
						</Scripts>
					</Frame>
				</Frames>
			</Frame>
		</Frames>
	</Frame>
</Ui>
