<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="MailFrame.lua"/>
	<CheckButton name="SendMailRadioButtonTemplate" inherits="UIRadioButtonTemplate" virtual="true">
		<Scripts>
			<OnClick>
				SendMailRadioButton_OnClick(self:GetID());
				SendMailFrame_CanSend();
			</OnClick>
		</Scripts>
	</CheckButton>
	<Frame name="MailItemTemplate" virtual="true">
		<Size>
			<AbsDimension x="305" y="45"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\MailFrame\MailItemBorder">
					<Size>
						<AbsDimension x="42" y="48"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
					<TexCoords left="0" right="0.1640625" top="0" bottom="0.75"/>
				</Texture>
				<Texture file="Interface\MailFrame\MailItemBorder">
					<Size>
						<AbsDimension x="263" y="48"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT"/>
					</Anchors>
					<TexCoords left="0.1640625" right="1.0" top="0" bottom="0.75"/>
				</Texture>
				<Texture>
					<Size>
						<AbsDimension x="322" y="2"/>
					</Size>
					<Anchors>
						<Anchor point="TOP" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="0.33" g="0.16" b="0" a=".3"/>
				</Texture>
				<FontString name="$parentSender" inherits="GameFontNormal" justifyH="LEFT">
					<Size>
						<AbsDimension x="200" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="47" y="-4"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentSubject" inherits="GameFontHighlightSmall" justifyV="TOP" justifyH="LEFT">
					<Size>
						<AbsDimension x="248" y="18"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentSender" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentExpireTime">
				<Size>
					<AbsDimension x="100" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="-4" y="-4"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						if ( not self.tooltip ) then
							return;
						end
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:SetText(self.tooltip);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<NormalFont style="GameFontHighlightSmallRight"/>
				<PushedTextOffset>
					<AbsDimension x="0" y="0"/>
				</PushedTextOffset>
			</Button>
			<CheckButton name="$parentButton" hidden="true">
				<Size>
					<AbsDimension x="37" y="37"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="4" y="-3"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentSlot" file="Interface\Buttons\UI-EmptySlot-White">
							<Size>
								<AbsDimension x="64" y="64"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="ARTWORK">
						<Texture name="$parentIcon" setAllPoints="true"/>
						<FontString name="$parentCOD" inherits="GameFontHighlightSmall" text="CASH_ON_DELIVERY">
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="2"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT">
							<Anchors>
								<Anchor point="BOTTOMRIGHT">
									<Offset>
										<AbsDimension x="-5" y="2"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
					</OnLoad>
					<OnClick>
						local modifiedClick = IsModifiedClick("MAILAUTOLOOTTOGGLE");
						if ( modifiedClick ) then
							InboxFrame_OnModifiedClick(self, self.index);
						else
							InboxFrame_OnClick(self, self.index);
						end
					</OnClick>
					<OnEnter>
						InboxFrameItem_OnEnter(self);
					</OnEnter>
					<OnUpdate>
						if ( GameTooltip:IsOwned(self) ) then
							InboxFrameItem_OnEnter(self);
						end
					</OnUpdate>
					<OnLeave>
						GameTooltip:Hide();
						SetMoneyFrameColor("GameTooltipMoneyFrame1", "white");
					</OnLeave>
				</Scripts>
				<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
				<CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
			</CheckButton>
		</Frames>
	</Frame>
	<CheckButton name="StationeryPopupButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="36" y="36"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\Buttons\UI-EmptySlot-Disabled">
					<Size>
						<AbsDimension x="64" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="-1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture name="$parentNameFrame" file="Interface\QuestFrame\UI-QuestItemNameFrame">
					<Size>
						<AbsDimension x="128" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-10" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="$parentName" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size>
						<AbsDimension x="90" y="36"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentNameFrame">
							<Offset>
								<AbsDimension x="15" y="5"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentMoneyFrame" inherits="SmallMoneyFrameTemplate">
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="$parentNameFrame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="12" y="14"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						SmallMoneyFrame_OnLoad(self);
						MoneyFrame_SetType(self, "STATIC");
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnClick>
				StationeryPopupButton_OnClick(self);
			</OnClick>
		</Scripts>
		<NormalTexture name="$parentIcon">
			<Size>
				<AbsDimension x="36" y="36"/>
			</Size>
			<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="-1"/>
					</Offset>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
		<CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
	</CheckButton>
	<Button name="SendMailAttachment" virtual="true">
		<Size>
			<AbsDimension x="37" y="37"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\Buttons\UI-Slot-Background">
					<Size>
						<AbsDimension x="39" y="39"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="-2" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.640625" top="0" bottom="0.640625"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT">
					<Anchors>
						<Anchor point="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-5" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				SendMailAttachmentButton_OnClick(self, button);
			</OnClick>
			<OnDragStart>
				SendMailAttachmentButton_OnClick(self, "LeftButton");
			</OnDragStart>
			<OnReceiveDrag>
				SendMailAttachmentButton_OnClick(self, "LeftButton");
			</OnReceiveDrag>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
				self:RegisterForDrag("LeftButton");
			</OnLoad>
			<OnEnter>
				SendMailAttachment_OnEnter(self);
			</OnEnter>
			<OnUpdate>
				if ( GameTooltip:IsOwned(self) ) then
					SendMailAttachment_OnEnter(self);
				end
			</OnUpdate>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
	</Button>
	<Button name="OpenMailAttachment" inherits="ItemButtonTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				self:RegisterEvent("MAIL_INBOX_UPDATE");
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
			</OnLoad>
			<OnEvent>
				--GameTooltip:Hide();
				if ( GameTooltip:IsOwned(self) ) then
					GameTooltip:SetInboxItem(InboxFrame.openMailID, self:GetID());
					GameTooltip:Show();
				end
			</OnEvent>
			<OnClick>
				if ( IsModifiedClick() ) then
					HandleModifiedItemClick(GetInboxItemLink(InboxFrame.openMailID, self:GetID()));
				else
					OpenMailAttachment_OnClick(self, self:GetID());
				end
			</OnClick>
			<OnEnter>
				OpenMailAttachment_OnEnter(self, self:GetID());
			</OnEnter>
			<OnUpdate>
				if ( GameTooltip:IsOwned(self) ) then
					OpenMailAttachment_OnEnter(self, self:GetID());
				end
			</OnUpdate>
			<OnLeave>
				GameTooltip:Hide();
				SetMoneyFrameColor("GameTooltipMoneyFrame1", "white");
			</OnLeave>
		</Scripts>
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
	</Button>
	<Frame name="MailFrame" toplevel="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="30" top="0" bottom="70"/>
		</HitRectInsets>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\MailFrame\Mail-Icon">
					<Size>
						<AbsDimension x="58" y="58"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="10" y="-8"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="MailFrameTopLeft" file="Interface\ItemTextFrame\UI-ItemText-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<Texture name="MailFrameTopRight" file="Interface\Spellbook\UI-SpellbookPanel-TopRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="MailFrameTopLeft" relativePoint="TOPRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="MailFrameBotLeft" file="Interface\ItemTextFrame\UI-ItemText-BotLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="MailFrameTopLeft" relativePoint="BOTTOMLEFT"/>
					</Anchors>
				</Texture>
				<Texture name="MailFrameBotRight" file="Interface\Spellbook\UI-SpellbookPanel-BotRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="MailFrameTopLeft" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
