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

	<!-- ##################################################################################################################################### -->
	<!-- # BUFF LIST                                                                                                                         # -->
	<!-- ##################################################################################################################################### -->

        <!-- ===== The Buff General frame ==================================================================================================== -->
	<Frame name="CHH_BuffGeneralFrameTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="10" y="-10"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
				<Offset>
					<AbsDimension x="-10" y="40"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_BUFF_TITLE );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<CheckButton name="$parentBuffPlayExpireSound" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-50" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
	                			<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_EXPIRE_PLAY_SOUND">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'buffPlayExpireSound' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentShowExpireMsg" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-80" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
	                			<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_EXPIRE_SHOW_MSG">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'buffShowExpireMsg' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentPlayWarnSound" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-110" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
	                			<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_WARN_PLAY_SOUND">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'buffPlayWarnSound' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentShowWarnMsg" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-140" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_WARN_SHOW_MSG">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'buffShowWarnMsg' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentWarnTrackingBuff" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-170" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_SHOW_TRACKING_BUFF">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'warnTrackingBuff' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentShowRaidEffects" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-200" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_SHOW_RAID_EFFECTS">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'showRaidEffects' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentCombineBuffsInPanic" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-230" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_BUFF_COMBINE_IN_PANIC">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'combineMissingBuffsInPanic' );
					</OnLoad>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

        <!-- ===== Buff List Entry ========================================================================================================= -->
	<CheckButton name="CHH_BuffListCheckTemplate" inherits="OptionsCheckButtonTemplate" checked="true" virtual="true">
		<Anchors>
			<Anchor point="LEFT" relativePoint="LEFT" />
		</Anchors>
		<Scripts>
			<OnClick>
				CHH_BuffListCheckClicked( this );
			</OnClick>
		</Scripts>
	</CheckButton>

	<Button name="CHH_BuffListButtonTemplate" virtual="true" hidden="false">
		<Anchors>
			<Anchor point="LEFT" relativePoint="LEFT" />
		</Anchors>
		<Size>
			<AbsDimension x="150" y="30"/>
		</Size>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentText" justifyH="LEFT" justifyV="CENTER" hidden="false" inherits="GameFontNormal" text="Buff name">
					<Size>
						<AbsDimension x="150" y="30"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativePoint="LEFT" />
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				CHH_BuffListBuffClicked( this );
			</OnClick>
		</Scripts>
	</Button>

	<Button name="CHH_BuffListButtonUpTemplate" virtual="true" hidden="false">
		<Anchors>
			<Anchor point="RIGHT" relativePoint="RIGHT">
				<Offset>
					<AbsDimension x="-40" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Size>
			<AbsDimension x="30" y="30"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parent_Background" file="Interface\AddOns\ClickHeal\Images\ArrowUp.tga">
					<Size>
						<AbsDimension x="20" y="20" />
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset><AbsDimension x="5" y="-5"/></Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset><AbsDimension x="-5" y="5"/></Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				CHH_BuffListBuffUpClicked( this );
			</OnClick>
		</Scripts>
	</Button>

	<Button name="CHH_BuffListButtonDownTemplate" virtual="true" hidden="false">
		<Anchors>
			<Anchor point="RIGHT" relativePoint="RIGHT" />
		</Anchors>
		<Size>
			<AbsDimension x="30" y="30"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parent_Background" file="Interface\AddOns\ClickHeal\Images\ArrowDown.tga">
					<Size>
						<AbsDimension x="20" y="20" />
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset><AbsDimension x="5" y="-5"/></Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset><AbsDimension x="-5" y="5"/></Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				CHH_BuffListBuffDownClicked( this );
			</OnClick>
		</Scripts>
	</Button>

	<Frame name="CHH_BuffListEntryTemplate" virtual="true">
    		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" setAllpoints="true" hidden="true">
					<Color r="0.5" g="0.5" b="0.5" a="0.5"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<CheckButton name="$parentCheck" inherits="OptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="LEFT" relativePoint="LEFT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_BuffListCheckClicked( this );
					</OnClick>
				</Scripts>
			</CheckButton>
			<Frame>
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentCheck">
						<Offset>
							<AbsDimension x="10" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" />
				</Anchors>
				<Frames>
					<Button name="$parentButton" inherits="CHH_BuffListButtonTemplate" />
					<Button name="$parentButtonUp" inherits="CHH_BuffListButtonUpTemplate" />
					<Button name="$parentButtonDown" inherits="CHH_BuffListButtonDownTemplate" />
				</Frames>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				this.buffIdx = 'none';
			</OnLoad>
		</Scripts>
	</Frame>

        <!-- ===== Buff List Template ====================================================================================================== -->
	<Frame name="CHH_BuffListTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="10" y="-10"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM">
				<Offset>
					<AbsDimension x="30" y="140"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_BUFF_AVAILABLE_BUFFS );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<Frame name="$parentBuff1" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-30" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-10" y="-60" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff2" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff1">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff1">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff3" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff2">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff2">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff4" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff3">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff3">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff5" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff4">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff4">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff6" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff5">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff5">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff7" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff6">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff6">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff8" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff7">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff7">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff9" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff8">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff8">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff10" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff9">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff9">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff11" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff10">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff10">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentBuff12" inherits="CHH_BuffListEntryTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentBuff11">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentBuff11">
						<Offset>
							<AbsDimension x="0" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
		</Frames>
	</Frame>

        <!-- ===== Buff Classes Button ===================================================================================================== -->

	<CheckButton name="CHH_BuffClassClassTemplate" inherits="OptionsCheckButtonTemplate" checked="true" virtual="true">
		<Layers>
			<Layer>
		                <FontString name="$parentName" inherits="GameFontNormal" text="class">
		                 	<Anchors>
		                    		<Anchor point="LEFT" relativePoint="RIGHT" />
       					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				CHH_BuffClassClicked( this.class );
			</OnClick>
		</Scripts>
	</CheckButton>

        <!-- ===== Buff Class Assign Template ============================================================================================== -->

	<Frame name="CHH_BuffClassTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Anchors>
			<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-20" y="-10"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMLEFT" relativePoint="TOP">
				<Offset>
					<AbsDimension x="50" y="-205"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_BUFF_ALLOWED_CLASSES );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<CheckButton name="$parentDRUID" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'DRUID';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentHUNTER" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOP">
						<Offset>
							<AbsDimension x="15" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'HUNTER';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentMAGE" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDRUID" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'MAGE';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentPALADIN" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHUNTER" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'PALADIN';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentPRIEST" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentMAGE" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'PRIEST';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentROGUE" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPALADIN" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'ROGUE';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentSHAMAN" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPRIEST" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'SHAMAN';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentWARLOCK" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentROGUE" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'WARLOCK';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentWARRIOR" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSHAMAN" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'WARRIOR';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentPET" inherits="CHH_BuffClassClassTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentWARLOCK" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'PET';
						getglobal(this:GetName().."Name"):SetText( CH_LocalClass(this.class) );
					</OnLoad>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

        <!-- ===== Buff Units Button ===================================================================================================== -->

	<CheckButton name="CHH_BuffUnitUnitTemplate" inherits="OptionsCheckButtonTemplate" checked="true" virtual="true">
		<Layers>
			<Layer>
		                <FontString name="$parentName" inherits="GameFontNormal" text="class">
		                 	<Anchors>
		                    		<Anchor point="LEFT" relativePoint="RIGHT" />
       					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				CHH_BuffUnitClicked( this.unit );
			</OnClick>
		</Scripts>
	</CheckButton>

        <!-- ===== Buff Unit Assign Template ============================================================================================== -->

	<Frame name="CHH_BuffUnitTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOM">
				<Offset>
					<AbsDimension x="50" y="340"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
				<Offset>
					<AbsDimension x="-20" y="180"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_BUFF_ALLOWED_UNITS );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<CheckButton name="$parentplayer" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'player';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PLAYER );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentpet" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOP">
						<Offset>
							<AbsDimension x="15" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'pet';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PET );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentparty" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentplayer" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'party';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PARTY );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentpartypet" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentpet" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'partypet';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PARTYPET );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentraid" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentparty" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'raid';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_RAID );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parenttarget" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentraid" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'target';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_TARGET );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentraidpet" inherits="CHH_BuffUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentpartypet" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.unit = 'raidpet';
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_RAIDPET );
					</OnLoad>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

	<!-- ===== Buff Data Frame ======================================================================================================== -->

	<Frame name="CHH_BuffDataTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOM">
				<Offset>
					<AbsDimension x="50" y="180"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
				<Offset>
					<AbsDimension x="-20" y="40"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_BUFF_BUFF_DATA );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<Slider name="$parentWarnExpire" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="250" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-60"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CHH_BuffDataSliderClicked( 'warnTime' );
					</OnValueChanged>
				</Scripts>
			</Slider>
			<Slider name="$parentRefreshTime" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="250" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-100"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnValueChanged>
						CHH_BuffDataSliderClicked( 'refreshTime' );
					</OnValueChanged>
				</Scripts>
			</Slider>
		</Frames>
	</Frame>

	<!-- ===== The Party Buff frame ========================================================================================================== -->
	<Frame name="CHH_PartyBuffFrameTemplate" inherits="CHH_ContentTemplate" virtual="true"> <!-- inherits="CHH_FrameBoxTemplate" virtual="true">-->
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
				<Offset>
					<AbsDimension x="10" y="140"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM">
				<Offset>
					<AbsDimension x="30" y="40"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentMissingMyText" inherits="GameFontNormal" justifyH="LEFT" text="CHHT_BUFF_UPGRADE_Q">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="10" y="0" />
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
							<Offset>
								<AbsDimension x="-10" y="-40" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentMissing" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentMissingMyText" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-10" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Size>
					<AbsDimension x="150" y="16"/>
				</Size>
				<Scripts>
					<OnEnter>
						CH_HintTooltipShow( this, nil, 0, 0, CHT_HINT_BUFF_PARTY_SPELL_MEMBERS );
					</OnEnter>
					<OnLeave>
						CH_HintTooltipHide();
					</OnLeave>
				</Scripts>
			</Frame>
			<CheckButton name="$parentUpgrade" inherits="OptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-60" />
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentMyText" inherits="GameFontNormal" text="CHHT_BUFF_UPGRADE_MSG">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CHH_BuffPartyUpgradeClicked();
					</OnClick>
					<OnEnter>
						CH_HintTooltipShow( this, nil, 0, 0, CHT_HINT_BUFF_PARTY_SPELL_UPGRADE );
					</OnEnter>
					<OnLeave>
						CH_HintTooltipHide();
					</OnLeave>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentInBattlefield" inherits="OptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="200" y="-60" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentMyText" inherits="GameFontNormal" text="CHHT_BUFF_IN_BATTLEFIELD">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CHH_BuffPartyInBattlefieldClicked();
					</OnClick>
					<OnEnter>
						CH_HintTooltipShow( this, nil, 0, 0, CHT_HINT_BUFF_PARTY_SPELL_BATTLEFIELD );
					</OnEnter>
					<OnLeave>
						CH_HintTooltipHide();
					</OnLeave>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

	<!-- ##################################################################################################################################### -->
	<!-- # BUFF TAB                                                                                                                          # -->
	<!-- ##################################################################################################################################### -->

	<Frame name="CHH_BuffTemplate" hidden="true" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" />
		</Anchors>
		<Frames>
			<Frame name="$parentGeneral" inherits="CHH_BuffGeneralFrameTemplate" hidden="true"/>
			<Frame name="$parentList" inherits="CHH_BuffListTemplate" hidden="true"/>
			<Frame name="$parentClass" inherits="CHH_BuffClassTemplate" hidden="true"/>
			<Frame name="$parentUnit" inherits="CHH_BuffUnitTemplate" hidden="true"/>
			<Frame name="$parentData" inherits="CHH_BuffDataTemplate" hidden="true"/>
			<Frame name="$parentParty" inherits="CHH_PartyBuffFrameTemplate" hidden="true"/>

			<Button name="$parentPage1Button" inherits="OptionsButtonTemplate" text="CHHT_BUFF_PAGE1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="20" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_BuffInit( 'options' );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage2Button" inherits="OptionsButtonTemplate" text="CHHT_BUFF_PAGE2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage1Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_BuffInit( 'list' );
					</OnClick>
				</Scripts>
			</Button>

			<Button name="$parentResetButton" inherits="OptionsButtonTemplate" text="CHHT_LABEL_DEFAULTS">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-20" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_ResetDefaults();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

</Ui>
