<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="Blizzard_TradeSkillUI.lua"/>
	<Button name="TradeSkillSkillButtonTemplate" inherits="ClassTrainerSkillButtonTemplate" hidden="false" virtual="true">
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentCount" inherits="GameFontNormal">
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="0" y="0"/>
						</Anchor>
						<Size x="0" y="13"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				if ( IsModifiedClick() ) then
					HandleModifiedItemClick(GetTradeSkillRecipeLink(self:GetID()));
				else
					TradeSkillSkillButton_OnClick(self, button);
				end
			</OnClick>
			<OnLoad>
				_G[self:GetName().."Count"]:SetPoint("LEFT", self:GetName().."Text", "RIGHT", 2, 0);
			</OnLoad>
			<OnEnter>
				_G[self:GetName().."Count"]:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
			</OnEnter>
			<OnLeave>
				if ( not self.isHighlighted ) then
					_G[self:GetName().."Count"]:SetVertexColor(self.r, self.g, self.b);
				end
			</OnLeave>
		</Scripts>
	</Button>
	<Button name="TradeSkillItemTemplate" inherits="QuestItemTemplate" virtual="true">
		<Scripts>
			<OnEnter>
				GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT");
				GameTooltip:SetTradeSkillItem(TradeSkillFrame.selectedSkill, self:GetID());
				CursorUpdate(self);
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
				ResetCursor();
			</OnLeave>
			<OnUpdate>
				CursorOnUpdate(self);
			</OnUpdate>
			<OnClick>
				HandleModifiedItemClick(GetTradeSkillReagentItemLink(TradeSkillFrame.selectedSkill, self:GetID()));
			</OnClick>
		</Scripts>
	</Button>
	<Frame name="TradeSkillFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<Size>
			<AbsDimension x="384" y="512"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="0" y="-104"/>
				</Offset>
			</Anchor>
		</Anchors>
		<HitRectInsets>
			<AbsInset left="0" right="34" top="0" bottom="75"/>
		</HitRectInsets>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="TradeSkillFramePortrait">
				  <Size>
					<AbsDimension x="60" y="60"/>
				  </Size>
				  <Anchors>
					<Anchor point="TOPLEFT">
					  <Offset>
						<AbsDimension x="7" y="-6"/>
					  </Offset>
					</Anchor>
				  </Anchors>
				</Texture>
				<FontString name="$parentDummyString" inherits="GameFontNormal" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<Size x="0" y="0"/>
				</FontString>
			  </Layer>
			<Layer level="BORDER">
				<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>		
				<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="TradeSkillFrameBottomLeftTexture" file="Interface\TradeSkillFrame\UI-TradeSkill-BotLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOMLEFT"/>
					</Anchors>
				</Texture>
				<Texture name="TradeSkillFrameBottomRightTexture" file="Interface\ClassTrainerFrame\UI-ClassTrainer-BotRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<FontString name="TradeSkillFrameTitleText" inherits="GameFontNormal" text="Trade Skills">
					<Anchors>
						<Anchor point="TOP" relativeTo="TradeSkillFrame" relativePoint="TOP">
							<Offset>
								<AbsDimension x="0" y="-17"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="TradeSkillHorizontalBarLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
					<Size>
						<AbsDimension x="256" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="15" y="-221"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="1.0" top="0" bottom="0.25"/>
				</Texture>
				<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
					<Size>
						<AbsDimension x="75" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="TradeSkillHorizontalBarLeft" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.29296875" top="0.25" bottom="0.5"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
            <Button name="TradeSkillLinkButton">
				<Size>
					<AbsDimension x="32" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="TradeSkillFrameTitleText" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="5" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local link=GetTradeSkillListLink();
						if (not ChatEdit_InsertLink(link) ) then
							ChatFrameEditBox:Show();
							ChatEdit_InsertLink(link);
						end
					</OnClick>
					<OnEnter>
						GameTooltip:SetOwner(self,"ANCHOR_TOPLEFT");
						GameTooltip:SetText(LINK_TRADESKILL_TOOLTIP, nil, nil, nil, nil, 1);
						GameTooltip:Show();
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<NormalTexture file="Interface\TradeSkillFrame\UI-TradeSkill-LinkButton">
					<TexCoords left="0" right="1.0" top="0" bottom="0.5"/>
				</NormalTexture>
				<HighlightTexture file="Interface\TradeSkillFrame\UI-TradeSkill-LinkButton" alphaMode="ADD">
					<TexCoords left="0" right="1.0" top="0.5" bottom="1.0"/>
				</HighlightTexture>
			</Button>
			<CheckButton name="TradeSkillFrameAvailableFilterCheckButton" inherits="UICheckButtonTemplate">
				<Size>
					<AbsDimension x="24" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="70" y="-46"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						TradeSkillFrameAvailableFilterCheckButtonText:SetText(CRAFT_IS_MAKEABLE);
					</OnLoad>
					<OnClick>
						TradeSkillOnlyShowMakeable(self:GetChecked());
					</OnClick>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_LEFT");
						GameTooltip:SetText(CRAFT_IS_MAKEABLE_TOOLTIP, nil, nil, nil, nil, 1);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<HitRectInsets>
					<AbsInset left="0" right="-75" top="0" bottom="0"/>
				</HitRectInsets>
			</CheckButton>
			<StatusBar name="TradeSkillRankFrame" drawLayer="BACKGROUND" minValue="0" maxValue="1" defaultValue="0" enableMouse="false">
				<Size>
					<AbsDimension x="265" y="14"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="75" y="-36"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentSkillRank" inherits="GameFontHighlightSmall" justifyH="CENTER">
							<Size>
								<AbsDimension x="0" y="9"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="TradeSkillFrameTitleText">
									<Offset>
										<AbsDimension x="0" y="-20"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<Texture name="$parentBorder" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder">
							<Size>
								<AbsDimension x="274" y="27"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT">
									<Offset>
										<AbsDimension x="-5" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND">
						<Texture name="$parentBackground">
							<Color r="1.0" g="1.0" b="1.0" a="0.2"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:RegisterEvent("SKILL_LINES_CHANGED");
					</OnLoad>
					<OnEvent>
						if ( event == "SKILL_LINES_CHANGED" ) then
							TradeSkillFrame_Update();
						end
					</OnEvent>
				</Scripts>
				<BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar" />
				<BarColor r="0.25" g="0.25" b="0.75" />
			</StatusBar>
			<EditBox name="$parentEditBox" autoFocus="false">
				<Size>
					<AbsDimension x="128" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="TradeSkillRankFrame" relativePoint="BOTTOMRIGHT">
						<Offset x="2" y="2"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-5" y="0"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="0" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
								<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
							</Anchors>
							<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnShow>
						self:SetText(SEARCH);
					</OnShow>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnEscapePressed>
						self:ClearFocus();
					</OnEscapePressed>
					<OnTextChanged>
						TradeSkillFilter_OnTextChanged(self);
					</OnTextChanged>
					<OnEditFocusLost>
						self:HighlightText(0, 0);
						if ( self:GetText() == "" ) then
							self:SetText(SEARCH);
						end
					</OnEditFocusLost>
					<OnEditFocusGained>
						self:HighlightText();
						if ( self:GetText() == SEARCH ) then
							self:SetText("");
						end
					</OnEditFocusGained>
				</Scripts>
				<FontString inherits="ChatFontSmall"/>
			</EditBox>
			<Frame name="TradeSkillExpandButtonFrame">
				<Size>
					<AbsDimension x="54" y="32"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="15" y="-71"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="TradeSkillExpandTabLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-ExpandTab-Left">
							<Size>
								<AbsDimension x="8" y="32"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT"/>
							</Anchors>
						</Texture>
						<Texture name="TradeSkillExpandTabMiddle" file="Interface\QuestFrame\UI-QuestLogSortTab-Middle">
							<Size>
								<AbsDimension x="38" y="32"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="TradeSkillExpandTabLeft" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="0" y="6"/>
									</Offset>
								</Anchor>
							</Anchors>
						</Texture>
						<Texture name="TradeSkillExpandTabRight" file="Interface\QuestFrame\UI-QuestLogSortTab-Right">
							<Size>
								<AbsDimension x="8" y="32"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="TradeSkillExpandTabMiddle" relativePoint="RIGHT"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Button name="TradeSkillCollapseAllButton" hidden="false" inherits="ClassTrainerSkillButtonTemplate">
						<Size>
							<AbsDimension x="40" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="TradeSkillExpandTabLeft" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="0" y="3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								getglobal(self:GetName()):SetText(ALL);
							</OnLoad>
							<OnClick>
								TradeSkillCollapseAllButton_OnClick(self);
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Frame name="TradeSkillInvSlotDropDown" inherits="UIDropDownMenuTemplate" id="2">
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="-25" y="-66"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						TradeSkillInvSlotDropDown_OnLoad(self);
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="TradeSkillSubClassDropDown" inherits="UIDropDownMenuTemplate" id="1">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="TradeSkillInvSlotDropDown" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="35" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						TradeSkillSubClassDropDown_OnLoad(self);
					</OnLoad>
				</Scripts>
			</Frame>
			
			<Frame name="TradeSkillHighlightFrame" hidden="true">
				<Size>
					<AbsDimension x="293" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="TradeSkillHighlight" file="Interface\Buttons\UI-Listbox-Highlight2"/>
					</Layer>
				</Layers>
			</Frame>
			<Button name="TradeSkillSkill1" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillFrame">
						<Offset>
							<AbsDimension x="22" y="-96"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill2" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill3" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill2" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill4" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill3" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill5" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill4" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill6" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill5" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill7" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill6" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="TradeSkillSkill8" inherits="TradeSkillSkillButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="TradeSkillSkill7" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<ScrollFrame name="TradeSkillListScrollFrame" inherits="ClassTrainerListScrollFrameTemplate">
				<Size>
					<AbsDimension x="296" y="130"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="TradeSkillFrame" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-67" y="-96"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnVerticalScroll>
						FauxScrollFrame_OnVerticalScroll(self, offset, TRADE_SKILL_HEIGHT, TradeSkillFrame_Update);
					</OnVerticalScroll>
				</Scripts>
			</ScrollFrame>
			<ScrollFrame name="TradeSkillDetailScrollFrame" inherits="ClassTrainerDetailScrollFrameTemplate">
				<Size>
					<AbsDimension x="297" y="176"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-234"/>
						</Offset>
					</Anchor>
				</Anchors>
				<ScrollChild>
					<Frame name="TradeSkillDetailScrollChildFrame">
						<Size>
							<AbsDimension x="297" y="150"/>
						</Size>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="TradeSkillSkillName" inherits="GameFontNormal" text="Skill Name" justifyH="LEFT">
									<Size>
										<AbsDimension x="244" y="0"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="50" y="-5"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
								<FontString name="TradeSkillRequirementLabel" inherits="GameFontHighlightSmall" text="REQUIRES_LABEL">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="TradeSkillSkillName" relativePoint="BOTTOMLEFT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
								<FontString name="TradeSkillRequirementText" inherits="GameFontHighlightSmall" justifyV="TOP" justifyH="LEFT">
									<Size>
										<AbsDimension x="180" y="0"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="TradeSkillRequirementLabel" relativePoint="TOPRIGHT" >
											<Offset>
												<AbsDimension x="4" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							<!--
								<FontString name="TradeSkillSkillLineName" inherits="GameFontHighlightSmall" text="Skill Line">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="TradeSkillSkillName" relativePoint="BOTTOMLEFT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							-->
								<FontString name="TradeSkillSkillCooldown" inherits="GameFontRedSmall">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="TradeSkillRequirementLabel" relativePoint="BOTTOMLEFT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
								<Texture name="TradeSkillDetailHeaderLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-DetailHeaderLeft">
									<Size>
										<AbsDimension x="256" y="64"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="0" y="3"/>
											</Offset>
										</Anchor>
									</Anchors>
								</Texture>
								<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-DetailHeaderRight">
									<Size>
										<AbsDimension x="64" y="64"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="TradeSkillDetailHeaderLeft" relativePoint="TOPRIGHT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</Texture>
								<FontString name="TradeSkillDescription" inherits="GameFontHighlightSmall" justifyH="LEFT">
									<Size>
										<AbsDimension x="290" y="0"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="5" y="-50"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
								<FontString name="TradeSkillReagentLabel" inherits="GameFontNormalSmall" text="SPELL_REAGENTS">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="TradeSkillDescription" relativePoint="BOTTOMLEFT">
											<Offset>
												<AbsDimension x="0" y="-10"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<Button name="TradeSkillSkillIcon">
								<Size>
									<AbsDimension x="37" y="37"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="8" y="-3"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Layers>
									<Layer level="ARTWORK">
										<FontString name="TradeSkillSkillIconCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="false">
											<Anchors>
												<Anchor point="BOTTOMRIGHT">
													<Offset>
														<AbsDimension x="-5" y="2"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
								<Scripts>
									<OnLoad>
										self.hasItem = 1;
									</OnLoad>
									<OnClick>
										HandleModifiedItemClick(GetTradeSkillItemLink(TradeSkillFrame.selectedSkill));
									</OnClick>
									<OnEnter>
										TradeSkillItem_OnEnter(self);
									</OnEnter>
									<OnLeave>
										GameTooltip:Hide();
										ResetCursor();
									</OnLeave>
									<OnUpdate>
										if ( GameTooltip:IsOwned(self) ) then
											TradeSkillItem_OnEnter(self);
										end
										CursorOnUpdate(self);
									</OnUpdate>
								</Scripts>
							</Button>
							<Button name="TradeSkillReagent1" inherits="TradeSkillItemTemplate" id="1">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="TradeSkillReagentLabel" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="-2" y="-3"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent2" inherits="TradeSkillItemTemplate" id="2">
								<Anchors>
									<Anchor point="LEFT" relativeTo="TradeSkillReagent1" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="0" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent3" inherits="TradeSkillItemTemplate" id="3">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="TradeSkillReagent1" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-2"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent4" inherits="TradeSkillItemTemplate" id="4">
								<Anchors>
									<Anchor point="LEFT" relativeTo="TradeSkillReagent3" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="0" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent5" inherits="TradeSkillItemTemplate" id="5">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="TradeSkillReagent3" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-2"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent6" inherits="TradeSkillItemTemplate" id="6">
								<Anchors>
									<Anchor point="LEFT" relativeTo="TradeSkillReagent5" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="0" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent7" inherits="TradeSkillItemTemplate" id="7">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="TradeSkillReagent6" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="-2"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
							<Button name="TradeSkillReagent8" inherits="TradeSkillItemTemplate" id="8">
								<Anchors>
									<Anchor point="LEFT" relativeTo="TradeSkillReagent7" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="0" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
							</Button>
						</Frames>
					</Frame>
				</ScrollChild>
			</ScrollFrame>
			<Button name="TradeSkillCreateButton" inherits="UIPanelButtonTemplate" text="CREATE">
				<Size>
					<AbsDimension x="80" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="TradeSkillFrame" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="224" y="-422"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Frame name="$parentMask" setAllPoints="true" enableMouse="true" hidden="true">
						<Scripts>
							<OnEnter>
								if (self.tooltip) then
									GameTooltip:SetOwner(self, "ANCHOR_LEFT");
									GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, 1);
								end
							</OnEnter>
							<OnLeave>
								if (self.tooltip) then
									GameTooltip:Hide();
								end
							</OnLeave>
						</Scripts>
					</Frame>
				</Frames>
				<Scripts>
					<OnClick>
						if ( (not PartialPlayTime()) and (not NoPlayTime()) ) then
							DoTradeSkill(TradeSkillFrame.selectedSkill, TradeSkillInputBox:GetNumber());
							TradeSkillInputBox:ClearFocus();
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TradeSkillCancelButton" inherits="UIPanelButtonTemplate" text="EXIT">
				<Size>
					<AbsDimension x="80" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="TradeSkillFrame" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="305" y="-422"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						HideUIPanel(TradeSkillFrame);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TradeSkillCreateAllButton" inherits="UIPanelButtonTemplate" text="CREATE_ALL">
				<Size>
					<AbsDimension x="80" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="TradeSkillCreateButton" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="-86" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Frame name="$parentMask" setAllPoints="true" enableMouse="true" hidden="true">
						<Scripts>
							<OnEnter>
								if (self.tooltip) then
									GameTooltip:SetOwner(self, "ANCHOR_LEFT");
									GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, 1);
								end
							</OnEnter>
							<OnLeave>
								if (self.tooltip) then
									GameTooltip:Hide();
								end
							</OnLeave>
						</Scripts>
					</Frame>
				</Frames>
				<Scripts>
					<OnClick>
						if ( (not PartialPlayTime()) and (not NoPlayTime()) ) then
							TradeSkillInputBox:SetNumber(TradeSkillFrame.numAvailable);
							DoTradeSkill(TradeSkillFrame.selectedSkill, TradeSkillFrame.numAvailable);
							TradeSkillInputBox:ClearFocus();
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TradeSkillDecrementButton">
				<Size>
					<AbsDimension x="23" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="TradeSkillCreateAllButton" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="3" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						TradeSkillFrameDecrement_OnClick();
						TradeSkillInputBox:ClearFocus();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
				<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
			<EditBox name="TradeSkillInputBox" letters="3" numeric="true" autoFocus="false">
				<Size>
					<AbsDimension x="30" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="TradeSkillDecrementButton" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="4" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="-5" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="10" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
								<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
							</Anchors>
							<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnEscapePressed>
						self:ClearFocus();
					</OnEscapePressed>
					<OnTextChanged>
						if ( self:GetText() == "0" ) then
							self:SetText("1");
						end
					</OnTextChanged> 
					<OnEditFocusLost>
						self:HighlightText(0, 0);
					</OnEditFocusLost>
					<OnEditFocusGained>
						self:HighlightText();
					</OnEditFocusGained>
				</Scripts>
				<FontString inherits="ChatFontNormal"/>
			</EditBox>
			<Button name="TradeSkillIncrementButton">
				<Size>
					<AbsDimension x="23" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="TradeSkillCreateButton" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="-3" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						TradeSkillFrameIncrement_OnClick();
						TradeSkillInputBox:ClearFocus();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
				<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
			<Button name="TradeSkillFrameCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="TradeSkillFrame" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-29" y="-8"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				TradeSkillFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				TradeSkillFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				TradeSkillInputBox:SetNumber(1);                
				PlaySound("igCharacterInfoOpen");
			</OnShow>
			<OnHide>
				CloseTradeSkill();
				PlaySound("igCharacterInfoClose");
			</OnHide>
			<OnUpdate>
				TradeSkillFrame_PlaytimeUpdate();
			</OnUpdate>
			<OnMouseWheel>
				return;
			</OnMouseWheel>
		</Scripts>
	</Frame>
</Ui>