<!-- Inbox -->
			<Frame name="InboxFrame">
				<Size>
					<AbsDimension x="384" y="512"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="InboxTitleText" inherits="GameFontNormal" text="INBOX">
							<Size>
								<AbsDimension x="224" y="14"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="6" y="230"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="InboxCurrentPage" inherits="GameFontNormal">
							<Size>
								<AbsDimension x="192" y="0"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="-14" y="96"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Frame name="MailItem1" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="28" y="-80"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="MailItem2" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="MailItem1" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="MailItem3" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="MailItem2" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="MailItem4" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="MailItem3" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="MailItem5" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="MailItem4" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="MailItem6" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="MailItem5" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="MailItem7" inherits="MailItemTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="MailItem6" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Button name="InboxPrevPageButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="CENTER" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="50" y="104"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="ARTWORK">
								<FontString inherits="GameFontNormal" justifyH="LEFT" text="PREV">
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								self:Disable();
							</OnLoad>
							<OnClick>
								InboxPrevPage();
							</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>
					<Button name="InboxNextPageButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="CENTER" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="314" y="104"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="ARTWORK">
								<FontString inherits="GameFontNormal" justifyH="RIGHT" text="NEXT">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								self:Disable();
							</OnLoad>
							<OnClick>
								InboxNextPage();
							</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>
				</Frames>
			</Frame>
