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

  <Script file="localization.lua"/>
  <Script file="localization.de.lua"/>
  <Script file="localization.fr.lua"/>
  <Script file="localization.tw.lua"/>

	<!-- ================================================================== -->
	<!-- The options frame -->
	<CheckButton name="CECBOptionsCheckButtonTemplate" inherits="OptionsCheckButtonTemplate" virtual="true">
		<HitRectInsets>
			<AbsInset left="0" right="0" top="0" bottom="0"/>
		</HitRectInsets>
	</CheckButton>

	<Frame name="CECBOptionsFrame" frameStrata="MEDIUM" toplevel="true" enableMouse="true" movable="true" hidden="true" parent="UIParent">
	    <Scripts>
			<OnUpdate> CEnemyCastBar_Options_OnUpdate(); </OnUpdate>
	    </Scripts>
		<Size>
			<AbsDimension x="" y="" /> <!--x y menuesize set through mainlua -->
		</Size>

		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="UIParent">
				<Offset>
					<AbsDimension x="250" y="-100" />
				</Offset>
			</Anchor>
		</Anchors>

		<TitleRegion setAllPoints="true"/>

		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
		</Backdrop>


		<Layers>
			<Layer level="ARTWORK">
				<Texture name="GameMenuFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="500" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="$parentText" inherits="GameFontNormal" text="Options">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName().."Text"):SetText("Natur EnemyCastBar |cffcccc00("..CECB_status_version_txt..")\n\n|cffffffff"..CECB_menue_txt);
			</OnLoad>
		</Scripts>

		<Frames>

		        <Button name="$parentX" inherits="UIPanelCloseButton">
				<Size>
					<AbsDimension x="32" y="32"/>
				</Size>
		            <Anchors>
		                <Anchor point="CENTER" relativePoint="TOPRIGHT">
		                    <Offset>
		                        <AbsDimension x="-24" y="-32"/>
		                    </Offset>
		                </Anchor>
		            </Anchors>
				<Scripts>
					<OnClick>
						CEnemyCastBar_Handler("");
						CEnemyCastBar_ShowHideColorOptions("hide");
					</OnClick>
				</Scripts>
		        </Button>

			<CheckButton name="$parentCECB_status_check" inherits="CECBOptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" >
						<Offset>
							<AbsDimension x="10" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					if (CEnemyCastBar.bStatus) then
					CEnemyCastBar_InternalHandler("disable");
					else
					CEnemyCastBar_InternalHandler("enable");
					end
					
						-- CEnemyCastBar.bStatus = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_status_txt);
						getglobal(this:GetName()).tooltipText = CECB_status_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bStatus) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>
			<Frame name="$parentBGFrame1" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="31"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_status_check">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.1, 0.1, 0.1);
					</OnLoad>
				</Scripts>
			</Frame>

			<Button name="$parentBGFrameFPSBar" inherits="CarniEnemyCastBarTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCECB_status_check">
								<Offset>
									<AbsDimension x="255" y="-8"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								this:EnableMouse(0);
								this:Show();
								getglobal(this:GetName().."_StatusBar_Spark"):Hide();
							</OnLoad>
						</Scripts>
			</Button>
			<CheckButton name="$parentBGFrameFPSBar_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="21"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentBGFrameFPSBar">
						<Offset>
							<AbsDimension x="-15" y="2" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("fpsbar");
						-- CEnemyCastBar.bTempFPSBar = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						--getglobal(this:GetName().."Text"):SetText(CECB_fps_txt);
						getglobal(this:GetName()).tooltipText = CECB_fps_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bTempFPSBar) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentBGFrameFPSBarLock_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="21"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentBGFrameFPSBar">
						<Offset>
							<AbsDimension x="15" y="2" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("lockfps");
						-- CEnemyCastBar.bFPSBarLocked = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						--getglobal(this:GetName().."Text"):SetText(CECB_lockfps_txt);
						getglobal(this:GetName()).tooltipText = CECB_lockfps_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFPSBarLocked) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

