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

	<!-- ##################################################################################################################################### -->
	<!-- # PANIC CONFIG                                                                                                                      # -->
	<!-- ##################################################################################################################################### -->

        <!-- ===== Panic Units Button ===================================================================================================== -->

	<CheckButton name="CHH_PanicUnitUnitTemplate" inherits="HintOptionsCheckButtonTemplate" 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>
	</CheckButton>

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

	<Frame name="CHH_PanicUnitTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( 'PANIC: Heal' );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Size>
			<AbsDimension x="250" y="130"/>
		</Size>
		<Frames>
			<CheckButton name="$parentPlayer" inherits="CHH_PanicUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PLAYER );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentPet" inherits="CHH_PanicUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOP">
						<Offset>
							<AbsDimension x="15" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PET );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentParty" inherits="CHH_PanicUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPlayer" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PARTY );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentPartyPet" inherits="CHH_PanicUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPet" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_PARTYPET );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentRaid" inherits="CHH_PanicUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentParty" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_RAID );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentRaidPet" inherits="CHH_PanicUnitUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPartyPet" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						getglobal(this:GetName().."Name"):SetText( CHHT_LABEL_RAIDPET );
					</OnLoad>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

        <!-- ===== The Panic General frame ==================================================================================================== -->
	<Frame name="CHH_PanicGeneralFrameTemplate" 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_PANIC_OPTIONS );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<Frame name="$parentPanicHeal" inherits="CHH_PanicUnitTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="40" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentPanicBuff" inherits="CHH_PanicUnitTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPanicHeal" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="60" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<CheckButton name="$parentPanicCure" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-190" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
	                			<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_PANIC_CURE_UNITS">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'panicCure' );
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentUnmapped" inherits="HintOptionsCheckButtonTemplate" checked="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-220" />
						</Offset>
						
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
	                			<FontString name="$parentName" inherits="GameFontNormal" text="CHHT_PANIC_UNMAPPED">
	                 				<Anchors>
	                    					<Anchor point="LEFT" relativePoint="RIGHT" />
       							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CHH_HintOptionCheckBoxLoad( 'panicOnUnmapped' );
					</OnLoad>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

        <!-- ===== The Panic Behavior frame ==================================================================================================== -->
	<Button name="CHH_PanicBehaviorClassLabelTemplate" virtual="true">
		<Size>
			<AbsDimension x="100" y="20"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" setAllpoints="true" hidden="true">
					<Color r="0.3" g="0.3" b="0.3" a="0.6"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
            			<FontString name="$parentLabel" inherits="GameFontNormal" text="Class">
                			<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" />
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				this.class = 'UNKNOWN';
			</OnLoad>
			<OnShow>
				getglobal(this:GetName()..'Label'):SetText( CH_LocalClass(this.class) );
			</OnShow>
			<OnClick>
				CHH_PanicBehaviorClassClicked( this.class );
			</OnClick>
		</Scripts>
	</Button>

	<Button name="CHH_PanicBehaviorEmergencySpellTemplate" virtual="true">
		<Size>
			<AbsDimension x="350" y="40"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" setAllpoints="true" hidden="true">
					<Color r="0.3" g="0.3" b="0.3" a="0.6"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
            			<FontString name="$parentLabel" inherits="GameFontNormal" justifyH="LEFT" text="Spell">
                			<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" />
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				this.emergency = nil;
			</OnLoad>
			<OnClick>
				CHH_PanicBehaviorEmergencySpellClicked( this.emergency );
			</OnClick>
		</Scripts>
	</Button>

	<Frame name="CHH_PanicBehaviorSpellEditTemplate" virtual="true">
		<Size>
			<AbsDimension x="400" y="30"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
            			<FontString name="$parentTitel" inherits="GameFontNormal" justifyH="RIGHT" text="Spell X">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="80" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
            			<FontString name="$parentSpell" inherits="GameFontNormal" justifyH="LEFT" text="SpellData">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="90" y="0"/>
							</Offset>
						</Anchor>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-100" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentSpellSelect" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentTitel" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<CheckButton name="$parentForceCast" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="LEFT" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="-100" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
            					<FontString name="$parentLabel" inherits="GameFontNormal" justifyH="RIGHT" text="CHHT_PANIC_BEHAVIOR_FORCE_CAST">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Color r="1" g="1" b="1" />
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CHH_PanicBehaviorForceClicked( );
					</OnClick>
				</Scripts>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				this.spellIdx = -1;
			</OnLoad>
			<OnShow>
				getglobal(this:GetName()..'Titel'):SetText( string.format(CHHT_PANIC_BEHAVIOR_SPELL_TITLE_FORMAT,this.spellIdx) );
			</OnShow>
			<OnClick>
				CHH_PanicBehaviorEmergencySpellClicked( this.emergency );
			</OnClick>
		</Scripts>
	</Frame>

	<Frame name="CHH_PanicBehaviorClassesTemplate" inherits="OptionFrameBoxTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Size>
			<AbsDimension x="110" y="250"/>
		</Size>
		<Frames>
			<Frame name="$parentTitle">
				<Size>
					<AbsDimension x="90" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="0" y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>			
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="8"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="8"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="2" right="2" top="2" bottom="2"/>
					</BackgroundInsets>
				</Backdrop>
				<Layers>
					<Layer>
				                <FontString name="$parentText" inherits="GameFontNormal" text="CHHT_PANIC_BEHAVIOR_CLASSES">
				                 	<Anchors>
				                    		<Anchor point="CENTER">
                          						<Offset>
                              							<AbsDimension x="0" y="0"/>
                          						</Offset>
                      						</Anchor>
                  					</Anchors>
              					</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.15, 0.15, 0.15);
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="$parentDRUID" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="5" y="-40"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'DRUID';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentHUNTER" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentDRUID" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'HUNTER';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentMAGE" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentHUNTER" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'MAGE';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentPALADIN" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentMAGE" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'PALADIN';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentPRIEST" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentPALADIN" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'PRIEST';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentROGUE" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentPRIEST" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'ROGUE';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentSHAMAN" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentROGUE" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'SHAMAN';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentWARLOCK" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentSHAMAN" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'WARLOCK';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentWARRIOR" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentWARLOCK" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'WARRIOR';
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentPET" inherits="CHH_PanicBehaviorClassLabelTemplate">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentWARRIOR" relativePoint="BOTTOM" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.class = 'PET';
					</OnLoad>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<Frame name="CHH_PanicBehaviorEmergencyTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_PANIC_BEHAVIOR_EMERGENCY_LEVELS );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Size>
			<AbsDimension x="550" y="250"/>
		</Size>
		<Layers>
			<Layer>
               			<FontString name="$parentNoneLabel" inherits="GameFontNormal" justifyH="RIGHT" text="CHT_LABEL_EMERGENCY_NONE">
                			<Anchors>
                   				<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="180" y="-50"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
               			<FontString name="$parentWoundedLabel" inherits="GameFontNormal" justifyH="RIGHT" text="CHT_LABEL_EMERGENCY_WOUNDED">
                			<Anchors>
                   				<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="180" y="-90"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
               			<FontString name="$parentFairLabel" inherits="GameFontNormal" justifyH="RIGHT" text="CHT_LABEL_EMERGENCY_FAIR">
                			<Anchors>
                   				<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="180" y="-130"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
               			<FontString name="$parentPoorLabel" inherits="GameFontNormal" justifyH="RIGHT" text="CHT_LABEL_EMERGENCY_POOR">
                			<Anchors>
                   				<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="180" y="-170"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
               			<FontString name="$parentCriticLabel" inherits="GameFontNormal" justifyH="RIGHT" text="CHT_LABEL_EMERGENCY_CRITIC">
                			<Anchors>
                   				<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="180" y="-210"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentNoneSpell" inherits="CHH_PanicBehaviorEmergencySpellTemplate">
               			<Anchors>
					<Anchor point="LEFT" relativeTo="$parentNoneLabel" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.emergency = CH_EMERGENCY_NONE;
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentWoundedSpell" inherits="CHH_PanicBehaviorEmergencySpellTemplate">
               			<Anchors>
					<Anchor point="LEFT" relativeTo="$parentWoundedLabel" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.emergency = CH_EMERGENCY_WOUNDED;
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentFairSpell" inherits="CHH_PanicBehaviorEmergencySpellTemplate">
               			<Anchors>
					<Anchor point="LEFT" relativeTo="$parentFairLabel" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.emergency = CH_EMERGENCY_FAIR;
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentPoorSpell" inherits="CHH_PanicBehaviorEmergencySpellTemplate">
               			<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPoorLabel" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.emergency = CH_EMERGENCY_POOR;
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="$parentCriticSpell" inherits="CHH_PanicBehaviorEmergencySpellTemplate">
               			<Anchors>
					<Anchor point="LEFT" relativeTo="$parentCriticLabel" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="10" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.emergency = CH_EMERGENCY_CRITIC;
					</OnLoad>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<Frame name="CHH_PanicBehaviorSpellEditListTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_PANIC_BEHAVIOR_SPELL_EDIT );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Size>
			<AbsDimension x="550" y="160"/>
		</Size>
		<Frames>
			<Frame name="$parent1" inherits="CHH_PanicBehaviorSpellEditTemplate">
               			<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="10" y="-40"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						this.spellIdx = 1;
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parent2" inherits="CHH_PanicBehaviorSpellEditTemplate">
               			<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent1" relativePoint="BOTTOMLEFT" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.spellIdx = 2;
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parent3" inherits="CHH_PanicBehaviorSpellEditTemplate">
               			<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent2" relativePoint="BOTTOMLEFT" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.spellIdx = 3;
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parent4" inherits="CHH_PanicBehaviorSpellEditTemplate">
               			<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent3" relativePoint="BOTTOMLEFT" />
				</Anchors>
				<Scripts>
					<OnLoad>
						this.spellIdx = 4;
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="$parentCommit" inherits="OptionsButtonTemplate" text="CHHT_LABEL_UPDATE">
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="$parent4" relativePoint="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="10" y="10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_PanicBehaviorSpellUpdateClicked();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<Frame name="CHH_PanicBehaviorFrameTemplate" 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>
		<Layers>
			<Layer>
               			<FontString name="$parentBehaviorMyText" inherits="GameFontNormal" justifyH="RIGHT" text="CHHT_PANIC_BEHAVIOR_LABEL">
                			<Anchors>
                   				<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="20" y="-50"/>
							</Offset>
						</Anchor>
                   				<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
							<Offset>
								<AbsDimension x="-250" y="-70"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_PANIC_BEHAVIOR );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<Frame name="$parentBehavior" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentBehaviorMyText" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentClasses" inherits="CHH_PanicBehaviorClassesTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-80"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CHH_PanicBehaviorEmergency" inherits="CHH_PanicBehaviorEmergencyTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="130" y="-80"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CHH_PanicBehaviorSpellEdit" inherits="CHH_PanicBehaviorSpellEditListTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="130" y="-330"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
		</Frames>
	</Frame>

        <!-- ===== The PANIC config =================================================================================== -->
	<Frame name="CHH_PanicTemplate" hidden="true" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" />
		</Anchors>
		<Frames>
			<Frame name="$parentGeneral" inherits="CHH_PanicGeneralFrameTemplate" hidden="true" />
			<Frame name="$parentBehavior" inherits="CHH_PanicBehaviorFrameTemplate" hidden="true" />
			<Frame name="$parentAction" inherits="CHH_ActionFrameTemplate" hidden="true" />

			<Button name="$parentPage1Button" inherits="OptionsButtonTemplate" text="CHHT_PANIC_PAGE1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="20" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_PanicInit();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage2Button" inherits="OptionsButtonTemplate" text="CHHT_PANIC_PAGE2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage1Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_PanicBehaviorInit();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage3Button" inherits="OptionsButtonTemplate" text="CHHT_PANIC_PAGE3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage2Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_InitTabs( CHH_Panic, CHH_PanicAction, 'PANIC', 'MOUSE', nil, nil );
						CHH_SpellAssignInit( 'CHH_PanicAction', 'Panic', 'panic', 1, CHHT_PANIC_MOUSE_TITLE );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage4Button" inherits="OptionsButtonTemplate" text="CHHT_PANIC_PAGE4">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage3Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_InitTabs( CHH_Panic, CHH_PanicAction, 'PANIC', 'MOUSE', nil, nil );
						CHH_SpellAssignInit( 'CHH_PanicAction', 'Panic', 'panic', 2, CHHT_PANIC_MOUSE_TITLE );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage5Button" inherits="OptionsButtonTemplate" text="CHHT_PANIC_PAGE5">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage4Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_InitTabs( CHH_Panic, CHH_PanicAction, 'PANIC', 'MOUSE', nil, nil );
						CHH_SpellAssignInit( 'CHH_PanicAction', 'Panic', 'panic', 3, CHHT_PANIC_MOUSE_TITLE );
					</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>