<!-- Send Mail -->
			<Frame name="SendMailFrame" hidden="true">
				<Size>
					<AbsDimension x="384" y="512"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<FontString name="SendMailTitleText" inherits="GameFontNormal" text="SENDMAIL">
							<Size>
								<AbsDimension x="224" y="14"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="6" y="230"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="SendMailErrorText" inherits="GameFontRedSmall" hidden="true">
							<Size>
								<AbsDimension x="0" y="10"/>
							</Size>
						</FontString>
						<Texture name="SendMailErrorCoin" file="Interface\MoneyFrame\UI-MoneyIcons" hidden="true">
							<Size>
								<AbsDimension x="10" y="10"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="SendMailErrorText" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="1" y="-1"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.25" top="0" bottom="1"/>
						</Texture>
						<Texture name="SendMailHorizontalBarLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
							<Size>
								<AbsDimension x="256" y="16"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="15" y="-350"/>
									</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="SendMailHorizontalBarLeft" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.29296875" top="0.25" bottom="0.5"/>
						</Texture>
						<Texture name="SendMailHorizontalBarLeft2" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
							<Size>
								<AbsDimension x="256" y="16"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="15" y="-251"/>
									</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="SendMailHorizontalBarLeft2" 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>
					<ScrollFrame name="SendMailScrollFrame" inherits="UIPanelScrollFrameTemplate">
						<Size>
							<AbsDimension x="296" y="257"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="21" y="-97"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<Texture name="SendStationeryBackgroundLeft">
									<Size>
										<AbsDimension x="252" y="256"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT"/>
									</Anchors>
								</Texture>
								<Texture name="SendStationeryBackgroundRight">
									<Size>
										<AbsDimension x="64" y="256"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="SendStationeryBackgroundLeft" relativePoint="TOPRIGHT"/>
									</Anchors>
								</Texture>
							</Layer>
							<Layer level="ARTWORK">
								<Texture name ="SendScrollBarBackgroundTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
									<Size>
										<AbsDimension x="31" y="256"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
											<Offset>
												<AbsDimension x="-2" y="5"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
								</Texture>
								<Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
									<Size>
										<AbsDimension x="31" y="106"/>
									</Size>
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
											<Offset>
												<AbsDimension x="-2" y="-2"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
								</Texture>
							</Layer>
						</Layers>
						<ScrollChild>
							<Frame name="SendMailScrollChildFrame" enableMouse="true">
								<Size>
									<AbsDimension x="300" y="255"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="0" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Frames>
									<EditBox name="SendMailBodyEditBox" letters="500" multiLine="true" enableMouse="true" autoFocus="false">
										<Size>
											<AbsDimension x="270" y="200"/>
										</Size>
										<Anchors>
											<Anchor point="TOPLEFT">
												<Offset>
													<AbsDimension x="20" y="-10"/>
												</Offset>
											</Anchor>
										</Anchors>
										<Scripts>
											<OnTextChanged>
												ScrollingEdit_OnTextChanged(self, self:GetParent():GetParent());
											</OnTextChanged>
											<OnCursorChanged>
												ScrollingEdit_OnCursorChanged(self, x, y-10, w, h);
											</OnCursorChanged>
											<OnUpdate>
												ScrollingEdit_OnUpdate(self, elapsed, self:GetParent():GetParent());
											</OnUpdate>
											<OnTabPressed>
												EditBox_HandleTabbing(self, SEND_MAIL_TAB_LIST);
											</OnTabPressed>
											<OnEscapePressed>
												self:ClearFocus();
											</OnEscapePressed>
										</Scripts>
										<FontString inherits="MailTextFontNormal"/>
									</EditBox>
								</Frames>
								<Scripts>
									<OnMouseUp>
										SendMailBodyEditBox:SetFocus();
										if ( CursorHasItem() ) then
											SendMailAttachmentButton_OnDropAny();
										end
									</OnMouseUp>
								</Scripts>
							</Frame>
						</ScrollChild>
					</ScrollFrame>
					<EditBox name="SendMailNameEditBox" letters="12" historyLines="0" autoFocus="false">
						<Size>
							<AbsDimension x="109" y="20"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="105" y="-46"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString inherits="GameFontNormal" text="MAIL_TO_LABEL" justifyH="RIGHT">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT">
											<Offset>
												<AbsDimension x="-12" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
								<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
									<Size>
										<AbsDimension x="8" y="20"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="-8" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
								</Texture>
								<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
									<Size>
										<AbsDimension x="100" y="20"/>
									</Size>
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
									</Anchors>
									<TexCoords left="0.0625" right="0.9375" 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="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
									</Anchors>
									<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnTabPressed>
								EditBox_HandleTabbing(self, SEND_MAIL_TAB_LIST);
							</OnTabPressed>
							<OnEditFocusLost>
								self:HighlightText(0, 0);
							</OnEditFocusLost>
							<OnCharComposition>
								PlayerNameAutocomplete(self);
							</OnCharComposition>
							<OnChar>
								if ( not self:IsInIMECompositionMode() ) then
									PlayerNameAutocomplete(self);
								end
							</OnChar>
							<OnEnterPressed>
								SendMailSubjectEditBox:SetFocus();
							</OnEnterPressed>
							<OnEscapePressed>
								SendMailNameEditBox:ClearFocus();
							</OnEscapePressed>
							<OnTextChanged>
								SendMailFrame_CanSend();
							</OnTextChanged>
						</Scripts>
						<FontString inherits="ChatFontNormal"/>
					</EditBox>
					<Frame name="SendMailCostMoneyFrame" inherits="SmallMoneyFrameTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT">
								<Offset>
									<AbsDimension x="-36" y="-48"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString inherits="GameFontNormal" text="SEND_MAIL_COST">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT">
											<Offset>
												<AbsDimension x="-3" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								SmallMoneyFrame_OnLoad(self);
								MoneyFrame_SetType(self, "STATIC");
								MoneyFrame_Update("SendMailCostMoneyFrame", GetSendMailPrice());
							</OnLoad>
						</Scripts>
					</Frame>
					<EditBox name="SendMailSubjectEditBox" letters="64" historyLines="0" autoFocus="false">
						<Size>
							<AbsDimension x="220" y="20"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="SendMailNameEditBox" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString inherits="GameFontNormal" text="MAIL_SUBJECT_LABEL" justifyH="RIGHT">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT">
											<Offset>
												<AbsDimension x="-12" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
								<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
									<Size>
										<AbsDimension x="8" y="20"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="-8" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
									<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
								</Texture>
								<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
									<Size>
										<AbsDimension x="221" y="20"/>
									</Size>
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
									</Anchors>
									<TexCoords left="0.0625" right="0.9375" 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="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
									</Anchors>
									<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnTabPressed>
								EditBox_HandleTabbing(self, SEND_MAIL_TAB_LIST);
							</OnTabPressed>
							<OnEnterPressed>
								SendMailBodyEditBox:SetFocus();
							</OnEnterPressed>
							<OnEscapePressed>
								SendMailSubjectEditBox:ClearFocus();
							</OnEscapePressed>
							<OnTextChanged>
								SendMailFrame_CanSend();
							</OnTextChanged>
						</Scripts>
						<FontString inherits="ChatFontNormal"/>
					</EditBox>
					<Button name="SendMailAttachment1" inherits="SendMailAttachment" id="1"/>
					<Button name="SendMailAttachment2" inherits="SendMailAttachment" id="2"/>
					<Button name="SendMailAttachment3" inherits="SendMailAttachment" id="3"/>
					<Button name="SendMailAttachment4" inherits="SendMailAttachment" id="4"/>
					<Button name="SendMailAttachment5" inherits="SendMailAttachment" id="5"/>
					<Button name="SendMailAttachment6" inherits="SendMailAttachment" id="6"/>
					<Button name="SendMailAttachment7" inherits="SendMailAttachment" id="7"/>
					<Button name="SendMailAttachment8" inherits="SendMailAttachment" id="8"/>
					<Button name="SendMailAttachment9" inherits="SendMailAttachment" id="9"/>
					<Button name="SendMailAttachment10" inherits="SendMailAttachment" id="10"/>
					<Button name="SendMailAttachment11" inherits="SendMailAttachment" id="11"/>
					<Button name="SendMailAttachment12" inherits="SendMailAttachment" id="12"/>
					<Button name="SendMailAttachment13" inherits="SendMailAttachment" id="13"/>
					<Button name="SendMailAttachment14" inherits="SendMailAttachment" id="14"/>
					<Button name="SendMailAttachment15" inherits="SendMailAttachment" id="15"/>
					<Button name="SendMailAttachment16" inherits="SendMailAttachment" id="16"/>
					<Frame name="SendMailMoneyButton">
						<Size>
							<AbsDimension x="37" y="37"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="30" y="110"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="SendMailMoneyText" inherits="GameFontNormalSmall" text="SEND_MONEY">
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="0" y="-5"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<Frame name="SendMailMoney" inherits="MoneyInputFrameTemplate">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="SendMailMoneyText" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="5" y="-3"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										MoneyInputFrame_SetOnValueChangedFunc(self, SendMailFrame_CanSend);
									</OnLoad>
								</Scripts>
							</Frame>
							<CheckButton name="SendMailSendMoneyButton" inherits="SendMailRadioButtonTemplate" id="1">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="SendMailMoney" relativePoint="TOPRIGHT">
										<Offset>
											<AbsDimension x="0" y="12"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										getglobal(self:GetName().."Text"):SetText(SEND_MONEY);
									</OnLoad>
								</Scripts>
							</CheckButton>
							<CheckButton name="SendMailCODButton" inherits="SendMailRadioButtonTemplate" id="2">
								<Anchors>
									<Anchor point="TOPLEFT" relativeTo="SendMailSendMoneyButton" relativePoint="BOTTOMLEFT">
										<Offset>
											<AbsDimension x="0" y="1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Scripts>
									<OnLoad>
										getglobal(self:GetName().."Text"):SetText(COD);
									</OnLoad>
								</Scripts>
							</CheckButton>
						</Frames>
					</Frame>
					<!--
					<Button name="SendMailStationeryButton" text="CHOOSE_STATIONERY">
						<Size>
							<AbsDimension x="125" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="SendMailNameEditBox" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="-5" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								if (StationeryPopupFrame:IsShown()) then
									StationeryPopupFrame:Hide();
								else
									StationeryPopupFrame:Show();
								end
							</OnClick>
						</Scripts>
						<NormalFont style="GameFontNormalSmall"/>
						<HighlightFont style="GameFontHighlightSmall"/>
						<DisabledFont style="GameFontDisableSmall"/>
						<NormalTexture inherits="UIPanelButtonUpTexture"/>
						<PushedTexture inherits="UIPanelButtonDownTexture"/>
						<DisabledTexture inherits="UIPanelButtonDisabledTexture"/>
						<HighlightTexture inherits="UIPanelButtonHighlightTexture"/>
					</Button>
					-->
					<Frame name="SendMailMoneyFrame" inherits="SmallMoneyFrameTemplate">
						<Anchors>
							<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="183" y="84"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Button name="SendMailCancelButton" inherits="UIPanelButtonTemplate" text="CANCEL">
						<Size>
							<AbsDimension x="80" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
								<Offset>
									<AbsDimension x="-39" y="80"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								HideUIPanel(MailFrame);
							</OnClick>
						</Scripts>
					</Button>
					<Button name="SendMailMailButton" inherits="UIPanelButtonTemplate" text="SEND_LABEL">
						<Size>
							<AbsDimension x="80" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="RIGHT" relativeTo="SendMailCancelButton" relativePoint="LEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								SendMailMailButton_OnClick(self, button);
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
				<Scripts>
					<OnLoad>
						SendMailErrorText:SetFormattedText(MAIL_COD_ERROR, MAX_COD_AMOUNT);
						SendMailErrorText:SetPoint("BOTTOMLEFT", "SendMailMoneyText", "TOPLEFT", 0, 2);
						SendMailRadioButton_OnClick(self, 1);
					</OnLoad>
					<OnShow>
						StationeryPopupFrame_Update();
						StationeryPopupButton_OnClick(self, 1);
						SendMailNameEditBox:SetFocus();
					</OnShow>
					<OnMouseUp>
						if ( CursorHasItem() ) then
							SendMailAttachmentButton_OnDropAny();
						end
					</OnMouseUp>
				</Scripts>
			</Frame>
			<Button name="InboxCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="CENTER" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-45" y="-25"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetFrameLevel() + 1);
					</OnLoad>
					<OnClick>
						HideUIPanel(MailFrame);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="MailFrameTab1" inherits="FriendsFrameTabTemplate" id="1" text="INBOX">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="24" y="44"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						MailFrameTab_OnClick(self, 1);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="MailFrameTab2" inherits="FriendsFrameTabTemplate" id="2" text="SENDMAIL">
				<Anchors>
					<Anchor point="LEFT" relativeTo="MailFrameTab1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="-8" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						MailFrameTab_OnClick(self, 2);
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				MailFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				MailFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnHide>
				CloseMail();
				HideUIPanel(OpenMailFrame);
				StationeryPopupFrame:Hide();
				SendMailBodyEditBox:SetText("");
				SendMailNameEditBox:SetText("");
				SendMailSubjectEditBox:SetText("");
				PlaySound("igCharacterInfoClose");
				SetSendMailShowing(false);
			</OnHide>
			<OnMouseWheel>
				return;
			</OnMouseWheel>
		</Scripts>
	</Frame>