<!-- PvP settings -->
			<CheckButton name="$parentCECB_pvp_check" inherits="CECBOptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_status_check">
						<Offset>
							<AbsDimension x="0" y="-45" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("pvp");
						CEnemyCastBar.bPvP = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents();
						NECB_SetInterruptCheck(); -- check if still has to be checked, sets CEnemyCastBar.bSpellBreaks
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_pvp_txt);
						getglobal(this:GetName()).tooltipText = CECB_pvp_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bPvP) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local counter = 0;
	for k, v in pairs (CEnemyCastBar_Spells) do
		counter = counter + 1;
	end
	getglobal(this:GetName()).tooltipText = CECB_pvp_tooltip.."|cffffffff"..counter;
					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentBGFrame2" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="410"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pvp_check">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentText" inherits="GameFontNormal" text="Options">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="5" y="12"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.2, 0.1, 0.1);
						getglobal(this:GetName().."Text"):SetText("|cffffffaa"..CECB_menuesub1_txt);
					</OnLoad>
				</Scripts>
			</Frame>

			<CheckButton name="$parentCECB_focuspvp_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pvp_check">
						<Offset>
							<AbsDimension x="10" y="-25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("");
					--since 6.8.x not used anymore :D
						CEnemyCastBar.bFocusPvP = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_focuspvp_txt);
						getglobal(this:GetName()).tooltipText = CECB_focuspvp_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFocusPvP) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_globalpvp_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_focuspvp_check">
						<Offset>
							<AbsDimension x="0" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("globalpvp");
						-- CEnemyCastBar.bGlobalPvP = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_globalpvp_txt);
						getglobal(this:GetName()).tooltipText = CECB_globalpvp_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bGlobalPvP) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_hostileonly_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_globalpvp_check">
						<Offset>
							<AbsDimension x="10" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("hostileonly");
						CEnemyCastBar.bHostileOnly = (this:GetChecked() == 1);
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_hostileonly_txt);
						getglobal(this:GetName()).tooltipText = CECB_hostileonly_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bHostileOnly) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_gains_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_hostileonly_check">
						<Offset>
							<AbsDimension x="-10" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("gains");
						CEnemyCastBar.bGains = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents();
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_gains_txt);
						getglobal(this:GetName()).tooltipText = CECB_gains_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bGains) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_gainsonly_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_gains_check">
						<Offset>
							<AbsDimension x="10" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("gainsonly");
						CEnemyCastBar.bGainsOnly = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents();
						NECB_SetInterruptCheck(); -- check if still has to be checked, sets CEnemyCastBar.bSpellBreaks
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_gainsonly_txt);
						getglobal(this:GetName()).tooltipText = CECB_gainsonly_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bGainsOnly) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_pvpswarn_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_gainsonly_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("");
						CEnemyCastBar.bPvPSoundWarn = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_pvpswarn_txt);
						getglobal(this:GetName()).tooltipText = CECB_pvpswarn_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bPvPSoundWarn) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Spells) do
		if (CEnemyCastBar_Spells[k].swarn) then
			local color = "";
			if (CEnemyCastBar_Spells[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_pvpswarn_tooltip..spell;
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_cdown_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pvpswarn_check">
						<Offset>
							<AbsDimension x="-10" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("cdown");
						-- CEnemyCastBar.bCDown = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_cdown_txt);
						getglobal(this:GetName()).tooltipText = CECB_cdown_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bCDown) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local counter = 0;
	for k, v in pairs (CEnemyCastBar_Spells) do
		if (CEnemyCastBar_Spells[k].d) then
			counter = counter + 1;
		end
	end
	getglobal(this:GetName()).tooltipText = CECB_cdown_tooltip.."|cffffffff"..counter;
					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentCECB_usecddb_frame" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="230" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_cdown_check">
						<Offset>
							<AbsDimension x="0" y="-20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentText" inherits="GameFontNormalSmall" text="">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="5" y="-4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.1, 0.1, 0.1);
					</OnLoad>
				</Scripts>
			</Frame>

			<Button name="$parentCDDBReset" inherits="UIPanelButtonTemplate" text="Reset" hidden="false">
				<NormalFont inherits="GameFontNormalSmall"/>
				<HighlightFont inherits="GameFontHighlightSmall"/>
				<DisabledFont inherits="GameFontDisableSmall"/>
			        <Size>
			            <AbsDimension x="50" y="16"/>
			        </Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentCECB_usecddb_frame">
						<Offset>
							<AbsDimension x="-2" y="-2" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						NECB_CD_DB = { };
					</OnClick>
				</Scripts>
			</Button>

