<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_GuildControlUI.lua"/>
	
	
	<!-- Templates -->
	<Frame name="RankChangeTemplate" virtual="true">
		<Size  x="295" y="24"/>
		<Frames>
			<EditBox name="$parentNameEditBox" autoFocus="false" historyLines="1" letters="15" inherits="InputBoxTemplate" parentKey="nameBox">
				<Size  x="132" y="32"/>
				<Anchors>
					<Anchor point="LEFT" x="65" y="0"/>
				</Anchors>
				<Scripts>
					<OnEditFocusGained>
						self.startName = self:GetText();
						GuildControlUI.activeEditBox = self;
					</OnEditFocusGained>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnEscapePressed>
						self:SetText(self.startName);
						self:ClearFocus();
					</OnEscapePressed>
					<OnTextChanged>
						if self.startName and self.startName ~= self:GetText() then
							self:SetTextColor(0,1,0,1);
						end
					</OnTextChanged>
					<OnEditFocusLost>
						GuildControlUI.activeEditBox = nil;
						local text = self:GetText();
						if ( self.startName ~= text and text ~= "" ) then
							GuildControlSetRank(self:GetParent():GetID());
							GuildControlSaveRank(self:GetText());
						else
							self:SetText(self.startName);
						end
						self.startName = nil;
						self:SetTextColor(1, 1, 1, 1);
					</OnEditFocusLost>
				</Scripts>
			</EditBox>
			<Button name="$parentDeleteButton" inherits="UIPanelSquareButton" motionScriptsWhileDisabled="true" parentKey="deleteButton">
				<Anchors>
					<Anchor point="RIGHT" x="0" y="0"/>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						if ( self:IsEnabled() ) then
							GameTooltip:SetText(GUILDREMOVERANK_BUTTON_TOOLTIP);
						elseif ( self.tooltip ) then
							GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, true);
						end
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
					<OnClick function="GuildControlUI_RemoveRankButton_OnClick"/>
				</Scripts>
			</Button>
			<Button name="$parentShiftDownButton" inherits="UIPanelSquareButton" motionScriptsWhileDisabled="true" parentKey="downButton">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentDeleteButton" relativePoint="LEFT" x="-16" y="0"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.icon:SetTexCoord(0.45312500, 0.64062500, 0.20312500, 0.01562500);
					</OnLoad>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						if ( self:IsEnabled() ) then
							GameTooltip:SetText(GUILD_LOWERRANK_BUTTON_TOOLTIP);
						elseif ( self.tooltip ) then
							GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, true);
						end
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
					<OnClick function="GuildControlUI_ShiftRankDownButton_OnClick"/>
				</Scripts>
			</Button>
			<Button name="$parentShiftUpButton" inherits="UIPanelSquareButton" motionScriptsWhileDisabled="true" parentKey="upButton">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentShiftDownButton" relativePoint="LEFT" x="-3" y="0"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.icon:SetTexCoord(0.45312500, 0.64062500, 0.01562500, 0.20312500);
					</OnLoad>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
						if ( self:IsEnabled() ) then
							GameTooltip:SetText(GUILD_RAISERANK_BUTTON_TOOLTIP);
						elseif ( self.tooltip ) then
							GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, true);
						end
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
					<OnClick function="GuildControlUI_ShiftRankUpButton_OnClick"/>
				</Scripts>
			</Button>
		</Frames>
		<Layers>
			<Layer level="OVERLAY">
				<FontString inherits="GameFontNormal" text="RANK" justifyH="RIGHT" parentKey="rankLabel">
					<Size  x="0" y="12"/>
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parentNameEditBox" relativePoint="LEFT" x="-12" y="0"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>
	<CheckButton name="GuildPermissionCheckBoxTemplate" virtual="true">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontHighlightSmall" parentKey="text">
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="1" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				GuildControlUI_CheckClicked(self);
			</OnClick>
		</Scripts>
		<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
		<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
		<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
		<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
		<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
	</CheckButton>
	<Frame name="BankTabPermissionTemplate" virtual="true">
		<Size x="268" y="74"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBg" >
					<Anchors>
						<Anchor point="TOPLEFT" x="0" y="0"/>
						<Anchor point="BOTTOMRIGHT" x="0" y="0"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="1" a="0.09"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentOwned" parentKey="owned">
				<Anchors>
					<Anchor point="TOPLEFT" x="0" y="0"/>
					<Anchor point="BOTTOMRIGHT" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentTabIcon" file="Interface\Icons\Ability_ThunderClap" parentKey="tabIcon">
							<Size x="20" y="20"/>
							<Anchors>
								<Anchor point="TOPLEFT" x="3" y="-3"/>
							</Anchors>
						</Texture>
						<FontString name="$parentTabName" inherits="GameFontNormalSmall" justifyH="LEFT" parentKey="tabName">
							<Size x="120" y="12"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativeTo="$parentTabIcon" relativePoint="BOTTOMRIGHT" x="4" y="3"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<CheckButton name="$parentViewCheck" inherits="GuildPermissionCheckBoxTemplate" id="1" parentKey="viewCB">
						<Anchors>
							<Anchor point="TOPRIGHT" x="-95" y="-3"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.text:SetText(GUILDCONTROL_VIEW_TAB);
							</OnLoad>
							<OnClick>
								GuildControlUI_SetBankTabChange(self)
							</OnClick>
						</Scripts>
					</CheckButton>
					<CheckButton name="$parentDepositCheck" inherits="GuildPermissionCheckBoxTemplate" id="2" parentKey="depositCB">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentViewCheck" relativePoint="BOTTOM" x="0" y="-3"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.text:SetText(GUILDCONTROL_DEPOSIT_ITEMS);
							</OnLoad>
							<OnClick>
								GuildControlUI_SetBankTabChange(self)
							</OnClick>
						</Scripts>
					</CheckButton>
					<CheckButton name="$parentUpdateInfoCheck" inherits="GuildPermissionCheckBoxTemplate" id="3" parentKey="infoCB">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentDepositCheck" relativePoint="BOTTOM" x="0" y="-3"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.text:SetText(GUILDCONTROL_UPDATE_TEXT);
							</OnLoad>
							<OnClick>
								GuildControlUI_SetBankTabChange(self)	
							</OnClick>
						</Scripts>
					</CheckButton>
					<EditBox name="$parentStackBox" autoFocus="false" letters="6" historyLines="1" inherits="InputBoxTemplate" numeric="true"  id="5" parentKey="editBox">
						<Size x="80" y="20"/>
						<Anchors>
							<Anchor point="BOTTOMLEFT" x="15" y="3"/>
						</Anchors>
						<Layers>
						<Layer level="OVERLAY">
								<FontString name="$parentLabelText" inherits="GameFontNormalSmall" justifyH="LEFT" text="GUILDCONTROL_WITHDRAW_ITEMS">
									<Size x="150" y="24"/>
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="0" y="1"/>
									</Anchors>
									<Color r="1" g="1" b="1"/>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<Frame name="$parentMask" enableMouse="true" hidden="true" setAllPoints="true" parentKey="mask"/>
						</Frames>
						<Scripts>
							<OnTextChanged>
								if ( self.startValue and self.startValue ~= tonumber(self:GetText()) ) then
									self:SetTextColor(0,1,0,1);
								end
							</OnTextChanged>
							<OnEditFocusGained>
								self.startValue = self:GetText();
								GuildControlUI.activeEditBox = self;
							</OnEditFocusGained>
							<OnEditFocusLost>
								GuildControlUI.activeEditBox = nil;
								local text = self:GetText();
								if ( self.startValue ~= text and text ~= "" ) then
									GuildControlUI_SetBankTabWithdrawChange(self);
								else
									self:SetText(self.startValue);
								end
								self.startValue = nil;
								self:SetTextColor(1, 1, 1, 1);
							</OnEditFocusLost>
							<OnEnterPressed>
								self:ClearFocus();
							</OnEnterPressed>
							<OnEscapePressed>
								self:SetText(self.startValue);
								self:ClearFocus();
							</OnEscapePressed>
						</Scripts>
					</EditBox>
				</Frames>
			</Frame>
			<Frame name="$parentBuy" parentKey="buy">
				<Anchors>
					<Anchor point="TOPLEFT" x="0" y="0"/>
					<Anchor point="BOTTOMRIGHT" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentBuyText" inherits="GameFontHighlight" text="PURCHASE_TAB_TEXT">
							<Anchors>
								<Anchor point="TOP" x="0" y="-15"/>
							</Anchors>
						</FontString>
						<FontString name="$parentCostLabel" inherits="GameFontNormal" text="COSTS_LABEL">
							<Size>
								<AbsDimension x="0" y="12"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentBuyText" relativePoint="TOP">
									<Offset x="-93" y="-28"/>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Frame name="$parentCostMoneyFrame" inherits="SmallMoneyFrameTemplate" hidden="false" parentKey="money">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCostLabel" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="10" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								SmallMoneyFrame_OnLoad(self);
								MoneyFrame_SetType(self, "STATIC");
							</OnLoad>
						</Scripts>
					</Frame>
					<Button name="$parentPurchaseButton" inherits="UIPanelButtonTemplate" text="BANKSLOTPURCHASE" parentKey="button">
						<Size>
							<AbsDimension x="124" y="21"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCostMoneyFrame" relativePoint="RIGHT" x="12" y="0"/>
						</Anchors>
						<Scripts>
							<OnClick>
								PlaySound("igMainMenuOption");
								StaticPopup_Show("CONFIRM_BUY_GUILDBANK_TAB");
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
		</Frames>
	</Frame>
	
	
	
	
	<Frame name="GuildControlUI" inherits="TranslucentFrameTemplate" parent="UIParent" movable="true" enableMouse="true" hidden="true">
		<Size x="338" y="444"/>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="GuildFrame" relativePoint="TOPRIGHT" x="20" y="0"/>
 		</Anchors>
		<Layers>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture name="$parentTopBg" file="Interface\FrameGeneral\UI-Background-Rock" horizTile="true" vertTile="true">
					<Anchors>
						<Anchor point="TOPLEFT" x="12" y="-12"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="-12" y="-55"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" >
				<FontString name="$parentTitle" text="GUILDCONTROL" font="GameFontNormal">
					<Anchors>
						<Anchor point="TOPLEFT" x="24" y="-28"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentHbar" inherits="HorizontalBarTemplate" useParentLevel="true">
				<Anchors>
					<Anchor point="TOP"  relativeTo="$parentTopBg" relativePoint="BOTTOM" x="0" y="1"/>
					<Anchor point="LEFT"  x="8" y="0"/>
					<Anchor point="RIGHT"  x="-8" y="0"/>
				</Anchors>
			</Frame>
			<Button name="$parentCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
						<Offset x="-7" y="-7"/>
					</Anchor>
				</Anchors>
			</Button>
			<Frame name="$parentNavigationDropDown" inherits="UIDropDownMenuTemplate" parentKey="dropdown">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentTitle" relativePoint="RIGHT" x="5"/>
				</Anchors>
			</Frame>
			<Frame name="$parentRankOrderFrame" hidden="true" parentKey="orderFrame">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHbar" relativePoint="BOTTOMLEFT" x="5" y="-3"/>
					<Anchor point="BOTTOMRIGHT" x="-12" y="12"/>
				</Anchors>
				<Frames>
					<Frame name="$parentRank1" inherits="RankChangeTemplate" id="1">
						<Anchors>
							<Anchor point="TOPRIGHT" x="-9" y="-10"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.deleteButton:Disable();
								self.upButton:Disable();
								self.downButton:Disable();
							</OnLoad>
						</Scripts>
					</Frame>
					<Button name="$parentNewButton" inherits="UIPanelButtonTemplate" text="GUILD_NEW_RANK" parentKey="newButton">
						<Size x="110" y="22"/>
						<Anchors>
							<Anchor point="BOTTOMLEFT" x="7" y="7"/>
						</Anchors>
						<Scripts>
							<OnClick function="GuildControlUI_AddRankButton_OnClick"/>
						</Scripts>
					</Button>
					<Button name="$parentDupButton" inherits="UIPanelButtonTemplate" text="GUILD_DUP_RANK" parentKey="dupButton" hidden="true">
						<Size x="110" y="22"/>
						<Anchors>
							<Anchor point="BOTTOMRIGHT"  x="-7" y="7"/>
						</Anchors>
						<Scripts>
							<OnClick function="HideParentPanel"/>
						</Scripts>
					</Button>
				</Frames>
				<Scripts>
					<OnShow>
						GuildControlUI_RankOrder_Update(self);
					</OnShow>
				</Scripts>
			</Frame>
			<Frame name="$parentRankBankFrame" hidden="true" parentKey="bankTabFrame">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHbar" relativePoint="BOTTOMLEFT" x="5" y="-3"/>
					<Anchor point="BOTTOMRIGHT" x="-12" y="12"/>
				</Anchors>
				<Frames>
					<Frame name="$parentRankDropDown" inherits="UIDropDownMenuTemplate" parentKey="dropdown">
						<Anchors>
							<Anchor point="TOPLEFT" x="120" y="-10"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString inherits="GameFontNormal" text="GUILDCONTROL_SELECTRANK" justifyH="RIGHT">
									<Size x="120" y="12"/>
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT" x="4" y="2"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
									UIDropDownMenu_SetWidth(self, 150);
									UIDropDownMenu_SetButtonWidth(self, 54);
									UIDropDownMenu_JustifyText(self, "LEFT");
									UIDropDownMenu_Initialize(self, GuildControlUIRankDropDown_Initialize);
							</OnLoad>
							<OnShow>
							</OnShow>
						</Scripts>
					</Frame>
					<Frame name="$parentInset" inherits="InsetFrameTemplate2" parentKey="inset">
						<Size x="290" y="310"/>
						<Anchors>
							<Anchor point="TOP" x="0" y="-45"/>
						</Anchors>
						<Frames>
							<ScrollFrame name="$parentScrollFrame" inherits="UIPanelScrollFrameTemplate2" parentKey="scrollFrame">
								<Anchors>
									<Anchor point="TOPLEFT" x="8" y="-8"/>
									<Anchor point="BOTTOMRIGHT" x="-24" y="8"/>
								</Anchors>
								<ScrollChild>
									<Frame>
										<Size x="10" y="10"/>
									</Frame>
								</ScrollChild>
							</ScrollFrame>
						</Frames>
						<Scripts>
							<OnLoad function="GuildControlUI_BankFrame_OnLoad"/>
						</Scripts>
					</Frame>
				</Frames>
			</Frame>
			<Frame name="$parentRankSettingsFrame" hidden="true" parentKey="rankPermFrame">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHbar" relativePoint="BOTTOMLEFT" x="5" y="-3"/>
					<Anchor point="BOTTOMRIGHT" x="-12" y="12"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentChatBg" >
							<Size x="290" y="60"/>
							<Anchors>
								<Anchor point="TOP" x="0" y="-58"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="1" a="0.09"/>
						</Texture>
						<Texture name="$parentRosterBg" >
							<Size x="290" y="60"/>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentChatBg" relativePoint="BOTTOM" x="0" y="-6"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="1" a="0.09"/>
						</Texture>
						<Texture name="$parentInfoBg" >
							<Size x="290" y="100"/>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentRosterBg" relativePoint="BOTTOM" x="0" y="-6"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="1" a="0.09"/>
						</Texture>
						<Texture name="$parentBankBg" >
							<Size x="290" y="64"/>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentInfoBg" relativePoint="BOTTOM" x="0" y="-6"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="1" a="0.09"/>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="$parentChatLabel" inherits="GameFontNormal" text="GUILD_CHAT">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentChatBg" x="7" y="-7"/>
							</Anchors>
						</FontString>
						<FontString name="$parentRosterLabel" inherits="GameFontNormal" text="GUILD_ROSTER">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentRosterBg" x="7" y="-7"/>
							</Anchors>
						</FontString>
						<FontString name="$parentInfoLabel" inherits="GameFontNormal" text="GUILD_INFORMATION">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentInfoBg" x="7" y="-7"/>
							</Anchors>
						</FontString>
						<FontString name="$parentBankLabel" inherits="GameFontNormal" text="GUILD_BANK">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentBankBg" x="7" y="-7"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Frame name="$parentRankDropDown" inherits="UIDropDownMenuTemplate" parentKey="dropdown">
						<Anchors>
							<Anchor point="TOPLEFT" x="120" y="-6"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString inherits="GameFontNormal" text="GUILDCONTROL_SELECTRANK" justifyH="RIGHT">
									<Size x="120" y="12"/>
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT" x="4" y="2"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
									UIDropDownMenu_SetWidth(self, 150);
									UIDropDownMenu_SetButtonWidth(self, 54);
									UIDropDownMenu_JustifyText(self, "LEFT");
									UIDropDownMenu_Initialize(self, GuildControlUIRankDropDown_Initialize);
							</OnLoad>
							<OnShow>
							</OnShow>
						</Scripts>
					</Frame>
					
					<CheckButton name="$parentCheckbox1" inherits="GuildPermissionCheckBoxTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentChatLabel" relativePoint="BOTTOMLEFT" x="0" y="-3"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox3" inherits="GuildPermissionCheckBoxTemplate" id="3">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox1" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox2" inherits="GuildPermissionCheckBoxTemplate" id="2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCheckbox1" relativePoint="RIGHT" x="128" y="0"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox4" inherits="GuildPermissionCheckBoxTemplate" id="4">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox2" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					
					<CheckButton name="$parentCheckbox5" inherits="GuildPermissionCheckBoxTemplate" id="5">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentRosterLabel" relativePoint="BOTTOMLEFT" x="0" y="-3"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox7" inherits="GuildPermissionCheckBoxTemplate" id="7">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox5" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox6" inherits="GuildPermissionCheckBoxTemplate" id="6">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCheckbox5" relativePoint="RIGHT" x="128" y="0"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox8" inherits="GuildPermissionCheckBoxTemplate" id="8">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox6" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					
					<CheckButton name="$parentCheckbox9" inherits="GuildPermissionCheckBoxTemplate" id="9">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentInfoLabel" relativePoint="BOTTOMLEFT" x="0" y="-3"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox11" inherits="GuildPermissionCheckBoxTemplate" id="11">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox9" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox10" inherits="GuildPermissionCheckBoxTemplate" id="10">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCheckbox9" relativePoint="RIGHT" x="128" y="0"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox12" inherits="GuildPermissionCheckBoxTemplate" id="12">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox10" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox17" inherits="GuildPermissionCheckBoxTemplate" id="17">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox11" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox20" inherits="GuildPermissionCheckBoxTemplate" id="20">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox12" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox13" inherits="GuildPermissionCheckBoxTemplate" id="13">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox17" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox15" inherits="GuildPermissionCheckBoxTemplate" id="15">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentBankLabel" relativePoint="BOTTOMLEFT" x="0" y="-3"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox19" inherits="GuildPermissionCheckBoxTemplate" id="19">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCheckbox15" relativePoint="RIGHT" x="128" y="0"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentCheckbox16" inherits="GuildPermissionCheckBoxTemplate" id="16">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCheckbox15" relativePoint="BOTTOMLEFT" x="0" y="1"/>
						</Anchors>
					</CheckButton>
					<EditBox name="$parentGoldBox" autoFocus="false" historyLines="1" inherits="InputBoxTemplate" numeric="true" letters="6" parentKey="goldBox">
						<Size x="60" y="28"/>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCheckbox16" relativePoint="RIGHT" x="120" y="0"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString name="parentLabel" inherits="GameFontNormalSmall" text="GOLD_PER_DAY">
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT"  x="4"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<Frame name="$parentMask" enableMouse="true" hidden="true" setAllPoints="true" parentKey="mask"/>
						</Frames>
						<Scripts>
							<OnEditFocusGained>
								self.startValue = self:GetText();
								GuildControlUI.activeEditBox = self;
							</OnEditFocusGained>
							<OnEditFocusLost>
								GuildControlUI.activeEditBox = nil;
								local text = self:GetText();
								if ( self.startValue ~= text and text ~= "" ) then
									SetGuildBankWithdrawGoldLimit(self:GetText());
									GuildControlSaveRank();
								else
									self:SetText(self.startValue);
								end
								self.startValue = nil;
								self:SetTextColor(1, 1, 1);
							</OnEditFocusLost>
							<OnTextChanged>
								if ( self.startValue and self:GetText() ~= self.startValue ) then
									self:SetTextColor(0, 1, 0);
								end
							</OnTextChanged>
							<OnEnterPressed>
								self:ClearFocus();
							</OnEnterPressed>
							<OnEscapePressed>
								self:SetText(self.startValue);
								self:ClearFocus();
							</OnEscapePressed>
						</Scripts>
					</EditBox>
					<!-- authenticator checkbox -->
					<CheckButton name="$parentCheckbox18" inherits="GuildPermissionCheckBoxTemplate" id="18">
						<Anchors>
							<Anchor point="TOP" x="0" y="-37"/>
							<Anchor point="LEFT" relativeTo="$parentCheckbox1"/>
						</Anchors>
						<Scripts>
							<OnClick>
								if ( not self:GetChecked() and GetNumMembersInRank(GuildControlUI.currentRank) > 0 ) then
									self:SetChecked(true);
									local dialog = StaticPopup_Show("CONFIRM_RANK_AUTHENTICATOR_REMOVE", 
										string.format(REMOVE_AUTHENTICATOR_FROM_RANK, GuildControlGetRankName(GuildControlUI.currentRank)));
									dialog.data = self;
								else
									GuildControlUI_CheckClicked(self);
								end
							</OnClick>
						</Scripts>
					</CheckButton>
					<Frame name="$parentCheckbox18Tooltip" enableMouse="true">
						<Size x="0" y="20"/>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCheckbox18Text"/>
							<Anchor point="RIGHT" relativeTo="$parentCheckbox18Text"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								local checkbox = _G[self:GetParent():GetName().."Checkbox18"];
								checkbox.tooltipFrame = self;
								self:SetFrameLevel(checkbox:GetFrameLevel() + 1);
							</OnLoad>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								GameTooltip:SetText(GUILD_RANK_AUTHENTICATOR_TOOLTIP, nil, nil, nil, nil, true);
								if ( self.tooltip ) then
									GameTooltip:AddLine(self.tooltip, 1, 0, 0, true);
									GameTooltip:Show();
								end
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
					<!-- authenticator checkbox -->
				</Frames>
			</Frame>
		</Frames>  
		<Scripts>
			<OnEvent function="GuildControlUI_OnEvent"/>
			<OnShow>
				self.numSkipUpdates = 0;
				GuildControlButton:LockHighlight();
				PlaySound("igMainMenuOptionCheckBoxOn");
			</OnShow>
			<OnHide>
				StaticPopup_Hide("CONFIRM_RANK_AUTHENTICATOR_REMOVE");
				GuildControlButton:UnlockHighlight();
				PlaySound("igMainMenuOptionCheckBoxOff");
			</OnHide>
			<OnLoad function="GuildControlUI_OnLoad"/>
		</Scripts>
	</Frame>
	
	
	
	
	
	
	
	
	
	
	

	<!--Button name="GuildBankTabPermissionsTabTemplate" virtual="true">
		<Size x="26" y="32"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" file="Interface\GuildBankFrame\UI-GuildFrame-PermissionTab">
					<Size>
						<AbsDimension x="32" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				GuildBankTabPermissionsTab_OnClick(self:GetID());
			</OnClick>
			<OnEnter>
				if(self.tooltip) then
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
					GameTooltip:SetText(self.tooltip);
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<ButtonText name="$parentText">
			<Size>
				<AbsDimension x="50" y="8"/>
			</Size>
			<Anchors>
				<Anchor point="CENTER" relativeTo="$parentBackground">
					<Offset>
						<AbsDimension x="0" y="-5"/>
					</Offset>
				</Anchor>
			</Anchors>
		</ButtonText>
		<NormalFont style="GameFontNormalSmall"/>
		<HighlightFont style="GameFontHighlightSmall"/>
		<DisabledFont style="GameFontDisableSmall"/>
		<HighlightTexture file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT" relativeTo="$parentBackground">
					<Offset>
						<AbsDimension x="6" y="0"/>
					</Offset>
				</Anchor>
				<Anchor point="BOTTOMRIGHT" relativeTo="$parentBackground">
					<Offset>
						<AbsDimension x="-7" y="-7"/>
					</Offset>
				</Anchor>
			</Anchors>
		</HighlightTexture>
	</Button>
	<Frame name="GuildControlPopupFrame" toplevel="true" parent="UIParent" movable="true" enableMouse="true" hidden="true">
		<Size>
			<AbsDimension x="320" y="457"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="GuildFrame" relativePoint="TOPRIGHT">
				<Offset x="20" y="-6"/>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\MacroFrame\MacroPopup-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\MacroFrame\MacroPopup-TopRight">
					<Size>
						<AbsDimension x="64" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\MacroFrame\MacroPopup-BotLeft">
					<Size>
						<AbsDimension x="256" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOMLEFT"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\MacroFrame\MacroPopup-BotRight">
					<Size>
						<AbsDimension x="64" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\MacroFrame\MacroPopup-TopLeft">
					<Size>
						<AbsDimension x="256" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="0" y="-256"/>
						</Anchor>
						<Anchor point="BOTTOMLEFT">
							<Offset x="0" y="64"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="1" top="0.3125" bottom="1"/>
				</Texture>
				<Texture file="Interface\MacroFrame\MacroPopup-TopRight">
					<Size>
						<AbsDimension x="64" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset x="0" y="-256"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="0" y="64"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="1" top="0.3125" bottom="1"/>
				</Texture>
				<FontString inherits="GameFontNormal" text="GUILDCONTROL_SELECTRANK">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-15"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString inherits="GameFontHighlightSmall" text="GUILDCONTROL_ALLOWRANK">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="-10" y="-106"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="GuildControlPopupFrameCheckboxes">
				<Size>
					<AbsDimension x="300" y="500"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="-22" y="1"/>
					</Anchor>
				</Anchors>
				<Frames>
					<Frame name="GuildControlPopupFrameDropDown" inherits="UIDropDownMenuTemplate">
						<Anchors>
							<Anchor point="TOP">
								<Offset>
									<AbsDimension x="0" y="-30"/>
								</Offset>
							</Anchor>
						</Anchors>
						<HitRectInsets>
							<AbsInset left="0" right="20" top="0" bottom="0"/>
						</HitRectInsets>
						<Scripts>
							<OnLoad function="GuildControlPopupFrameDropDown_OnLoad"/>
						</Scripts>
					</Frame>
					<Button name="GuildControlPopupFrameAddRankButton">
						<Size>
							<AbsDimension x="16" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="GuildControlPopupFrameDropDown" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="-15" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnUpdate function="GuildControlPopupFrameAddRankButton_OnUpdate"/>
							<OnClick>
								StaticPopup_Show("ADD_GUILDRANK");
							</OnClick>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								GameTooltip:SetText(GUILDADDRANK_BUTTON_TOOLTIP);
							</OnEnter>
							<OnLeave function="GameTooltip_Hide"/>
						</Scripts>
						<NormalTexture file="Interface\Buttons\UI-PlusButton-Up"/>
						<PushedTexture file="Interface\Buttons\UI-PlusButton-Down"/>
						<DisabledTexture file="Interface\Buttons\UI-PlusButton-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD"/>
					</Button>
					<Button name="GuildControlPopupFrameRemoveRankButton">
						<Size>
							<AbsDimension x="16" y="16"/>
						</Size>
						<Anchors>
							<Anchor point="LEFT" relativeTo="GuildControlPopupFrameAddRankButton" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="-2" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnUpdate function="GuildControlPopupFrameRemoveRankButton_OnUpdate"/>
							<OnClick function="GuildControlPopupFrameRemoveRankButton_OnClick"/>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								GameTooltip:SetText(GUILDREMOVERANK_BUTTON_TOOLTIP);
							</OnEnter>
							<OnLeave function="GameTooltip_Hide"/>
						</Scripts>
						<NormalTexture file="Interface\Buttons\UI-MinusButton-Up"/>
						<PushedTexture file="Interface\Buttons\UI-MinusButton-Down"/>
						<DisabledTexture file="Interface\Buttons\UI-MinusButton-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD"/>
					</Button>
					<CheckButton name="GuildControlPopupFrameCheckbox1" inherits="GuildPermissionCheckBoxTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="21" y="-123"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox3" inherits="GuildPermissionCheckBoxTemplate" id="3">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox1" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox5" inherits="GuildPermissionCheckBoxTemplate" id="5">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox3" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox7" inherits="GuildPermissionCheckBoxTemplate" id="7">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox5" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox9" inherits="GuildPermissionCheckBoxTemplate" id="9">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox7" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox11" inherits="GuildPermissionCheckBoxTemplate" id="11">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox9" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox13" inherits="GuildPermissionCheckBoxTemplate" id="13">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox11" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<Frame name="GuildControlWithdrawGold">
						<Size>
							<AbsDimension x="20" y="20"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="GuildControlPopupFrameCheckbox13" relativePoint="BOTTOMLEFT">
								<Offset x="0" y="-16"/>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="GuildControlWithdrawGoldText" inherits="GameFontNormalSmall" text="GUILDCONTROL_WITHDRAW_GOLD">
									<Anchors>
										<Anchor point="TOPLEFT"/>
									</Anchors>
								</FontString>
								<FontString name="GuildControlWithdrawGoldAmountText" inherits="GameFontNormalSmall" text="GOLD_PER_DAY">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="GuildControlWithdrawGoldText" relativePoint="BOTTOMLEFT">
											<Offset x="0" y="-13"/>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<EditBox name="GuildControlWithdrawGoldEditBox" autoFocus="false" historyLines="1" inherits="InputBoxTemplate" numeric="true">
								<Size>
									<AbsDimension x="70" y="32"/>
								</Size>
								<Anchors>
									<Anchor point="LEFT" relativeTo="GuildControlWithdrawGoldAmountText" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="11" y="-1"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Frames>
									<Frame name="$parentMask" enableMouse="true" hidden="true" setAllPoints="true"/>
								</Frames>
								<Scripts>
									<OnTextChanged>
										if ( self:GetText() ~= UNLIMITED ) then
											GuildControlPopupAcceptButton:Enable();
											GuildControlPopupFrame.goldChanged = 1;
										end
									</OnTextChanged> 
									<OnEditFocusGained>
										GuildControlPopupAcceptButton:Enable();
									</OnEditFocusGained>
									<OnEnterPressed>
										self:ClearFocus();
										GuildControlPopupAcceptButton:Enable();
									</OnEnterPressed>
									<OnEscapePressed function="EditBox_ClearFocus"/>
								</Scripts>
							</EditBox>
						</Frames>
					</Frame>
					<CheckButton name="GuildControlPopupFrameCheckbox2" inherits="GuildPermissionCheckBoxTemplate" id="2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="GuildControlPopupFrameCheckbox1" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="117" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox4" inherits="GuildPermissionCheckBoxTemplate" id="4">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox2" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox6" inherits="GuildPermissionCheckBoxTemplate" id="6">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox4" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox8" inherits="GuildPermissionCheckBoxTemplate" id="8">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox6" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox10" inherits="GuildPermissionCheckBoxTemplate" id="10">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox8" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox12" inherits="GuildPermissionCheckBoxTemplate" id="12">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox10" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox17" inherits="GuildPermissionCheckBoxTemplate" id="17">
						<Anchors>
							<Anchor point="TOP" relativeTo="GuildControlPopupFrameCheckbox12" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox16" inherits="GuildPermissionCheckBoxTemplate" id="16">
						<Anchors>
							<Anchor point="LEFT" relativeTo="GuildControlWithdrawGoldText" relativePoint="RIGHT">
								<Offset x="4" y="-1"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								if ( self:GetChecked() ) then
									PlaySound("igMainMenuOptionCheckBoxOff");
								else
									PlaySound("igMainMenuOptionCheckBoxOn");
								end
								GuildControlSetRankFlag(self:GetID(), self:GetChecked());
								GuildControlPopupAcceptButton:Enable();
								WithdrawGoldEditBox_Update();
							</OnClick>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								GameTooltip:SetText(GUILDCONTROL_OPTION16_TOOLTIP, nil, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
							</OnEnter>
							<OnLeave function="GameTooltip_Hide"/>
						</Scripts>
					</CheckButton>
					<CheckButton name="GuildControlPopupFrameCheckbox15" inherits="GuildPermissionCheckBoxTemplate" id="15">
						<Anchors>
							<Anchor point="LEFT" relativeTo="GuildControlPopupFrameCheckbox16Text" relativePoint="RIGHT">
								<Offset x="12" y="-1"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								if ( self:GetChecked() ) then
									PlaySound("igMainMenuOptionCheckBoxOff");
								else
									PlaySound("igMainMenuOptionCheckBoxOn");
								end
								GuildControlSetRankFlag(self:GetID(), self:GetChecked());
								GuildControlPopupAcceptButton:Enable();
								WithdrawGoldEditBox_Update();
							</OnClick>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
								GameTooltip:SetText(GUILDCONTROL_OPTION15_TOOLTIP, nil, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
							</OnEnter>
							<OnLeave function="GameTooltip_Hide"/>
						</Scripts>
					</CheckButton>
					
				</Frames>
			</Frame>
			<Button name="GuildControlPopupFrameCancelButton" inherits="UIPanelButtonTemplate" text="CANCEL">
				<Size>
					<AbsDimension x="78" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativeTo="GuildControlPopupFrame">
						<Offset x="-33" y="34"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick function="HideParentPanel"/>
				</Scripts>
			</Button>
			<Button name="GuildControlPopupAcceptButton" inherits="UIPanelButtonTemplate" text="ACCEPT">
				<Size>
					<AbsDimension x="78" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="GuildControlPopupFrameCancelButton" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="-2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick function="GuildControlPopupAcceptButton_OnClick"/>
				</Scripts>
			</Button>
			<EditBox name="GuildControlPopupFrameEditBox" autoFocus="false" historyLines="1" letters="15" inherits="InputBoxTemplate">
				<Size>
					<AbsDimension x="130" y="32"/>
				</Size>
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="35" y="-68"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<FontString inherits="GameFontNormal" text="GUILDCONTROL_RANKLABEL">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="GuildControlPopupFrameEditBox" relativePoint="LEFT">
									<Offset>
										<AbsDimension x="-12" y="1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnEditFocusGained>
						GuildControlPopupAcceptButton:Enable();
					</OnEditFocusGained>
					<OnEnterPressed>
						self:ClearFocus();
						GuildControlPopupAcceptButton:Enable();
					</OnEnterPressed>
					<OnEscapePressed function="EditBox_ClearFocus"/>
				</Scripts>
			</EditBox>
			<Frame name="GuildControlPopupFrameTabPermissions">
				<Size>
					<AbsDimension x="268" y="62"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="GuildControlPopupFrame" relativePoint="BOTTOMLEFT">
						<Offset x="13" y="58"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Layers>
					<Layer level="BACKGROUND">
						<FontString name="GuildBankTabLabel" inherits="GameFontHighlightSmall" text="GUILDBANK_TAB_COLON">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="GuildControlPopupFrameTabPermissions" relativePoint="TOPLEFT">
									<Offset x="9" y="13"/>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<CheckButton name="GuildControlTabPermissionsViewTab" inherits="GuildPermissionCheckBoxTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="GuildControlPopupFrameTabPermissions" relativePoint="TOPLEFT">
								<Offset x="10" y="-6"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								SetPendingGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab, self:GetID(), self:GetChecked());
								GuildControlPopupAcceptButton:Enable();
								GuildControlPopup_UpdateDepositCheckBox();
							</OnClick>
						</Scripts>
					</CheckButton>
					<CheckButton name="GuildControlTabPermissionsDepositItems" inherits="GuildPermissionCheckBoxTemplate" id="2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="GuildControlTabPermissionsViewTabText" relativePoint="RIGHT">
								<Offset x="45" y="-1"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								SetPendingGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab, self:GetID(), self:GetChecked());
								GuildControlPopupAcceptButton:Enable();
							</OnClick>
						</Scripts>
					</CheckButton>
					<CheckButton name="GuildControlTabPermissionsUpdateText" inherits="GuildPermissionCheckBoxTemplate" id="3">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="GuildControlTabPermissionsViewTab" relativePoint="BOTTOMLEFT">
								<Offset x="0" y="4"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								SetPendingGuildBankTabPermissions(GuildControlPopupFrameTabPermissions.selectedTab, self:GetID(), self:GetChecked());
								GuildControlPopupAcceptButton:Enable();
							</OnClick>
						</Scripts>
					</CheckButton>
					<Frame name="GuildControlTabPermissionsWithdrawItems">
						<Size>
							<AbsDimension x="20" y="20"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="GuildControlTabPermissionsViewTab" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-16"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="GuildControlTabPermissionsWithdrawItemsText" inherits="GameFontNormalSmall" text="GUILDCONTROL_WITHDRAW_ITEMS">
									<Anchors>
										<Anchor point="TOPLEFT"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Frames>
							<EditBox name="GuildControlWithdrawItemsEditBox" autoFocus="false" historyLines="1" letters="15" inherits="InputBoxTemplate" numeric="true">
								<Size>
									<AbsDimension x="70" y="32"/>
								</Size>
								<Anchors>
									<Anchor point="LEFT" relativeTo="GuildControlTabPermissionsWithdrawItemsText" relativePoint="RIGHT">
										<Offset>
											<AbsDimension x="20" y="0"/>
										</Offset>
									</Anchor>
								</Anchors>
								<Frames>
									<Frame name="$parentMask" enableMouse="true" hidden="true" setAllPoints="true"/>
								</Frames>
								<Scripts>
									<OnEditFocusGained>
										GuildControlPopupAcceptButton:Enable();
									</OnEditFocusGained>
									<OnTextChanged>
										local amount = self:GetText();
										if(amount and amount ~= "" and amount ~= UNLIMITED) then
											SetPendingGuildBankTabWithdraw(GuildControlPopupFrameTabPermissions.selectedTab, amount);
										end
									</OnTextChanged> 
									<OnEnterPressed>
										self:ClearFocus();
										GuildControlPopupAcceptButton:Enable();
									</OnEnterPressed>
									<OnEscapePressed function="EditBox_ClearFocus"/>
								</Scripts>
							</EditBox>
						</Frames>
					</Frame>
					<Button name="GuildBankTabPermissionsTab6" inherits="GuildBankTabPermissionsTabTemplate" id="6" text="6">
						<Anchors>
							<Anchor point="TOPRIGHT" relativeTo="GuildControlPopupFrameTabPermissions" relativePoint="TOPRIGHT">
								<Offset x="-4" y="27"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="GuildBankTabPermissionsTab5" inherits="GuildBankTabPermissionsTabTemplate" id="5" text="5">
						<Anchors>
							<Anchor point="RIGHT" relativeTo="GuildBankTabPermissionsTab6" relativePoint="LEFT">
								<Offset x="4" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="GuildBankTabPermissionsTab4" inherits="GuildBankTabPermissionsTabTemplate" id="4" text="4">
						<Anchors>
							<Anchor point="RIGHT" relativeTo="GuildBankTabPermissionsTab5" relativePoint="LEFT">
								<Offset x="4" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="GuildBankTabPermissionsTab3" inherits="GuildBankTabPermissionsTabTemplate" id="3"  text="3">
						<Anchors>
							<Anchor point="RIGHT" relativeTo="GuildBankTabPermissionsTab4" relativePoint="LEFT">
								<Offset x="4" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="GuildBankTabPermissionsTab2" inherits="GuildBankTabPermissionsTabTemplate" id="2"  text="2">
						<Anchors>
							<Anchor point="RIGHT" relativeTo="GuildBankTabPermissionsTab3" relativePoint="LEFT">
								<Offset x="4" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
					<Button name="GuildBankTabPermissionsTab1" inherits="GuildBankTabPermissionsTabTemplate" id="1"  text="1">
						<Anchors>
							<Anchor point="RIGHT" relativeTo="GuildBankTabPermissionsTab2" relativePoint="LEFT">
								<Offset x="4" y="0"/>
							</Anchor>
						</Anchors>
					</Button>
				</Frames>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(0.4, 0.4, 0.4);
						self:SetBackdropColor(0.15, 0.15, 0.15);
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad function="GuildControlPopupFrame_OnLoad"/>
			<OnShow function="GuildControlPopupFrame_OnShow"/>
			<OnHide function="GuildControlPopupFrame_OnHide"/>
		</Scripts>
	</Frame-->
</Ui>