<!-- Stationery Popup -->
	<Frame name="StationeryPopupFrame" toplevel="true" parent="UIParent" movable="true" enableMouse="true" hidden="true">
		<Size>
			<AbsDimension x="220" y="298"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="MailFrame" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-30" y="-40"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\MailFrame\MailPopup-Top">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\MailFrame\MailPopup-Bottom">
					<Size>
						<AbsDimension x="256" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="-256"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString inherits="GameFontHighlightSmall" text="CHOOSE_STATIONERY">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="24" y="-21"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<ScrollFrame name="StationeryPopupScrollFrame" inherits="FauxScrollFrameTemplate">
				<Size>
					<AbsDimension x="200" y="250"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="-38" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-ScrollBar">
							<Size>
								<AbsDimension x="30" y="120"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
									<Offset>
										<AbsDimension x="-3" y="2"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.46875" top="0.0234375" bottom="0.9609375"/>
						</Texture>
						<Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-ScrollBar">
							<Size>
								<AbsDimension x="30" y="123"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
									<Offset>
										<AbsDimension x="-3" y="-2"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.53125" right="1.0" top="0.03125" bottom="1.0"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnVerticalScroll>
						FauxScrollFrame_OnVerticalScroll(self, offset, STATIONERY_ICON_ROW_HEIGHT, StationeryPopupFrame_Update);
					</OnVerticalScroll>
				</Scripts>
			</ScrollFrame>
			<CheckButton name="StationeryPopupButton1" inherits="StationeryPopupButtonTemplate" id="1">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="24" y="-37"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="StationeryPopupButton2" inherits="StationeryPopupButtonTemplate" id="2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="StationeryPopupButton1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-9"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="StationeryPopupButton3" inherits="StationeryPopupButtonTemplate" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="StationeryPopupButton2" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-9"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="StationeryPopupButton4" inherits="StationeryPopupButtonTemplate" id="4">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="StationeryPopupButton3" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-9"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="StationeryPopupButton5" inherits="StationeryPopupButtonTemplate" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="StationeryPopupButton4" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-9"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<Button name="StationeryPopupCancelButton" inherits="UIPanelButtonTemplate" text="CANCEL">
				<Size>
					<AbsDimension x="78" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativeTo="StationeryPopupFrame">
						<Offset>
							<AbsDimension x="-11" y="13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="StationeryPopupOkayButton" inherits="UIPanelButtonTemplate" text="OKAY">
				<Size>
					<AbsDimension x="78" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="StationeryPopupCancelButton" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="-11" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				StationeryPopupFrame_Update();
			</OnShow>
			<OnHide>
				PlaySound("igCharacterInfoClose");
			</OnHide>
		</Scripts>
	</Frame>