<!-- PvE settings -->
			<CheckButton name="$parentCECB_pve_check" inherits="CECBOptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_usecddb_frame">
						<Offset>
							<AbsDimension x="-10" y="-17" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("pve");
						CEnemyCastBar.bPvE = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents();
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_pve_txt);
						getglobal(this:GetName()).tooltipText = CECB_pve_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bPvE) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local text = CECB_pve_tooltip;
	NECB_Spells_Sort = { };
	if (IsInInstance()) then
		text = string.gsub(text, "XXXplaceholderXXX", "(|cff6666ff"..GetRealZoneText().."|r)");
	else
		text = string.gsub(text, "XXXplaceholderXXX", "(|cff6666ff-|r)");
	end
	local prefix, spell = "|cffffffff-.-", "|cffffffff";
	for k, v in pairs (CEnemyCastBar_Raids) do
		if (CEnemyCastBar_Raids[k].t > 1) then
			local color = "";
			if (CEnemyCastBar_Raids[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
			prefix = "";
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = text..prefix..spell;


					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentBGLine1" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="4"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pve_check">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>

			<CheckButton name="$parentCECB_pvew_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pve_check">
						<Offset>
							<AbsDimension x="10" y="-25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("pveraidw");
						CEnemyCastBar.bPvEWarn = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_pvew_txt);
						getglobal(this:GetName()).tooltipText = CECB_pvew_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bPvEWarn) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentEPTimer" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="230" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pvew_check">
						<Offset>
							<AbsDimension x="0" y="-20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentText" inherits="GameFontNormalSmall" text="EngageProtection: disabled">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="5" y="-4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.1, 0.1, 0.1);
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="$parentEPTimerReset" inherits="UIPanelButtonTemplate" text="Reset" hidden="false">
				<NormalFont inherits="GameFontNormalSmall"/>
				<HighlightFont inherits="GameFontHighlightSmall"/>
				<DisabledFont inherits="GameFontDisableSmall"/>
			        <Size>
			            <AbsDimension x="50" y="16"/>
			        </Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentEPTimer">
						<Offset>
							<AbsDimension x="-2" y="-2" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					if (necbengagecd) then
						necbengagecd = GetTime() - necbEPTime;
					end
					</OnClick>
				</Scripts>
			</Button>

