<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="FocusFrame.lua"/>
	<Button name="FocusDebuffButtonTemplate" virtual="true" hidden="true">
		<Size>
			<AbsDimension x="15" y="15"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentIcon" setAllPoints="true"/>
			</Layer>
			<Layer level="OVERLAY">
				<Texture name="$parentBorder" file="Interface\Buttons\UI-Debuff-Overlays">
					<Size>
						<AbsDimension x="17" y="17"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0.296875" right="0.5703125" top="0" bottom="0.515625"/>
				</Texture>	
			</Layer>
		</Layers>
		<Frames>
			<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate" reverse="true" drawEdge="true" hidden="true">
				<Anchors>
					<Anchor point="CENTER">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Cooldown>
		</Frames>
		<Scripts>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
				GameTooltip:SetUnitDebuff("focus", self:GetID());
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
	</Button>
	<Button name="FocusFrame" frameStrata="LOW" toplevel="true" movable="true" inherits="SecureUnitButtonTemplate" parent="UIParent">
		<Size>
			<AbsDimension x="160" y="80"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="12" y="-420"/>
				</Offset>
			</Anchor>
		</Anchors>
		<HitRectInsets>
			<AbsInset left="0" right="8" top="0" bottom="22"/>
		</HitRectInsets>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="FocusFrameFlash" file="Interface\TargetingFrame\UI-TargetingFrame-Flash" hidden="true">
					<Size>
						<AbsDimension x="176" y="82"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="-5" y="11"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0.55078125" right="0" top="0.400390625" bottom="0.52734375"/>
				</Texture>
				<Texture name="FocusFrameBackground">
					<Size>
						<AbsDimension x="88" y="38"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="14" y="-9"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="0" g="0" b="0" a="0.5"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="FocusFrameNameBackground" file="Interface\TargetingFrame\UI-TargetingFrame-LevelBackground">
					<Size>
						<AbsDimension x="88" y="19"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="14" y="-7"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture name="FocusPortrait">
					<Size>
						<AbsDimension x="43" y="43"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset>
								<AbsDimension x="-10" y="-6"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="FocusFrameTextureFrame" setAllPoints="true">
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="FocusFrameTexture" file="Interface\TargetingFrame\UI-FocusTargetingFrame.tga">
							<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
						</Texture>
						<FontString name="FocusName" inherits="GameFontNormalSmall">
							<Size>
								<AbsDimension x="90" y="10"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="-24" y="25"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="FocusFrameHealthBarText" inherits="TextStatusBarText">
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="-22" y="9"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="FocusFrameManaBarText" inherits="TextStatusBarText">
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="-22" y="-1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
					<Layer level="ARTWORK">
						<Texture name="FocusRaidTargetIcon" file="Interface\TargetingFrame\UI-RaidTargetingIcons" hidden="true">
							<Size>
								<AbsDimension x="20" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER" relativePoint="TOPRIGHT">
									<Offset>
										<AbsDimension x="-31" y="-1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
			<Frame name="FocusFrameDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true">
				<Size>
					<AbsDimension x="10" y="10"/>
				</Size>
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="10" y="-40"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						FocusFrameDropDown_OnLoad(self);
					</OnLoad>
				</Scripts>
			</Frame>
			<StatusBar name="FocusFrameHealthBar" inherits="TextStatusBar">
				<Size>
					<AbsDimension x="90" y="7"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-28"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						TextStatusBar_Initialize(self);
						self.textLockable = 1;
						self.cvar = "targetStatusText";
						self.cvarLabel = "STATUS_TEXT_TARGET";
						self.zeroText = "";
					</OnLoad>
					<OnValueChanged>
						UnitFrameHealthBar_OnValueChanged(self, value);
						FocusHealthCheck(self, value);
					</OnValueChanged>
				</Scripts>
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
			</StatusBar>
			<StatusBar name="FocusFrameManaBar" inherits="TextStatusBar">
				<Size>
					<AbsDimension x="90" y="7"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-37"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						TextStatusBar_Initialize(self);
						self.textLockable = 1;
						self.cvar = "targetStatusText";
						self.cvarLabel = "STATUS_TEXT_TARGET";
					</OnLoad>
				</Scripts>
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
				<BarColor r="0" g="0" b="1.0"/>
			</StatusBar>
			<StatusBar name="FocusFrameSpellBar" inherits="CastingBarFrameTemplate" hidden="true">
				<Size>
					<AbsDimension x="135" y="10"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnShow>
						Focus_Spellbar_AdjustPosition(self);
					</OnShow>
					<OnLoad>
						Focus_Spellbar_OnLoad(self);
					</OnLoad>
					<OnEvent>
						Focus_Spellbar_OnEvent(self, event, ...);
					</OnEvent>
				</Scripts>
			</StatusBar>
			<Button name="$parentDebuff1" inherits="FocusDebuffButtonTemplate" id="1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="13" y="12"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff2" inherits="FocusDebuffButtonTemplate" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff3" inherits="FocusDebuffButtonTemplate" id="3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff2" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff4" inherits="FocusDebuffButtonTemplate" id="4">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff3" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff5" inherits="FocusDebuffButtonTemplate" id="5">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentDebuff1" relativePoint="BOTTOM">
						<Offset>
							<AbsDimension x="0" y="-4"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff6" inherits="FocusDebuffButtonTemplate" id="6">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff5" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff7" inherits="FocusDebuffButtonTemplate" id="7">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff6" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentDebuff8" inherits="FocusDebuffButtonTemplate" id="8">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff7" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Frame name="FocusFrameNumericalThreat" hidden="true">
				<Size>
					<AbsDimension x="49" y="18"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM" relativePoint="TOP">
						<Offset x="-23" y="-5"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<FontString name="$parentValue" inherits="GameFontHighlight" text="100%">
							<Anchors>
								<Anchor point="TOP">
									<Offset x="0" y="-4"/>
								</Anchor>
							</Anchors>
						</FontString>
						<Texture name="$parentBG" file="Interface\TargetingFrame\UI-StatusBar">
							<Size>
								<AbsDimension x="37" y="14"/>
							</Size>
							<Anchors>
								<Anchor point="TOP">
									<Offset x="0" y="-3"/>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="ARTWORK">
						<Texture file="Interface\TargetingFrame\NumericThreatBorder">
							<TexCoords left="0" right="0.765625" top="0" bottom="0.5625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self.text = getglobal(self:GetName().."Value");
						self.bg = getglobal(self:GetName().."BG");
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				UnitFrame_Initialize(self, "focus", FocusName, FocusPortrait,
									 FocusFrameHealthBar, FocusFrameHealthBarText,
									 FocusFrameManaBar, FocusFrameManaBarText,
				                     FocusFrameFlash,
									 "player",
									 FocusFrameNumericalThreat);
				self.noTextPrefix = true;
				FocusFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				FocusFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnUpdate>
				FocusFrame_OnUpdate(self, elapsed);
				FocusFrame_HealthUpdate(self, elapsed, "focus");
			</OnUpdate>
			<OnHide>
				FocusFrame_OnHide(self);
			</OnHide>
			<OnDragStart>
				FocusFrame_OnDragStart(self);
			</OnDragStart>
			<OnDragStop>
				FocusFrame_OnDragStop(self);
			</OnDragStop>
			<OnEnter>
				UnitFrame_OnEnter(self);
			</OnEnter>
			<OnLeave>
				UnitFrame_OnLeave(self);
			</OnLeave>
		</Scripts>
	</Button>
	<Button name="TargetofFocusFrame" movable="true" inherits="SecureUnitButtonTemplate" parent="FocusFrame" hidden="true">
		<Size>
			<AbsDimension x="93" y="45"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOMRIGHT">
				<Offset>
					<AbsDimension x="14" y="-9"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="TargetofFocusBackground">
					<Size>
						<AbsDimension x="46" y="15"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOMLEFT">	
							<Offset>
								<AbsDimension x="42" y="13"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="0" g="0" b="0" a="0.5"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="TargetofFocusPortrait">
					<Size>
						<AbsDimension x="35" y="35"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="5" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="TargetofFocusTextureFrame" setAllPoints="true">
				<Layers>
					<Layer level="BORDER">
						<Texture name="TargetofFocusTexture" file="Interface\TargetingFrame\UI-TargetofTargetFrame">
							<TexCoords left="0.015625" right="0.7265625" top="0" bottom="0.703125"/>
						</Texture>
						<FontString name="TargetofFocusName" inherits="GameFontNormalSmall" justifyH="LEFT">
							<Size>
								<AbsDimension x="60" y="10"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOMLEFT">
									<Offset>
										<AbsDimension x="42" y="-2"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="TargetofFocusDeadText" inherits="GameFontNormalSmall" text="DEAD">
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="15" y="1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						RaiseFrameLevel(self);
					</OnLoad>
				</Scripts>
			</Frame>
			<StatusBar name="TargetofFocusHealthBar" inherits="TextStatusBar">
				<Size>
					<AbsDimension x="46" y="7"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="-2" y="-15"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						TargetofFocusHealthCheck(self, value);
					</OnValueChanged>
				</Scripts>
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
				<BarColor r="0" g="1.0" b="0"/>
			</StatusBar>
			<StatusBar name="TargetofFocusManaBar" inherits="TextStatusBar">
				<Size>
					<AbsDimension x="46" y="7"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="-2" y="-23"/>
						</Offset>
					</Anchor>
				</Anchors>
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
				<BarColor r="0" g="0" b="1.0"/>
			</StatusBar>
			<Frame name="$parentDebuff1" inherits="TargetofTargetBuffButtonTemplate" id="1">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="4" y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentDebuff2" inherits="TargetofTargetBuffButtonTemplate" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="1" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentDebuff3" inherits="TargetofTargetBuffButtonTemplate" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDebuff1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentDebuff4" inherits="TargetofTargetBuffButtonTemplate" id="4">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentDebuff3" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="1" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				TargetofFocus_OnLoad(self);
			</OnLoad>
			<OnEvent>
				UnitFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnUpdate>
				TargetofFocus_Update(self, elapsed);
			</OnUpdate>
		</Scripts>
	</Button>
</Ui>