<!-- Open Mail -->
	<Frame name="OpenMailFrame" toplevel="true" hidden="true" parent="UIParent" enableMouse="true">
		<Size>
			<AbsDimension x="384" y="512"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="InboxFrame" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-10" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="OpenMailFrameIcon" file="Interface\MailFrame\Mail-Icon">
					<Size>
						<AbsDimension x="60" y="60"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="9" y="-6"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="OpenMailFrameTopLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<Texture name="OpenMailFrameTopRight" file="Interface\ClassTrainerFrame\UI-ClassTrainer-TopRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="OpenMailFrameTopLeft" relativePoint="TOPRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="OpenMailFrameBotLeft" file="Interface\MailFrame\UI-OpenMail-BotLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="OpenMailFrameTopLeft" relativePoint="BOTTOMLEFT"/>
					</Anchors>
				</Texture>
				<Texture name="OpenMailFrameBotRight" file="Interface\ClassTrainerFrame\UI-ClassTrainer-BotRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="OpenMailFrameTopLeft" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="OpenMailTitleText" inherits="GameFontNormal" text="OPENMAIL">
					<Size>
						<AbsDimension x="224" y="24"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="6" y="232"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="OpenMailAttachmentText" inherits="GameFontHighlightSmall" text="TAKE_ATTACHMENTS">
					<Size>
						<AbsDimension x="0" y="0"/>
					</Size>
				</FontString>
				<FontString name="OpenMailSenderLabel" inherits="GameFontHighlight" text="FROM">
					<Size>
						<AbsDimension x="0" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="114" y="-45"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="OpenMailSender" inherits="GameFontNormal" justifyH="LEFT">
					<Size>
						<AbsDimension x="110" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="OpenMailSenderLabel" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="5" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="OpenMailSubjectLabel" inherits="GameFontHighlight" text="MAIL_SUBJECT_LABEL">
					<Size>
						<AbsDimension x="0" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="114" y="-65"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="OpenMailSubject" inherits="GameFontNormalSmall" justifyH="LEFT" justifyV="TOP">
					<Size>
						<AbsDimension x="225" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="OpenMailSubjectLabel" relativePoint="TOPRIGHT">
							<Offset>
								<AbsDimension x="5" y="-4"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<Texture name="OpenMailHorizontalBarLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
					<Size>
						<AbsDimension x="256" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="15" y="-350"/>
							</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="OpenMailHorizontalBarLeft" 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="OpenMailReportSpamButton" inherits="UIPanelButtonTemplate" text="REPORT_SPAM">
				<Size>
					<AbsDimension x="110" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="OpenMailFrame">
						<Offset>
							<AbsDimension x="-45" y="-45"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						OpenMail_ReportSpam();
					</OnClick>
				</Scripts>
			</Button>
			<ScrollFrame name="OpenMailScrollFrame" inherits="UIPanelScrollFrameTemplate">
				<Size>
					<AbsDimension x="296" y="257"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="21" y="-97"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="OpenScrollBarBackgroundTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
							<Size>
								<AbsDimension x="31" y="256"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
									<Offset>
										<AbsDimension x="-2" y="5"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
						</Texture>
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
							<Size>
								<AbsDimension x="31" y="106"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT">
									<Offset>
										<AbsDimension x="-2" y="-2"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND">
						<Texture name="OpenStationeryBackgroundLeft">
							<Size>
								<AbsDimension x="252" y="256"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT"/>
							</Anchors>
						</Texture>
						<Texture name="OpenStationeryBackgroundRight">
							<Size>
								<AbsDimension x="64" y="256"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="OpenStationeryBackgroundLeft" relativePoint="TOPRIGHT"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<ScrollChild>
					<Frame name="OpenMailScrollChildFrame">
						<Size>
							<AbsDimension x="296" y="255"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="OpenMailBodyText" inherits="MailTextFontNormal" nonspacewrap="true">
									<Size>
										<AbsDimension x="276" y="0"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="10" y="-10"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<Frame name="OpenMailInvoiceFrame" setAllPoints="true">
								<Layers>
									<Layer level="BACKGROUND">
										<FontString name="OpenMailInvoiceItemLabel" inherits="InvoiceTextFontNormal" text="ITEM_SOLD_COLON">
											<Size>
												<AbsDimension x="240" y="0"/>
											</Size>
											<Anchors>
												<Anchor point="TOPLEFT">
													<Offset>
														<AbsDimension x="30" y="-35"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoicePurchaser" inherits="InvoiceTextFontNormal" text="PURCHASED_BY_COLON">
											<Anchors>
												<Anchor point="TOPLEFT" relativeTo="OpenMailInvoiceItemLabel" relativePoint="BOTTOMLEFT">
													<Offset>
														<AbsDimension x="0" y="-5"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoiceBuyMode" inherits="InvoiceTextFontSmall">
											<Anchors>
												<Anchor point="LEFT" relativeTo="OpenMailInvoicePurchaser" relativePoint="RIGHT">
													<Offset>
														<AbsDimension x="5" y="0"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoiceSalePrice" inherits="InvoiceTextFontNormal" text="SALE_PRICE_COLON">
											<Anchors>
												<Anchor point="TOPRIGHT" relativeTo="OpenMailInvoicePurchaser" relativePoint="BOTTOMLEFT">
													<Offset>
														<AbsDimension x="125" y="-26"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoiceDeposit" inherits="InvoiceTextFontNormal" text="DEPOSIT_COLON">
											<Anchors>
												<Anchor point="TOPRIGHT" relativeTo="OpenMailInvoiceSalePrice" relativePoint="BOTTOMRIGHT">
													<Offset>
														<AbsDimension x="0" y="-13"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoiceHouseCut" inherits="InvoiceTextFontNormal" text="AUCTION_HOUSE_CUT_COLON">
											<Anchors>
												<Anchor point="TOPRIGHT" relativeTo="OpenMailInvoiceDeposit" relativePoint="BOTTOMRIGHT">
													<Offset>
														<AbsDimension x="0" y="-13"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoiceAmountReceived" inherits="InvoiceTextFontNormal" text="AMOUNT_RECEIVED_COLON">
											<Anchors>
												<Anchor point="TOPRIGHT" relativeTo="OpenMailInvoiceHouseCut" relativePoint="BOTTOMRIGHT">
													<Offset>
														<AbsDimension x="0" y="-13"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<Texture name="OpenMailArithmeticLine" file="Interface\MailFrame\UI-MailFrame-InvoiceLine">
											<Size>
												<AbsDimension x="256" y="32"/>
											</Size>
											<Anchors>
												<Anchor point="TOP" relativeTo="OpenMailInvoiceHouseCut" relativePoint="BOTTOMRIGHT">
													<Offset>
														<AbsDimension x="0" y="9"/>
													</Offset>
												</Anchor>
											</Anchors>
										</Texture>
										<FontString name="OpenMailInvoiceNotYetSent" inherits="InvoiceTextFontNormal" text="AUCTION_INVOICE_FUNDS_NOT_YET_SENT">
											<Anchors>
												<Anchor point="CENTER" relativeTo="OpenMailInvoicePurchaser" relativePoint="BOTTOMLEFT">
													<Offset>
														<AbsDimension x="128" y="-90"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
										<FontString name="OpenMailInvoiceMoneyDelay" inherits="InvoiceTextFontNormal">
											<Anchors>
												<Anchor point="CENTER" relativeTo="OpenMailInvoicePurchaser" relativePoint="BOTTOMLEFT">
													<Offset>
														<AbsDimension x="128" y="-103"/>
													</Offset>
												</Anchor>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
								<Frames>
									<Frame name="OpenMailTransactionAmountMoneyFrame" inherits="SmallMoneyFrameTemplate">
										<Anchors>
											<Anchor point="RIGHT" relativeTo="OpenMailInvoiceAmountReceived" relativePoint="RIGHT">
												<Offset>
													<AbsDimension x="130" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
										<Scripts>
											<OnLoad>
												SmallMoneyFrame_OnLoad(self);
												MoneyFrame_SetType(self, "AUCTION");
											</OnLoad>
										</Scripts>
									</Frame>
									<Frame name="OpenMailDepositMoneyFrame" inherits="SmallMoneyFrameTemplate">
										<Anchors>
											<Anchor point="RIGHT" relativeTo="OpenMailInvoiceDeposit" relativePoint="RIGHT">
												<Offset>
													<AbsDimension x="130" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
										<Layers>
											<Layer level="BACKGROUND">
												<FontString inherits="InvoiceTextFontNormal" text="+">
													<Anchors>
														<Anchor point="RIGHT" relativePoint="LEFT">
															<Offset>
																<AbsDimension x="-5" y="0"/>
															</Offset>
														</Anchor>
													</Anchors>
												</FontString>
											</Layer>
										</Layers>
										<Scripts>
											<OnLoad>
												SmallMoneyFrame_OnLoad(self);
												MoneyFrame_SetType(self, "AUCTION");
											</OnLoad>
										</Scripts>
									</Frame>
									<Frame name="OpenMailHouseCutMoneyFrame" inherits="SmallMoneyFrameTemplate">
										<Anchors>
											<Anchor point="RIGHT" relativeTo="OpenMailInvoiceHouseCut" relativePoint="RIGHT">
												<Offset>
													<AbsDimension x="130" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
										<Layers>
											<Layer level="BACKGROUND">
												<FontString inherits="InvoiceTextFontNormal" text="-">
													<Anchors>
														<Anchor point="RIGHT" relativePoint="LEFT">
															<Offset>
																<AbsDimension x="-5" y="0"/>
															</Offset>
														</Anchor>
													</Anchors>
												</FontString>
											</Layer>
										</Layers>
										<Scripts>
											<OnLoad>
												SmallMoneyFrame_OnLoad(self);
												MoneyFrame_SetType(self, "AUCTION");
											</OnLoad>
										</Scripts>
									</Frame>
									<Frame name="OpenMailSalePriceMoneyFrame" inherits="SmallMoneyFrameTemplate">
										<Anchors>
											<Anchor point="RIGHT" relativeTo="OpenMailInvoiceSalePrice" relativePoint="RIGHT">
												<Offset>
													<AbsDimension x="130" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
										<Scripts>
											<OnLoad>
												SmallMoneyFrame_OnLoad(self);
												MoneyFrame_SetType(self, "AUCTION");
											</OnLoad>
										</Scripts>
									</Frame>
								</Frames>
							</Frame>
						</Frames>
					</Frame>
				</ScrollChild>
			</ScrollFrame>
			<Button name="OpenMailLetterButton" inherits="ItemButtonTemplate">
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
					</OnLoad>
					<OnClick>
						OpenMailFrame.updateButtonPositions = false;
						TakeInboxTextItem(InboxFrame.openMailID);
						PlaySound("igMainMenuOptionCheckBoxOn");
					</OnClick>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						GameTooltip:SetText(MAIL_LETTER_TOOLTIP);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
			</Button>
			<Button name="OpenMailAttachmentButton1" inherits="OpenMailAttachment" id="1"/>
			<Button name="OpenMailAttachmentButton2" inherits="OpenMailAttachment" id="2"/>
			<Button name="OpenMailAttachmentButton3" inherits="OpenMailAttachment" id="3"/>
			<Button name="OpenMailAttachmentButton4" inherits="OpenMailAttachment" id="4"/>
			<Button name="OpenMailAttachmentButton5" inherits="OpenMailAttachment" id="5"/>
			<Button name="OpenMailAttachmentButton6" inherits="OpenMailAttachment" id="6"/>
			<Button name="OpenMailAttachmentButton7" inherits="OpenMailAttachment" id="7"/>
			<Button name="OpenMailAttachmentButton8" inherits="OpenMailAttachment" id="8"/>
			<Button name="OpenMailAttachmentButton9" inherits="OpenMailAttachment" id="9"/>
			<Button name="OpenMailAttachmentButton10" inherits="OpenMailAttachment" id="10"/>
			<Button name="OpenMailAttachmentButton11" inherits="OpenMailAttachment" id="11"/>
			<Button name="OpenMailAttachmentButton12" inherits="OpenMailAttachment" id="12"/>
			<Button name="OpenMailAttachmentButton13" inherits="OpenMailAttachment" id="13"/>
			<Button name="OpenMailAttachmentButton14" inherits="OpenMailAttachment" id="14"/>
			<Button name="OpenMailAttachmentButton15" inherits="OpenMailAttachment" id="15"/>
			<Button name="OpenMailAttachmentButton16" inherits="OpenMailAttachment" id="16"/>
			<Button name="OpenMailMoneyButton" inherits="ItemButtonTemplate">
				<Scripts>
					<OnLoad>
						self:RegisterEvent("MAIL_INBOX_UPDATE");
						self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
					</OnLoad>
					<OnEvent>
						--GameTooltip:Hide();
						if ( GameTooltip:IsOwned(self) ) then
							if ( OpenMailFrame.money ) then
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								SetTooltipMoney(GameTooltip, OpenMailFrame.money);
								GameTooltip:Show();
							end
						end
					</OnEvent>
					<OnClick>
						OpenMailFrame.updateButtonPositions = false;
						TakeInboxMoney(InboxFrame.openMailID);
					</OnClick>
					<OnEnter>
						if ( OpenMailFrame.money ) then
							GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
							SetTooltipMoney(GameTooltip, OpenMailFrame.money);
							GameTooltip:Show();
						end
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
			</Button>
			<Button name="OpenMailCancelButton" inherits="UIPanelButtonTemplate" text="CLOSE">
				<Size>
					<AbsDimension x="80" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-39" y="80"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						HideUIPanel(self:GetParent());
					</OnClick>
				</Scripts>
			</Button>
			<Button name="OpenMailDeleteButton" inherits="UIPanelButtonTemplate" text="DELETE">
				<Size>
					<AbsDimension x="82" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="OpenMailCancelButton" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						OpenMail_Delete();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="OpenMailReplyButton" inherits="UIPanelButtonTemplate" text="REPLY_MESSAGE">
				<Size>
					<AbsDimension x="82" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="OpenMailDeleteButton" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						OpenMail_Reply();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="OpenMailCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="CENTER" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-47" y="-25"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						HideUIPanel(OpenMailFrame);
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				HideUIPanel(GetUIPanel("center"));
				HideUIPanel(GetUIPanel("right"));
			</OnShow>
			<OnHide>
				OpenMailFrame_OnHide();
			</OnHide>
			<OnMouseWheel>
				return;
			</OnMouseWheel>
		</Scripts>
	</Frame>
</Ui>