<!-- Debuffs settings -->
			<CheckButton name="$parentCECB_afflict_check" inherits="CECBOptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentEPTimer">
						<Offset>
							<AbsDimension x="-10" y="-17" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("afflict");
						CEnemyCastBar.bShowafflict = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents();
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_afflict_txt);
						getglobal(this:GetName()).tooltipText = CECB_afflict_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bShowafflict) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (not CEnemyCastBar_Afflictions[k].fragile and not CEnemyCastBar_Afflictions[k].magecold and not CEnemyCastBar_Afflictions[k].periodicdmg
			and not CEnemyCastBar_Afflictions[k].solo and not CEnemyCastBar_Afflictions[k].stun and not CEnemyCastBar_Afflictions[k].global
			and not CEnemyCastBar_Afflictions[k].callspell and CEnemyCastBar_Afflictions[k].t ~= 0
		) then

			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_afflict_tooltip..spell;
					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentBGLine2" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="4"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_afflict_check">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>

			<CheckButton name="$parentCECB_focusdebuffs_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_afflict_check">
						<Offset>
							<AbsDimension x="10" y="-25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("");
					--since 6.8.x not used anymore :D
						CEnemyCastBar.bFocusDebuffs = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_focuspvp_txt);
						getglobal(this:GetName()).tooltipText = CECB_focuspvp_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFocusDebuffs) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_globalfrag_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_focusdebuffs_check">
						<Offset>
							<AbsDimension x="0" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("globalfrag");
						CEnemyCastBar.bGlobalFrag = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_globalfrag_txt);
						getglobal(this:GetName()).tooltipText = CECB_globalfrag_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bGlobalFrag) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].fragile) then
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_globalfrag_tooltip..spell;

					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_magecold_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_globalfrag_check">
						<Offset>
							<AbsDimension x="0" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("magecold");
						CEnemyCastBar.bMageC = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_magecold_txt);
						getglobal(this:GetName()).tooltipText = CECB_magecold_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bMageC) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].magecold) then
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_magecold_tooltip..spell;

					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_solod_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_magecold_check">
						<Offset>
							<AbsDimension x="0" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("solod");
						CEnemyCastBar.bSoloD = (this:GetChecked() == 1);
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_solod_txt);
						getglobal(this:GetName()).tooltipText = CECB_solod_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bSoloD) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].solo) then
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_solod_tooltip..spell;
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_drtimer_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_solod_check">
						<Offset>
							<AbsDimension x="10" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("drtimer");
						CEnemyCastBar.bDRTimer = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_drtimer_txt);
						getglobal(this:GetName()).tooltipText = CECB_drtimer_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bDRTimer) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].stun) then
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_drtimer_tooltip..spell;

					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_classdr_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_drtimer_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("classdr");
						-- CEnemyCastBar.bClassDR = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_classdr_txt);
						getglobal(this:GetName()).tooltipText = CECB_classdr_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bClassDR) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].spellDR) then
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			local classcolor, playersclass = UnitClass("player");
			if (CEnemyCastBar_Afflictions[k].sclass == playersclass) then
				classcolor = "|cff66cc66";
			else
				classcolor = "|cffcc6666";
			end
			table.insert (NECB_Spells_Sort, color..k..classcolor.." ("..string.lower(CEnemyCastBar_Afflictions[k].sclass)..")|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_classdr_tooltip..spell;

					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_sdots_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_classdr_check">
						<Offset>
							<AbsDimension x="-10" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("sdots");
						CEnemyCastBar.bSDoTs = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_sdots_txt);
						getglobal(this:GetName()).tooltipText = CECB_sdots_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bSDoTs) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local spell="|cffffffff";
	NECB_Spells_Sort = { };
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].periodicdmg) then
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = CECB_sdots_tooltip..spell;

					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_bossdebuff_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_sdots_check">
						<Offset>
							<AbsDimension x="0" y="-20" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("bossdebuff");
						CEnemyCastBar.bBossDebuff = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents(); -- if not pve loaded do it now
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_bossdebuff_txt);
						--getglobal(this:GetName()).tooltipText = CECB_bossdebuff_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bBossDebuff) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end

	local text = CECB_bossdebuff_tooltip;
	NECB_Spells_Sort = { };
	if (IsInInstance()) then
		text = string.gsub(text, "XXXplaceholderXXX", "(|cff6666ff"..GetRealZoneText().."|r)");
	else
		text = string.gsub(text, "XXXplaceholderXXX", "(|cff6666ff-|r)");
	end
	local prefix, spell = "|cffffffff-.-", "|cffffffff";
	for k, v in pairs (CEnemyCastBar_Afflictions) do
		if (CEnemyCastBar_Afflictions[k].global and CEnemyCastBar_Afflictions[k].t > 0.1) then -- don't show removals
			local color = "";
			if (CEnemyCastBar_Afflictions[k].disabled) then
				color = "|cff999999";
			end
			table.insert (NECB_Spells_Sort, color..k.."|r, |cffffffff\n");
			prefix = "";
		end
	end
	table.sort (NECB_Spells_Sort);
	for k, v in pairs (NECB_Spells_Sort) do
		spell = spell..v;
	end
	getglobal(this:GetName()).tooltipText = text..prefix..spell;

					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_parseC_check" inherits="CECBOptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_bossdebuff_check">
						<Offset>
							<AbsDimension x="-10" y="-25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("parsec");
						CEnemyCastBar.bParseC = (this:GetChecked() == 1);
						CEnemyCastBar_RegisterEvents();
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_parsec_txt);
						getglobal(this:GetName()).tooltipText = CECB_parsec_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bParseC) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentBGFrameNet" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="50"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_parseC_check">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.1, 0.1, 0.2);
					</OnLoad>
				</Scripts>
			</Frame>

			<CheckButton name="$parentCECB_broadcast_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_parseC_check">
						<Offset>
							<AbsDimension x="10" y="-25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("broadcast");
						CEnemyCastBar.bBCaster = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_broadcast_txt);
						getglobal(this:GetName()).tooltipText = CECB_broadcast_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bBCaster) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

<!-- Other settings -->
			<CheckButton name="$parentCECB_togglemouse_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_pvp_check">
						<Offset>
							<AbsDimension x="242" y="-2" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("togglemouse");
						-- CEnemyCastBar.bMouseBar = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_togglemouse_txt);
						getglobal(this:GetName()).tooltipText = CECB_togglemouse_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bMouseBar) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>


			<Frame name="$parentBGFrame3" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="410"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_togglemouse_check">
						<Offset>
							<AbsDimension x="-2" y="2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="5" y="12"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.1, 0.2, 0.1);
						getglobal(this:GetName().."Text"):SetText("|cffffffaa"..CECB_menuesub2_txt);
					</OnLoad>
				</Scripts>
			</Frame>

			<CheckButton name="$parentCECB_timer_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_togglemouse_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("timer");
						CEnemyCastBar.bTimer = (this:GetChecked() == 1);
						CEnemyCastBar_FlipBars() -- adjust if timer inside bar enabled
						CECB_ReloadOptionsUI();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_timer_txt);
						getglobal(this:GetName()).tooltipText = CECB_timer_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bTimer) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_timerinside_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_timer_check">
						<Offset>
							<AbsDimension x="5" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("timerinside");
						CEnemyCastBar.bTimerInside = (this:GetChecked() == 1);
						CEnemyCastBar_FlipBars();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_timerinside_txt);
						getglobal(this:GetName()).tooltipText = CECB_timerinside_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bTimerInside) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_showicon_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_timerinside_check">
						<Offset>
							<AbsDimension x="-5" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("showicon");
						CEnemyCastBar.bShowIcon = (this:GetChecked() == 1);
						CEnemyCastBar_SetIcon();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_showicon_txt);
						getglobal(this:GetName()).tooltipText = CECB_showicon_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bShowIcon) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_border_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_showicon_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("disborder");
						CEnemyCastBar.bDisBorder = (this:GetChecked() == 1);
						CEnemyCastBar_SetBorder();
						CEnemyCastBar_FlipBars(); --to adjust timer position if inside
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_disborder_txt);
						getglobal(this:GetName()).tooltipText = CECB_disborder_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bDisBorder) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_flipb_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_border_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("flipb");
						CEnemyCastBar.bFlipB = (this:GetChecked() == 1);
						CEnemyCastBar_FlipBars();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_flipb_txt);
						getglobal(this:GetName()).tooltipText = CECB_flipb_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFlipB) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_MiniMap_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_flipb_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("minimap");
						-- CEnemyCastBar.bMiniMap = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_minimap_txt);
						getglobal(this:GetName()).tooltipText = CECB_minimap_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bMiniMap) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_SepBar_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_MiniMap_check">
						<Offset>
							<AbsDimension x="0" y="-15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Options("separatebars");
						-- CEnemyCastBar.bSeparateBars = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_sepbar_txt);
						getglobal(this:GetName()).tooltipText = CECB_sepbar_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bSeparateBars) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<Frame name="$parentBGLineR1" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="4"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_SepBar_check">
						<Offset>
							<AbsDimension x="-2" y="-20"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
<!-- Sliders -->
			<Slider name="$parentCECB_scale_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="100" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_SepBar_check">
						<Offset>
							<AbsDimension x="8" y="-37" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_scale_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_scale_Slider_OnShow();
						getglobal(this:GetName()).tooltipText = CECB_scale_tooltip;
					</OnShow>
				</Scripts>
			</Slider>

			<Slider name="$parentCECB_alpha_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="100" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_scale_Slider">
						<Offset>
							<AbsDimension x="120" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_alpha_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_alpha_Slider_OnShow();
						getglobal(this:GetName()).tooltipText = CECB_alpha_tooltip;
					</OnShow>
				</Scripts>
			</Slider>

			<Slider name="$parentCECB_numbars_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="220" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_scale_Slider">
						<Offset>
							<AbsDimension x="0" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_numbars_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_numbars_Slider_OnShow();
						--getglobal(this:GetName()).tooltipText = CECB_numbars_tooltip; -- set in above function
					</OnShow>
				</Scripts>
			</Slider>

			<Slider name="$parentCECB_space_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="220" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_numbars_Slider">
						<Offset>
							<AbsDimension x="0" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_space_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_space_Slider_OnShow();
						getglobal(this:GetName()).tooltipText = CECB_space_tooltip;
					</OnShow>
				</Scripts>
			</Slider>

			<Slider name="$parentCECB_blength_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="220" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_space_Slider">
						<Offset>
							<AbsDimension x="0" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_blength_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_blength_Slider_OnShow();
						getglobal(this:GetName()).tooltipText = CECB_blength_tooltip;
					</OnShow>
				</Scripts>
			</Slider>

			<Slider name="$parentCECB_texture_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="220" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_blength_Slider">
						<Offset>
							<AbsDimension x="0" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_texture_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_texture_Slider_OnShow();
						getglobal(this:GetName()).tooltipText = CECB_texture_tooltip;
					</OnShow>
				</Scripts>
			</Slider>

			<Slider name="$parentCECB_font_Slider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="150" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_texture_Slider">
						<Offset>
							<AbsDimension x="0" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CECB_font_Slider_OnValueChanged();
					</OnValueChanged>
					<OnShow>
						CECB_font_Slider_OnShow();
						getglobal(this:GetName()).tooltipText = CECB_font_tooltip;
					</OnShow>
				</Scripts>
			</Slider>

			<Frame name="$parentBGLineR2" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="240" y="4"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_font_Slider">
						<Offset>
							<AbsDimension x="-10" y="-27"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>

			<CheckButton name="$parentCECB_tsize_check" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="25" y="25"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentCECB_font_Slider">
						<Offset>
							<AbsDimension x="30" y="4" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("tsize");
						CEnemyCastBar.bSmallTSize = (this:GetChecked() == 1);
						CEnemyCastBar_SetTextSize();
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_tsize_txt);
						getglobal(this:GetName()).tooltipText = CECB_tsize_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bSmallTSize) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

<!-- Fill mode settings -->

			<Frame name="$parentCECB_filling_frame" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="230" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_font_Slider">
						<Offset>
							<AbsDimension x="-4" y="-32"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentText" inherits="GameFontNormalSmall" text="">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4, 0);
						this:SetBackdropColor(0.1, 0.1, 0.1, 0);
						getglobal(this:GetName().."Text"):SetText(CECB_filling_txt);
					</OnLoad>
				</Scripts>
			</Frame>

			<CheckButton name="$parentCECB_filling_gains" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_filling_frame">
						<Offset>
							<AbsDimension x="0" y="-12" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("");
						CEnemyCastBar.bFillupGains = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_filling_gains_txt);
						getglobal(this:GetName()).tooltipText = CECB_filling_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFillupGains) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_filling_debuffs" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_filling_gains">
						<Offset>
							<AbsDimension x="76" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("");
						CEnemyCastBar.bFillupDebuffs = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_filling_debuffs_txt);
						getglobal(this:GetName()).tooltipText = CECB_filling_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFillupDebuffs) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCECB_filling_dots" inherits="CECBOptionsCheckButtonTemplate">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCECB_filling_debuffs">
						<Offset>
							<AbsDimension x="76" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					--CEnemyCastBar_Options("");
						CEnemyCastBar.bFillupDoTs = (this:GetChecked() == 1);
					</OnClick>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText(CECB_filling_dots_txt);
						getglobal(this:GetName()).tooltipText = CECB_filling_tooltip;
					</OnLoad>
					<OnShow>
						if (CEnemyCastBar.bFillupDoTs) then
							this:SetChecked(1);
						else
							this:SetChecked(0);
						end
					</OnShow>
				</Scripts>
			</CheckButton>

<!-- Bottom Buttons -->

			<Button name="$parentHelp" inherits="GameMenuButtonTemplate" text="CECB_menue_help">
			        <Size>
			            <AbsDimension x="100" y="20"/>
			        </Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="-140" y="15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CEnemyCastBar_Handler("help");
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parentColors" inherits="UIPanelButtonTemplate" text="CECB_menue_colors">
			        <Size>
			            <AbsDimension x="100" y="20"/>
			        </Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHelp">
						<Offset>
							<AbsDimension x="120" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CEnemyCastBar_ShowHideColorOptions();
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parentReset" inherits="UIPanelButtonTemplate" text="CECB_menue_reset">
			        <Size>
			            <AbsDimension x="100" y="20"/>
			        </Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentColors">
						<Offset>
							<AbsDimension x="-120" y="23" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
					CECBApplyResetFrame:Show();
					--CEnemyCastBar_Options("reset");
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parentMoveBar" inherits="UIPanelButtonTemplate" text="CECB_menue_mbar">
			        <Size>
			            <AbsDimension x="100" y="20"/>
			        </Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentReset">
						<Offset>
							<AbsDimension x="120" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
				     <OnLoad>
				       this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
				     </OnLoad>
					<OnClick>
						if (arg1 == "RightButton") then
							CEnemyCastBar_Handler("clear");
						elseif (arg1 == "LeftButton") then
							CEnemyCastBar_Options("show");
						end
					</OnClick>
				</Scripts>
			</Button>

		</Frames>

	</Frame>


	<!-- ================================================================== -->
	<!-- The ApplyReset? frame -->
	<Frame name="CECBApplyResetFrame" frameStrata="HIGH" toplevel="true" enableMouse="true" hidden="true" parent="UIParent">
		<Size>
			<AbsDimension x="300" y="150" />
		</Size>

		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="CECBOptionsFrame">
				<Offset>
					<AbsDimension x="0" y="-35" />
				</Offset>
			</Anchor>
		</Anchors>

		<TitleRegion setAllPoints="true"/>

		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
		</Backdrop>


		<Layers>
			<Layer level="ARTWORK">
				<Texture name="GameMenuFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="220" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="$parentText" inherits="GameFontNormal" text="WARNING">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>

		<Scripts>
			<OnLoad>
				getglobal(this:GetName().."Text"):SetText(CECB_menue_rwarning);
			</OnLoad>
			<OnShow>
				CECBOptionsFrame:SetAlpha(0.5);
			</OnShow>
		</Scripts>

		<Frames>

			<Button name="$parentNoButton" inherits="GameMenuButtonTemplate" text="CECB_menue_rno">
			        <Size>
			            <AbsDimension x="80" y="21"/>
			        </Size>
				<Anchors>
					<Anchor point="CENTER" relativePoint="BOTTOM" relativeTo="$parent">
						<Offset>
							<AbsDimension x="0" y="25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CECBApplyResetFrame:Hide();
						CECBOptionsFrame:SetAlpha(1);
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parentYesButton" inherits="GameMenuButtonTemplate" text="CECB_menue_ryes">
			        <Size>
			            <AbsDimension x="80" y="21"/>
			        </Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="$parentNoButton">
						<Offset>
							<AbsDimension x="0" y="25" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CECBApplyResetFrame:Hide();
						CECBOptionsFrame:SetAlpha(1);
						CEnemyCastBar_Options("reset");
					</OnClick>
				</Scripts>
			</Button>

		</Frames>

	</Frame>

	<!-- ================================================================== -->
	<!-- COLORs FRAME -->
	<Button name="CECBColorRectangle" virtual="true">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		<Anchors>
			<Anchor point="LEFT">
				<Offset>
					<AbsDimension x="30" y="-20"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parent_SwatchBg">
					<Size>
						<AbsDimension x="18" y="18"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1.0" g="1.0" b="1.0"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				CEnemyCastBar_ColorWheel(this:GetParent());
			</OnClick>
			<OnEnter>
				getglobal(this:GetName().."_SwatchBg"):SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
			</OnEnter>
			<OnLeave>
				getglobal(this:GetName().."_SwatchBg"):SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
			</OnLeave>
		</Scripts>
		<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>

	</Button>


	<Frame name="CECBPickColorOptions" frameStrata="HIGH" toplevel="true" enableMouse="true" hidden="true" parent="UIParent">
		<Size>
			<AbsDimension x="210" y="340"/>
		</Size>

		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="CECBOptionsFrame">
				<Offset>
					<AbsDimension x="0" y="-35" />
				</Offset>
			</Anchor>
		</Anchors>

		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
		</Backdrop>

		<Layers>
			<Layer level="ARTWORK">
				<Texture name="GameMenuFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="280" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="$parentHeadline" inherits="GameFontNormal" text="Change Colors">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>

				<FontString name="$parentText1" inherits="GameFontHighlightSmall" text="Hostile Casts">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CECBPickColorOptions">
							<Offset>
								<AbsDimension x="45" y="-39"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText2" inherits="GameFontHighlightSmall" text="Friendly Casts">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText1">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText3" inherits="GameFontHighlightSmall" text="Cooldown">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText2">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText4" inherits="GameFontHighlightSmall" text="Hostile Gains, Buffs">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText3">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText5" inherits="GameFontHighlightSmall" text="Friendly Gains, Buffs">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText4">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText6" inherits="GameFontHighlightSmall" text="Selfmade Countdown">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText5">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText7" inherits="GameFontHighlightSmall" text="DeBuffs, Afflictions">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText6">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText8" inherits="GameFontHighlightSmall" text="Stuns">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText7">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentText9" inherits="GameFontHighlightSmall" text="Own DoTs, Curses">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentText8">
							<Offset>
								<AbsDimension x="0" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>

		<Frames>
		        <Button name="$parentX" inherits="UIPanelCloseButton">
				<Size>
					<AbsDimension x="30" y="30"/>
				</Size>
		            <Anchors>
		                <Anchor point="CENTER" relativePoint="TOPRIGHT">
		                    <Offset>
		                        <AbsDimension x="-20" y="-20"/>
		                    </Offset>
		                </Anchor>
		            </Anchors>
				<Scripts>
					<OnClick>
						CEnemyCastBar_ShowHideColorOptions();
					</OnClick>
				</Scripts>
		        </Button>

			<Button name="$parentReset" inherits="UIPanelButtonTemplate" text="Standard">
			        <Size>
			            <AbsDimension x="100" y="20"/>
			        </Size>
				<Anchors>
					<Anchor point="BOTTOM" relativePoint="BOTTOM" relativeTo="$parent">
						<Offset>
							<AbsDimension x="0" y="15" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CEnemyCastBar_SetBarColors();
						CEnemyCastBar_SetBarColors("SetColors");
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parent_Hostile" inherits="CECBColorRectangle" id="1">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="CECBPickColorOptions">
						<Offset>
							<AbsDimension x="20" y="-35"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>

			<Button name="$parent_Friendly" inherits="CECBColorRectangle" id="2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Hostile">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Cooldown" inherits="CECBColorRectangle" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Friendly">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_GainsFoe" inherits="CECBColorRectangle" id="4">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Cooldown">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_GainsFriend" inherits="CECBColorRectangle" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_GainsFoe">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Grey" inherits="CECBColorRectangle" id="6">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_GainsFriend">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Afflict" inherits="CECBColorRectangle" id="7">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Grey">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_Stuns" inherits="CECBColorRectangle" id="8">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Afflict">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parent_DoTs" inherits="CECBColorRectangle" id="9">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent_Stuns">
						<Offset>
							<AbsDimension x="0" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
		</Frames>
	</Frame>

  <Script file="CECB_Options.lua"/>

</Ui>
