<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_Calendar.lua"/>
	<Include file="Blizzard_CalendarTemplates.xml"/>

	<!-- CalendarFrame -->
	<!-- This is the main Calendar frame. It should be the parent of all related Calendar frames. If we
		 decide to allow the event frames to be viewable without looking at the Calendar then nevermind!
	-->
	<Frame name="CalendarFrame" toplevel="true" parent="UIParent" enableMouse="true" enableKeyboard="true" frameStrata="HIGH" hidden="true">
		<Size x="655" y="624"/>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset x="15" y="-80"/>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BORDER">
				<!-- top textures -->
				<Texture name="$parentTopLeftTexture" file="Interface\Calendar\CalendarFrame_TopAndBottom">
					<Size x="256" y="46"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.00390625" bottom="0.16015625"/>
				</Texture>
				<Texture name="$parentTopMiddleTexture" file="Interface\Calendar\CalendarFrame_TopAndBottom">
					<Size x="256" y="46"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentTopLeftTexture" relativePoint="TOPRIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.16796875" bottom="0.32421875"/>
				</Texture>
				<Texture name="$parentTopRightTexture" file="Interface\Calendar\CalendarFrame_TopAndBottom">
					<Size x="143" y="30"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentTopMiddleTexture" relativePoint="TOPRIGHT">
							<Offset x="0" y="-16"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.55859375" top="0.328125" bottom="0.4296875"/>
				</Texture>
				<!-- left side textures -->
				<Texture name="$parentLeftTopTexture" file="Interface\Calendar\CalendarFrame_Sides">
					<Size x="12" y="256"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentTopLeftTexture" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.09375" top="0.0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentLeftMiddleTexture" file="Interface\Calendar\CalendarFrame_Sides">
					<Size x="12" y="256"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeftTopTexture" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.09375" right="0.1875" top="0.0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentLeftBottomTexture" file="Interface\Calendar\CalendarFrame_Sides">
					<Size x="11" y="62"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeftMiddleTexture" relativePoint="BOTTOMLEFT">
							<Offset x="2" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.1953125" right="0.28125" top="0.0" bottom="0.2421875"/>
				</Texture>
				<!-- right side textures -->
				<Texture name="$parentRightTopTexture" file="Interface\Calendar\CalendarFrame_Sides">
					<Size x="13" y="256"/>
					<Anchors>
						<Anchor point="TOPRIGHT" relativeTo="$parentTopRightTexture" relativePoint="BOTTOMRIGHT">
							<Offset x="1" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.296875" right="0.3984375" top="0.0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentRightMiddleTexture" file="Interface\Calendar\CalendarFrame_Sides">
					<Size x="11" y="256"/>
					<Anchors>
						<Anchor point="TOPRIGHT" relativeTo="$parentRightTopTexture" relativePoint="BOTTOMRIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.3984375" right="0.484375" top="0.0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentRightBottomTexture" file="Interface\Calendar\CalendarFrame_Sides">
					<Size x="11" y="62"/>
					<Anchors>
						<Anchor point="TOPRIGHT" relativeTo="$parentRightMiddleTexture" relativePoint="BOTTOMRIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.484375" right="0.5703125" top="0.0" bottom="0.2421875"/>
				</Texture>
				<!-- bottom textures -->
				<Texture name="$parentBottomLeftTexture" file="Interface\Calendar\CalendarFrame_TopAndBottom">
					<Size x="256" y="9"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeftBottomTexture" relativePoint="BOTTOMLEFT">
							<Offset x="-1" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.43359375" bottom="0.46875"/>
				</Texture>
				<Texture name="$parentBottomMiddleTexture" file="Interface\Calendar\CalendarFrame_TopAndBottom">
					<Size x="256" y="9"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentBottomLeftTexture" relativePoint="RIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.46875" bottom="0.50390625"/>
				</Texture>
				<Texture name="$parentBottomRightTexture" file="Interface\Calendar\CalendarFrame_TopAndBottom">
					<Size x="143" y="9"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentBottomMiddleTexture" relativePoint="RIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.55859375" top="0.50390625" bottom="0.5390625"/>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND">
				<!--
					HACK: 0.01 was subtracted from the bottom of all weekday background tex coords to prevent texture seams
					the real bottom value is 0.8203125
				-->
				<Texture name="CalendarWeekday1Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeftTopTexture" relativePoint="TOPRIGHT">
							<!-- HACK: 1 pixel x offset is in here to prevent texture seams -->
							<Offset x="-1" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.35546875" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<Texture name="CalendarWeekday2Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="CalendarWeekday1Background" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.35546875" right="0.70703125" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<Texture name="CalendarWeekday3Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="CalendarWeekday2Background" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.0" right="0.35546875" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<Texture name="CalendarWeekday4Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="CalendarWeekday3Background" relativePoint="RIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.35546875" right="0.70703125" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<Texture name="CalendarWeekday5Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="CalendarWeekday4Background" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.0" right="0.35546875" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<Texture name="CalendarWeekday6Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="CalendarWeekday5Background" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.35546875" right="0.70703125" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<Texture name="CalendarWeekday7Background" file="Interface\Calendar\CalendarBackground">
					<Size x="91" y="28"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="CalendarWeekday6Background" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.0" right="0.35546875" top="0.7109375" bottom="0.8103125"/>
				</Texture>
				<FontString name="CalendarWeekday1Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday1Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
				<FontString name="CalendarWeekday2Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday2Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
				<FontString name="CalendarWeekday3Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday3Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
				<FontString name="CalendarWeekday4Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday4Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
				<FontString name="CalendarWeekday5Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday5Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
				<FontString name="CalendarWeekday6Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday6Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
				<FontString name="CalendarWeekday7Name" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarWeekday7Background"/>
					</Anchors>
					<Color r="1.0" g="1.0" b="0.6039215686274509803921568627451"/>
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
				<Texture name="CalendarMonthBackground" file="Interface\Calendar\CalendarBackground">
					<Size x="142" y="36"/>
					<Anchors>
						<Anchor point="TOP">
							<Offset x="-3" y="-1"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.5546875" top="0.828125" bottom="0.96875"/>
				</Texture>
				<FontString name="CalendarMonthName" inherits="GameFontHighlightLarge" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarMonthBackground"/>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="CalendarYearBackground" file="Interface\Calendar\CalendarBackground">
					<Size x="47" y="24"/>
					<Anchors>
						<Anchor point="TOP" relativeTo="CalendarMonthBackground" relativePoint="BOTTOM">
							<Offset x="-2" y="13"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.5546875" top="0.828125" bottom="0.96875"/>
				</Texture>
				<FontString name="CalendarYearName" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" relativeTo="CalendarYearBackground">
							<Offset x="0" y="-1"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="CalendarLastDayDarkTexture" file="Interface\Calendar\CalendarShadows" hidden="true">
					<Size x="3" y="3"/>
					<!-- HACK: 0.01 was subtracted from the right to prevent texture seams	-->
					<TexCoords left="0.0" right="0.004859375" top="0.90234375" bottom="0.9140625"/>
				</Texture>
				<Texture name="CalendarWeekdaySelectedTexture" file="Interface\Calendar\Highlights" alphaMode="ADD" hidden="true">
					<Size x="85" y="21"/>
					<TexCoords left="0.0" right="0.33203125" top="0.6953125" bottom="0.859375"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarTodayFrame" hidden="true">
				<Size x="145" y="140"/>
				<Anchors>
					<Anchor point="CENTER"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="CalendarTodayTextureGlow" file="Interface\Calendar\CurrentDay" alphaMode="ADD">
							<Size x="112" y="130"/>
							<Anchors>
								<Anchor point="CENTER">
									<Offset x="2" y="15"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.5625" right="1" top="0" bottom="0.5078125"/>
						</Texture>
					</Layer>
					<Layer level="BORDER">
						<Texture name="CalendarTodayTexture" file="Interface\Calendar\CurrentDay">
							<Size x="145" y="140"/>
							<TexCoords left="0.0078125" right="0.57421875" top="0.0390625" bottom="0.5859375"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self.timer = 0;
						self.fadeTime = 1.5;
						self.fadein = true;
					</OnLoad>
					<OnUpdate>
						CalendarTodayFrame_OnUpdate(self, elapsed);
					</OnUpdate>
				</Scripts>
			</Frame>
			<Button name="CalendarPrevMonthButton">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="RIGHT" relativeTo="CalendarMonthBackground" relativePoint="LEFT">
						<Offset x="0" y="-1"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CalendarPrevMonthButton_OnClick();
					</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="CalendarNextMonthButton">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="LEFT" relativeTo="CalendarMonthBackground" relativePoint="RIGHT">
						<Offset x="0" y="-1"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CalendarNextMonthButton_OnClick();
					</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>
			<Frame name="CalendarFilterFrame">
				<Size x="106" y="20"/>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="CalendarFrame" relativePoint="TOPRIGHT">
						<Offset x="-44" y="-21"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
							<Size x="8" y="16"/>
							<Anchors>
								<Anchor point="LEFT">
									<Offset x="-5" y="0"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
							<Size x="8" y="16"/>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
							<Size x="10" y="16"/>
							<Anchors>
								<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
								<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
							</Anchors>
							<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
						</Texture>
						<FontString name="$parentText" inherits="GameFontHighlightSmall" text="CALENDAR_FILTERS" justifyH="RIGHT">
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="-24" y="0"/>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="CalendarFilterButton">
						<Size x="20" y="20"/>
						<Anchors>
							<Anchor point="RIGHT">
								<Offset x="0" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								CalendarFilterButton_OnClick(self);
							</OnClick>
						</Scripts>
						<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
							<Size x="20" y="20"/>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="3" y="0"/>
								</Anchor>
							</Anchors>
						</NormalTexture>
						<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
							<Size x="20" y="20"/>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="3" y="0"/>
								</Anchor>
							</Anchors>
						</PushedTexture>
						<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
							<Size x="20" y="20"/>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="3" y="0"/>
								</Anchor>
							</Anchors>
						</DisabledTexture>
						<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
							<Size x="20" y="20"/>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset x="3" y="0"/>
								</Anchor>
							</Anchors>
						</HighlightTexture>
					</Button>
				</Frames>
			</Frame>
			<Frame name="CalendarFilterDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
				<Scripts>
					<OnLoad>
						CalendarFilterDropDown_OnLoad(self);
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="CalendarCloseButton" inherits="UIPanelCloseButton">
				<Size x="32" y="34"/>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="5" y="-13"/>
					</Anchor>
				</Anchors>
			</Button>

			<!-- Context menus -->
			<Frame name="CalendarContextMenu" inherits="UIMenuTemplate" frameStrata="FULLSCREEN" enableMouse="true" clampedToScreen="true" hidden="true">
				<Scripts>
					<OnLoad>
						CalendarContextMenu_OnLoad(self);
					</OnLoad>
					<OnHide>
						CalendarContextMenu_OnHide(self);
					</OnHide>
				</Scripts>
			</Frame>
			<Frame name="CalendarArenaTeamContextMenu" inherits="UIMenuTemplate" frameStrata="FULLSCREEN" enableMouse="true" hidden="true" parent="CalendarContextMenu">
				<Scripts>
					<OnLoad>
						CalendarArenaTeamContextMenu_OnLoad(self);
					</OnLoad>
					<OnShow>
						CalendarArenaTeamContextMenu_OnShow(self);
					</OnShow>
					<OnEvent>
						CalendarArenaTeamContextMenu_OnEvent(self, event, ...);
					</OnEvent>
				</Scripts>
			</Frame>
			<Frame name="CalendarInviteStatusContextMenu" inherits="UIMenuTemplate" frameStrata="FULLSCREEN" enableMouse="true" hidden="true" parent="CalendarContextMenu">
				<Scripts>
					<OnLoad>
						CalendarInviteStatusContextMenu_OnLoad(self);
					</OnLoad>
					<OnShow>
						CalendarInviteStatusContextMenu_OnShow(self);
					</OnShow>
					<OnEvent>
						CalendarInviteStatusContextMenu_OnEvent(self, event, ...);
					</OnEvent>
				</Scripts>
			</Frame>

			<!-- Modal frame support -->
			<Frame name="CalendarModalDummy" enableMouse="true" enableKeyboard="true" hidden="true">
				<Size x="655" y="624"/>
				<Anchors>
					<Anchor point="TOPLEFT"/>
				</Anchors>
				<Frames>
					<Frame name="CalendarFrameBlocker" enableMouse="true" enableKeyboard="true">
						<Size x="655" y="624"/>
						<Scripts>
							<OnLoad>
								self:SetAllPoints(CalendarFrame);
							</OnLoad>
						</Scripts>
					</Frame>
					<Frame name="CalendarEventFrameBlocker" enableMouse="true" enableKeyboard="true" hidden="true">
						<Size x="320" y="520"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
								<Offset x="0" y="-24"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnShow>
								CalendarEventFrameBlocker_OnShow(self);
							</OnShow>
							<OnHide>
								CalendarEventFrameBlocker_OnHide(self);
							</OnHide>
						</Scripts>
					</Frame>
				</Frames>
			</Frame>
			<Frame name="$parentModalOverlay" hidden="true">
				<Layers>
					<Layer level="BACKGROUND">
						<Texture setAllPoints="true">
							<Color r="0" g="0" b="0" a="0.6"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 3);
					</OnLoad>
					<OnShow>
						self:ClearAllPoints();
						self:SetPoint("TOPLEFT", CalendarDayButton1, "TOPLEFT");
						self:SetPoint("BOTTOMRIGHT", CalendarDayButton42, "BOTTOMRIGHT");
					</OnShow>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				CalendarFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				CalendarFrame_OnShow(self);
			</OnShow>
			<OnHide>
				CalendarFrame_OnHide(self);
			</OnHide>
		</Scripts>
	</Frame>

	<!-- View Holiday -->
	<!-- You see this frame when viewing a Holiday event. -->
	<Frame name="CalendarViewHolidayFrame" toplevel="true" parent="CalendarFrame" enableMouse="true" frameStrata="HIGH" hidden="true">
		<Size x="320" y="320"/>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
				<Offset x="0" y="-24"/>
			</Anchor>
		</Anchors>
		<Backdrop edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="CalendarViewHolidayBackground">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="4" y="-4"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="4"/>
						</Anchor>
					</Anchors>
					<Color r="0.0" g="0.0" b="0.0" a="0.8"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="CalendarViewHolidayInfoTexture" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="12" y="-13"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-11" y="11"/>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarViewHolidayTitleFrame" inherits="CalendarTitleFrameTemplate">
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 6);
					</OnLoad>
				</Scripts>
			</Frame>
			<ScrollFrame name="CalendarViewHolidayScrollFrame" inherits="UIPanelScrollFrameTemplate">
				<Size x="270" y="278"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="15" y="-30"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.scrollBarHideable = 1;
						ScrollFrame_OnLoad(self);
						ScrollFrame_OnScrollRangeChanged(self);
					</OnLoad>
				</Scripts>
				<ScrollChild>
					<Frame name="CalendarViewHolidayScrollChild">
						<Size x="270" y="10"/>
						<Anchors>
							<Anchor point="TOPLEFT"/>
						</Anchors>
						<Layers>
							<Layer level="BORDER">
								<FontString name="CalendarViewHolidayDescription" inherits="GameFontHighlightLeft" nonspacewrap="true" justifyV="TOP">
									<Size x="265" y="0"/>
									<Anchors>
										<Anchor point="TOPLEFT"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</Frame>
				</ScrollChild>
			</ScrollFrame>
			<Button name="CalendarViewHolidayCloseButton" inherits="CalendarEventCloseButtonTemplate"/>

			<Frame name="$parentModalOverlay" inherits="CalendarModalEventOverlayTemplate" hidden="true"/>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarViewHolidayFrame_OnLoad(self);
			</OnLoad>
			<OnShow>
				CalendarViewHolidayFrame_OnShow(self);
			</OnShow>
			<OnHide>
				CalendarViewHolidayFrame_OnHide(self);
			</OnHide>
		</Scripts>
	</Frame>

	<!-- View Raid -->
	<!-- You see this frame when viewing either a Raid Reset event or a Raid Lockout event. -->
	<Frame name="CalendarViewRaidFrame" toplevel="true" parent="CalendarFrame" enableMouse="true" frameStrata="HIGH" hidden="true">
		<Size x="320" y="150"/>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
				<Offset x="0" y="-24"/>
			</Anchor>
		</Anchors>
		<Backdrop edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="CalendarViewRaidBackground">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="4" y="-4"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="4"/>
						</Anchor>
					</Anchors>
					<Color r="0.0" g="0.0" b="0.0" a="0.8"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarViewRaidTitleFrame" inherits="CalendarTitleFrameTemplate">
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 6);
					</OnLoad>
				</Scripts>
			</Frame>
			<ScrollFrame name="CalendarViewRaidScrollFrame" inherits="UIPanelScrollFrameTemplate">
				<Size x="270" y="108"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="15" y="-30"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.scrollBarHideable = 1;
						ScrollFrame_OnLoad(self);
						ScrollFrame_OnScrollRangeChanged(self);
					</OnLoad>
				</Scripts>
				<ScrollChild>
					<Frame name="CalendarViewRaidScrollChild">
						<Size x="270" y="10"/>
						<Anchors>
							<Anchor point="TOPLEFT"/>
						</Anchors>
						<Layers>
							<Layer level="BORDER">
								<FontString name="CalendarViewRaidDescription" inherits="GameFontHighlightLeft" nonspacewrap="true" justifyV="TOP">
									<Size x="265" y="0"/>
									<Anchors>
										<Anchor point="TOPLEFT"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</Frame>
				</ScrollChild>
			</ScrollFrame>
			<Button name="CalendarViewRaidCloseButton" inherits="CalendarEventCloseButtonTemplate"/>

			<Frame name="$parentModalOverlay" inherits="CalendarModalEventOverlayTemplate" hidden="true"/>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarViewRaidFrame_OnLoad(self);
			</OnLoad>
			<OnShow>
				CalendarViewRaidFrame_OnShow(self);
			</OnShow>
			<OnHide>
				CalendarViewRaidFrame_OnHide(self);
			</OnHide>
		</Scripts>
	</Frame>

	<!-- View Event -->
	<!-- This is the frame you get when you are viewing an event you were invited to. You only see this frame if
		 you are not a moderator. If you are, you should see the Edit Event frame. -->
	<Frame name="CalendarViewEventFrame" toplevel="true" parent="CalendarFrame" enableMouse="true" frameStrata="HIGH" hidden="true">
		<Size x="320" y="500"/>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
				<Offset x="0" y="-24"/>
			</Anchor>
		</Anchors>
		<Backdrop edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="CalendarViewEventBackground">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="4" y="-4"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="4"/>
						</Anchor>
					</Anchors>
					<Color r="0.0" g="0.0" b="0.0" a="0.8"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="CalendarViewEventIcon">
					<Size x="60" y="60"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="16" y="-26"/>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND">
				<FontString name="CalendarViewEventTitle" inherits="GameFontNormal" justifyH="LEFT">
					<Size x="220" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarViewEventIcon" relativePoint="TOPRIGHT">
							<Offset x="2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarViewEventTypeName" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size x="220" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarViewEventTitle" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarViewEventCreatorName" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size x="220" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarViewEventTypeName" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarViewEventDateLabel" inherits="GameFontHighlightSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarViewEventCreatorName" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarViewEventTimeLabel" inherits="GameFontHighlightSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarViewEventDateLabel" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarViewEventTitleFrame" inherits="CalendarTitleFrameTemplate">
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 6);
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="CalendarViewEventDescriptionContainer">
				<Size x="287" y="65"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="16" y="-95"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="8"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="8"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="1" right="1" top="1" bottom="1"/>
					</BackgroundInsets>
				</Backdrop>
				<Frames>
					<ScrollFrame name="CalendarViewEventDescriptionScrollFrame" inherits="CalendarEventDescriptionScrollFrame">
						<Scripts>
							<OnLoad>
								CalendarViewEventDescriptionScrollFrame_OnLoad(self);
							</OnLoad>
						</Scripts>
						<ScrollChild>
							<Frame name="CalendarViewEventDescriptionScrollChild">
								<Size x="263" y="1"/>
								<Anchors>
									<Anchor point="TOPLEFT"/>
								</Anchors>
								<Layers>
									<Layer level="BACKGROUND">
										<FontString name="CalendarViewEventDescription" inherits="GameFontNormalSmallLeft" nonspacewrap="true" justifyV="TOP">
											<Size x="263" y="0"/>
											<Anchors>
												<Anchor point="TOPLEFT"/>
											</Anchors>
										</FontString>
									</Layer>
								</Layers>
							</Frame>
						</ScrollChild>
					</ScrollFrame>
				</Frames>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b);
						self:SetBackdropColor(0.0, 0.0, 0.0, 0.9);
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="CalendarViewEventInviteListSection">
				<Size x="320" y="320"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="0" y="-170"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BORDER">
						<Texture name="CalendarViewEventDivider" file="Interface\DialogFrame\UI-DialogBox-Divider">
							<Size x="303" y="16"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="10" y="-30"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.0" right="0.75390625" top="0.0" bottom="0.5"/>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Button name="CalendarViewEventAcceptButton" inherits="CalendarEventButtonTemplate" text="ACCEPT">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset x="14" y="0"/>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="CalendarViewEventAcceptButtonFlashTexture" alphaMode="ADD" file="Interface\Buttons\UI-Panel-Button-Glow">
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset x="-7" y="7"/>
										</Anchor>
										<Anchor point="BOTTOMRIGHT">
											<Offset x="7" y="-7"/>
										</Anchor>
									</Anchors>
									<TexCoords left="0.0" right="0.75" top="0.0" bottom="0.609375"/>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_LEFT");
								GameTooltip:SetText(CALENDAR_TOOLTIP_AVAILABLEBUTTON, nil, nil, nil, nil, 1);
								GameTooltip:Show();
								--GameTooltip_AddNewbieTip(self, nil, 1.0, 1.0, 1.0, CALENDAR_TOOLTIP_AVAILABLEBUTTON, 1);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
							<OnUpdate>
								CalendarViewEventAcceptButton_OnUpdate(self);
							</OnUpdate>
							<OnClick>
								CalendarViewEventAcceptButton_OnClick(self);
							</OnClick>
						</Scripts>
					</Button>
					<Button name="CalendarViewEventDeclineButton" inherits="CalendarEventButtonTemplate" text="DECLINE">
						<Anchors>
							<Anchor point="TOP">
								<Offset x="0" y="0"/>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="CalendarViewEventDeclineButtonFlashTexture" alphaMode="ADD" file="Interface\Buttons\UI-Panel-Button-Glow">
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset x="-7" y="7"/>
										</Anchor>
										<Anchor point="BOTTOMRIGHT">
											<Offset x="7" y="-7"/>
										</Anchor>
									</Anchors>
									<TexCoords left="0.0" right="0.75" top="0.0" bottom="0.609375"/>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_LEFT");
								GameTooltip:SetText(CALENDAR_TOOLTIP_DECLINEBUTTON, nil, nil, nil, nil, 1);
								GameTooltip:Show();
								--GameTooltip_AddNewbieTip(self, nil, 1.0, 1.0, 1.0, CALENDAR_TOOLTIP_DECLINEBUTTON, 1);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
							<OnUpdate>
								CalendarViewEventDeclineButton_OnUpdate(self);
							</OnUpdate>
							<OnClick>
								CalendarViewEventDeclineButton_OnClick(self);
							</OnClick>
						</Scripts>
					</Button>
					<Button name="CalendarViewEventRemoveButton" inherits="CalendarEventButtonTemplate" text="CALENDAR_VIEW_EVENT_REMOVE">
						<Anchors>
							<Anchor point="TOPRIGHT">
								<Offset x="-14" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_LEFT");
								GameTooltip:SetText(CALENDAR_TOOLTIP_REMOVEBUTTON, nil, nil, nil, nil, 1);
								GameTooltip:Show();
								--GameTooltip_AddNewbieTip(self, nil, 1.0, 1.0, 1.0, CALENDAR_TOOLTIP_REMOVEBUTTON, 1);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
							<OnClick>
								CalendarViewEventRemoveButton_OnClick(self);
							</OnClick>
						</Scripts>
					</Button>
					<Frame name="CalendarViewEventInviteList" inherits="CalendarEventInviteListTemplate">
						<Anchors>
							<Anchor point="TOP">
								<Offset x="0" y="-60"/>
							</Anchor>
						</Anchors>
					</Frame>
				</Frames>
			</Frame>
			<Button name="CalendarViewEventCloseButton" inherits="CalendarEventCloseButtonTemplate"/>

			<Frame name="$parentModalOverlay" inherits="CalendarModalEventOverlayTemplate" hidden="true"/>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarViewEventFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				CalendarViewEventFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				CalendarViewEventFrame_OnShow(self);
			</OnShow>
			<OnHide>
				CalendarViewEventFrame_OnHide(self);
			</OnHide>
			<OnUpdate>
				CalendarViewEventFrame_OnUpdate(self, elapsed);
			</OnUpdate>
		</Scripts>
	</Frame>

	<!-- Create Event and Edit Event -->
	<!-- This module is actually both the create and edit event frame. You should see this when you are either creating
		 an event for the first time or you are editing an existing event. I didn't want to call it the CreateOrEditEventFrame.
		 I know it's a little unclear. I thought CreateOrEditEventFrame sounded kind of silly.
	-->
	<Frame name="CalendarCreateEventFrame" toplevel="true" parent="CalendarFrame" enableMouse="true" frameStrata="HIGH" hidden="true">
		<Size x="320" y="580"/>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
				<Offset x="0" y="-24"/>
			</Anchor>
		</Anchors>
		<Backdrop edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="CalendarCreateEventBackground">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="4" y="-4"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="4"/>
						</Anchor>
					</Anchors>
					<Color r="0.0" g="0.0" b="0.0" a="0.8"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="CalendarCreateEventIcon">
					<Size x="50" y="50"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="16" y="-26"/>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND">
				<FontString name="CalendarCreateEventDateLabel" inherits="GameFontHighlightSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarCreateEventIcon" relativePoint="TOPRIGHT">
							<Offset x="2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarCreateEventTextureName" inherits="GameFontNormalSmall" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarCreateEventDateLabel" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarCreateEventCreatorName" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size x="220" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="CalendarCreateEventTextureName" relativePoint="BOTTOMLEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentButtonBackground" file="Interface\Buttons\UI-Button-Borders">
					<Size x="256" y="26"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT">
							<Offset x="11" y="9"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-11" y="9"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.59375" bottom="1.0"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarCreateEventTitleFrame" inherits="CalendarTitleFrameTemplate">
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 6);
					</OnLoad>
				</Scripts>
			</Frame>
			<EditBox name="CalendarCreateEventTitleEdit" letters="31" inherits="InputBoxTemplate" autoFocus="false">
				<Size x="120" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="25" y="-84"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnTextChanged>
						CalendarCreateEventTitleEdit_OnTextChanged(self);
					</OnTextChanged>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnEscapePressed>
						self:ClearFocus();
					</OnEscapePressed>
					<OnEditFocusLost>
						CalendarCreateEventTitleEdit_OnEditFocusLost(self);
					</OnEditFocusLost>
					<OnEditFocusGained>
						self:HighlightText();
					</OnEditFocusGained>
				</Scripts>
			</EditBox>
			<Frame name="CalendarCreateEventTypeDropDown" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="160" y="-82"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CalendarCreateEventHourDropDown" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="2" y="-114"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CalendarCreateEventMinuteDropDown" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="CalendarCreateEventHourDropDown" relativePoint="RIGHT">
						<Offset x="-22" y="0"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CalendarCreateEventAMPMDropDown" inherits="UIDropDownMenuTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="CalendarCreateEventMinuteDropDown" relativePoint="RIGHT">
						<Offset x="-22" y="0"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CalendarCreateEventRepeatOptionDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="180" y="-114"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="CalendarCreateEventDescriptionContainer">
				<Size x="287" y="65"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="16" y="-146"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="8"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="8"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="1" right="1" top="1" bottom="1"/>
					</BackgroundInsets>
				</Backdrop>
				<Frames>
					<ScrollFrame name="CalendarCreateEventDescriptionScrollFrame" inherits="CalendarEventDescriptionScrollFrame">
						<Frames>
							<Button name="$parentFocusButton" setAllPoints="true">
								<Scripts>
									<OnClick>
										CalendarCreateEventDescriptionEdit:SetFocus();
									</OnClick>
								</Scripts>
							</Button>
						</Frames>
						<Scripts>
							<OnLoad>
								CalendarCreateEventDescriptionScrollFrame_OnLoad(self);
							</OnLoad>
						</Scripts>
						<ScrollChild>
							<EditBox name="CalendarCreateEventDescriptionEdit" multiLine="true" letters="255" autoFocus="false">
								<Anchors>
									<Anchor point="TOPLEFT"/>
								</Anchors>
								<Size x="263" y="1"/>
								<Scripts>
									<OnTextChanged>
										ScrollingEdit_OnTextChanged(self, self:GetParent());
										CalendarEventSetDescription(self:GetText());
										CalendarCreateEventCreateButton_Update();
									</OnTextChanged>
									<OnCursorChanged>
										ScrollingEdit_OnCursorChanged(self, x, y, w, h);
									</OnCursorChanged>
									<OnUpdate>
										ScrollingEdit_OnUpdate(self, elapsed, self:GetParent());
									</OnUpdate>
									<OnEscapePressed>
										self:ClearFocus();
									</OnEscapePressed>
									<OnEditFocusGained>
										if self:GetText() == CALENDAR_EVENT_DESCRIPTION then
											self:HighlightText();
										end
									</OnEditFocusGained>
									<OnEditFocusLost>
										self:HighlightText(0, 0);
										if self:GetText() == "" then
											self:SetText(CALENDAR_EVENT_DESCRIPTION);
										end
									</OnEditFocusLost>
								</Scripts>
								<FontString inherits="GameFontHighlightSmall"/>
							</EditBox>
						</ScrollChild>
					</ScrollFrame>
				</Frames>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b);
						self:SetBackdropColor(0.0, 0.0, 0.0, 0.9);
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="CalendarCreateEventInviteListSection">
				<Size x="320" y="330"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="0" y="-210"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BORDER">
						<Texture name="CalendarCreateEventDivider" file="Interface\DialogFrame\UI-DialogBox-Divider">
							<Size x="303" y="16"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="10" y="-20"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.0" right="0.75390625" top="0.0" bottom="0.5"/>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<CheckButton name="CalendarCreateEventAutoApproveCheck" inherits="UICheckButtonTemplate" hidden="true">
						<Size x="24" y="24"/>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset x="20" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								CalendarCreateEventAutoApproveCheck_OnLoad(self);
							</OnLoad>
							<OnClick>
								CalendarCreateEventAutoApproveCheck_OnClick(self);
							</OnClick>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_LEFT");
								GameTooltip:SetText(CALENDAR_TOOLTIP_AUTOAPPROVE, nil, nil, nil, nil, 1);
								GameTooltip:Show();
								--GameTooltip_AddNewbieTip(self, nil, 1.0, 1.0, 1.0, CALENDAR_TOOLTIP_AUTOAPPROVE, 1);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</CheckButton>
					<CheckButton name="CalendarCreateEventLockEventCheck" inherits="UICheckButtonTemplate">
						<Size x="24" y="24"/>
						<Anchors>
							<Anchor point="TOPRIGHT">
								<Offset x="-95" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								CalendarCreateEventLockEventCheck_OnLoad(self);
							</OnLoad>
							<OnClick>
								CalendarCreateEventLockEventCheck_OnClick(self);
							</OnClick>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_LEFT");
								GameTooltip:SetText(CALENDAR_TOOLTIP_LOCKEVENT, nil, nil, nil, nil, 1);
								GameTooltip:Show();
								--GameTooltip_AddNewbieTip(self, nil, 1.0, 1.0, 1.0, CALENDAR_TOOLTIP_LOCKEVENT, 1);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</CheckButton>
					<Frame name="CalendarCreateEventInviteList" inherits="CalendarEventInviteListTemplate">
						<Anchors>
							<Anchor point="TOP">
								<Offset x="0" y="-50"/>
							</Anchor>
						</Anchors>
					</Frame>
					<EditBox name="CalendarCreateEventInviteEdit" letters="32" inherits="InputBoxTemplate" autoFocus="false">
						<Size x="192" y="20"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="CalendarCreateEventInviteList" relativePoint="BOTTOMLEFT">
								<Offset x="6" y="-3"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetText(CALENDAR_PLAYER_NAME);
							</OnLoad>
							<OnEnterPressed>
								CalendarCreateEventInviteEdit_OnEnterPressed(self);
							</OnEnterPressed>
							<OnEscapePressed>
								self:ClearFocus();
							</OnEscapePressed>
							<OnEditFocusLost>
								CalendarCreateEventInviteEdit_OnEditFocusLost(self);
							</OnEditFocusLost>
							<OnEditFocusGained>
								self:HighlightText();
							</OnEditFocusGained>
							<OnCharComposition>
								PlayerNameAutocomplete(self);
							</OnCharComposition>
							<OnChar>
								if not self:IsInIMECompositionMode() then
									PlayerNameAutocomplete(self);
								end
							</OnChar>
						</Scripts>
					</EditBox>
					<Button name="CalendarCreateEventInviteButton" inherits="UIPanelButtonTemplate2" text="INVITE">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="CalendarCreateEventInviteEdit" relativePoint="TOPRIGHT">
								<Offset x="0" y="1"/>
							</Anchor>
							<Anchor point="TOPRIGHT" relativeTo="CalendarCreateEventInviteList" relativePoint="BOTTOMRIGHT">
								<Offset x="0" y="1"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								CalendarCreateEventInviteButton_OnClick(self);
							</OnClick>
							<OnUpdate>
								CalendarCreateEventInviteButton_OnUpdate(self);
							</OnUpdate>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Button name="CalendarCreateEventMassInviteButton" inherits="UIPanelButtonTemplate2" text="CALENDAR_MASS_INVITE">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset x="12" y="12"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBorder" file="Interface\Buttons\UI-Button-Borders">
							<Size x="106" y="26"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-1" y="1"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="10" y="-3"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.0" right="0.4140625" top="0.0" bottom="0.40625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetWidth(self:GetTextWidth() + 40);
					</OnLoad>
					<OnClick>
						CalendarCreateEventMassInviteButton_OnClick();
					</OnClick>
					<OnUpdate>
						CalendarCreateEventMassInviteButton_OnUpdate(self);
					</OnUpdate>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_LEFT");
						GameTooltip:SetText(CALENDAR_TOOLTIP_MASSINVITE, nil, nil, nil, nil, 1);
						GameTooltip:Show();
						--GameTooltip_AddNewbieTip(self, nil, 1.0, 1.0, 1.0, CALENDAR_TOOLTIP_MASSINVITE, 1);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="CalendarCreateEventRaidInviteButton" inherits="UIPanelButtonTemplate2" text="CALENDAR_INVITE_MEMBERS">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset x="12" y="12"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBorder" file="Interface\Buttons\UI-Button-Borders">
							<Size x="106" y="26"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-1" y="1"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="10" y="-3"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.0" right="0.4140625" top="0.0" bottom="0.40625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						CalendarCreateEventRaidInviteButton_OnLoad(self);
					</OnLoad>
					<OnEvent>
						CalendarCreateEventRaidInviteButton_OnEvent(self, event, ...);
					</OnEvent>
					<OnClick>
						CalendarCreateEventRaidInviteButton_OnClick(self);
					</OnClick>
					<OnEnter>
						CalendarCreateEventRaidInviteButton_OnEnter(self);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="CalendarCreateEventCreateButton" inherits="CalendarEventButtonTemplate">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-11" y="12"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBorder" file="Interface\Buttons\UI-Button-Borders">
							<Size x="106" y="26"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-10" y="1"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="1" y="-3"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.58203125" right="1.0" top="0.0" bottom="0.40625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CalendarCreateEventCreateButton_OnClick(self);
					</OnClick>
					<OnUpdate>
						CalendarCreateEventCreateButton_OnUpdate(self);
					</OnUpdate>
				</Scripts>
			</Button>
			<Button name="CalendarCreateEventCloseButton" inherits="CalendarEventCloseButtonTemplate"/>

			<Frame name="$parentModalOverlay" inherits="CalendarModalEventOverlayTemplate" hidden="true"/>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarCreateEventFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				CalendarCreateEventFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				CalendarCreateEventFrame_OnShow(self);
			</OnShow>
			<OnHide>
				CalendarCreateEventFrame_OnHide(self);
			</OnHide>
		</Scripts>
	</Frame>

	<!-- Mass Invite -->
	<!-- This module lets you auto-invite more than one player at a time based on a filter. -->
	<Frame name="CalendarMassInviteFrame" parent="CalendarFrame" inherits="CalendarModalDialogTemplate" hidden="true">
		<Size x="320" y="250"/>
		<Anchors>
			<Anchor point="BOTTOMRIGHT" relativeTo="CalendarCreateEventMassInviteButton" relativePoint="TOPLEFT"/>
		</Anchors>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="BORDER">
				<Texture name="$parentDivider" file="Interface\DialogFrame\UI-DialogBox-Divider">
					<Size x="303" y="16"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="10" y="-140"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="0.75390625" top="0.0" bottom="0.5"/>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND">
				<FontString inherits="GameFontHighlightSmall" text="CALENDAR_MASSINVITE_GUILD_HELP" justifyH="CENTER">
					<Size x="280" y="0"/>
					<Anchors>
						<Anchor point="TOP">
							<Offset x="0" y="-26"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarMassInviteGuildLevelText" inherits="GameFontNormalSmall" text="LEVEL">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="46" y="-53"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentLevelDivider" inherits="GameFontNormalSmall" text="-">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="80" y="-79"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="CalendarMassInviteGuildRankText" inherits="GameFontNormalSmall" text="CALENDAR_MASSINVITE_GUILD_MINRANK">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="170" y="-53"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString inherits="GameFontHighlightSmall" text="CALENDAR_MASSINVITE_ARENA_HELP" justifyH="CENTER">
					<Size x="280" y="0"/>
					<Anchors>
						<Anchor point="TOP">
							<Offset x="0" y="-160"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarMassInviteTitleFrame" inherits="CalendarTitleFrameTemplate">
				<Scripts>
					<OnLoad>
						CalendarTitleFrame_SetText(self, CALENDAR_MASS_INVITE);
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 6);
					</OnLoad>
				</Scripts>
			</Frame>
			<EditBox name="CalendarMassInviteGuildMinLevelEdit" numeric="true" inherits="InputBoxTemplate" autoFocus="false">
				<Size x="25" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="50" y="-77"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnEscapePressed>
						self:ClearFocus();
					</OnEscapePressed>
					<OnEditFocusGained>
						if not CanEditGuildEvent() then
							self:ClearFocus();
						end
					</OnEditFocusGained>
				</Scripts>
			</EditBox>
			<EditBox name="CalendarMassInviteGuildMaxLevelEdit" numeric="true" inherits="InputBoxTemplate" autoFocus="false">
				<Size x="25" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="97" y="-77"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnEscapePressed>
						self:ClearFocus();
					</OnEscapePressed>
					<OnEditFocusGained>
						if not CanEditGuildEvent() then
							self:ClearFocus();
						end
					</OnEditFocusGained>
				</Scripts>
			</EditBox>
			<Frame name="CalendarMassInviteGuildRankMenu" inherits="UIDropDownMenuTemplate" clampedToScreen="true">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="149" y="-73"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Button name="CalendarMassInviteGuildAcceptButton" inherits="CalendarEventButtonTemplate" text="ACCEPT">
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="-14" y="-115"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CalendarMassInviteGuildAcceptButton_OnClick(self);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="CalendarMassInviteArenaButton2" inherits="CalendarMassInviteArenaButtonTemplate" id="1">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="14" y="-190"/>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="CalendarMassInviteArenaButton3" inherits="CalendarMassInviteArenaButtonTemplate" id="2">
				<Anchors>
					<Anchor point="TOP">
						<Offset x="0" y="-190"/>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="CalendarMassInviteArenaButton5" inherits="CalendarMassInviteArenaButtonTemplate" id="3">
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="-14" y="-190"/>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="CalendarMassInviteCloseButton" inherits="CalendarCloseButtonTemplate">
				<Scripts>
					<OnClick>
						CalendarMassInviteFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>

			<Frame name="$parentModalOverlay" inherits="CalendarModalEventOverlayTemplate" hidden="true"/>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarMassInviteFrame_OnLoad(self);
			</OnLoad>
			<OnShow>
				CalendarMassInviteFrame_OnShow(self);
			</OnShow>
			<OnEvent>
				CalendarMassInviteFrame_OnEvent(self, event, ...);
			</OnEvent>
		</Scripts>
	</Frame>

	<!-- Event Picker -->
	<!-- This module should be used when a day has too many events to fit on the monthly display. It puts all of
		 a day's events into a list.
	-->
	<Frame name="CalendarEventPickerFrame" inherits="CalendarModalDialogTemplate" parent="CalendarFrame" clampedToScreen="true" hidden="true">
		<Size x="290" y="226"/>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentButtonBackground" file="Interface\Buttons\UI-Button-Borders">
					<Size x="256" y="26"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT">
							<Offset x="11" y="9"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-11" y="9"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.59375" bottom="1.0"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarEventPickerTitleFrame" inherits="CalendarTitleFrameTemplate">
				<Scripts>
					<OnLoad>
						CalendarTitleFrame_SetText(self, CALENDAR_EVENT_PICKER_TITLE);
					</OnLoad>
				</Scripts>
			</Frame>
			<ScrollFrame name="CalendarEventPickerScrollFrame" inherits="HybridScrollFrameTemplate">
				<Size x="239" y="165"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="20" y="-26"/>
					</Anchor>
				</Anchors>
				<Frames>
					<Slider name="CalendarEventPickerScrollBar" inherits="HybridScrollBarTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT"/>
						</Anchors>
					</Slider>
				</Frames>
				<Scripts>
					<OnLoad>
						CalendarEventPickerScrollFrame_OnLoad(self);
					</OnLoad>
				</Scripts>
			</ScrollFrame>
			<Button name="CalendarEventPickerCloseButton" inherits="CalendarEventButtonTemplate" text="CLOSE">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-11" y="12"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBorder" file="Interface\Buttons\UI-Button-Borders">
							<Size x="106" y="26"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-10" y="1"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="1" y="-3"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.58203125" right="1.0" top="0.0" bottom="0.40625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CalendarEventPickerCloseButton_OnClick();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarEventPickerFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				CalendarEventPickerFrame_OnEvent(self, event, ...);
			</OnEvent>
		</Scripts>
	</Frame>

	<!-- Texture Picker -->
	<!-- This module is a selector for event types that have selectable textures. -->
	<Frame name="CalendarTexturePickerFrame" inherits="CalendarModalDialogTemplate" parent="CalendarFrame" hidden="true">
		<Size x="290" y="286"/>
		<Anchors>
			<Anchor point="TOPRIGHT">
				<Offset x="0" y="-24"/>
			</Anchor>
		</Anchors>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentButtonBackground" file="Interface\Buttons\UI-Button-Borders">
					<Size x="256" y="26"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT">
							<Offset x="11" y="9"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-11" y="9"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="0.59375" bottom="1.0"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="CalendarTexturePickerTitleFrame" inherits="CalendarTitleFrameTemplate"/>
			<ScrollFrame name="CalendarTexturePickerScrollFrame" inherits="HybridScrollFrameTemplate">
				<Size x="239" y="225"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="20" y="-26"/>
					</Anchor>
				</Anchors>
				<Frames>
					<Slider name="CalendarTexturePickerScrollBar" inherits="HybridScrollBarTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
								<Offset x="0" y="0"/>
							</Anchor>
						</Anchors>
					</Slider>
				</Frames>
				<Scripts>
					<OnLoad>
						CalendarTexturePickerScrollFrame_OnLoad(self);
					</OnLoad>
				</Scripts>
			</ScrollFrame>
			<Button name="CalendarTexturePickerCancelButton" inherits="CalendarEventButtonTemplate" text="CANCEL">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-11" y="12"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBorder" file="Interface\Buttons\UI-Button-Borders">
							<Size x="106" y="26"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-10" y="1"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="1" y="-3"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.58203125" right="1.0" top="0.0" bottom="0.40625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CalendarTexturePickerFrame_Hide();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="CalendarTexturePickerAcceptButton" inherits="CalendarEventButtonTemplate" text="ACCEPT">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="CalendarTexturePickerCancelButton" relativePoint="LEFT">
						<Offset x="-3" y="0"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBorder" file="Interface\Buttons\UI-Button-Borders">
							<Size x="106" y="26"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="-10" y="1"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="1" y="-3"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.58203125" right="1.0" top="0.0" bottom="0.40625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CalendarTexturePickerAcceptButton_OnClick(self);
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarTexturePickerFrame_OnLoad(self);
			</OnLoad>
		</Scripts>
	</Frame>

	<!-- Class Buttons -->
	<!-- This module is meant to keep track of class totals in an invite list.
		 The module stores buttons rather than frames to take advantage of the Enable and Disable
		 functions that you can call on buttons. Enabling and Disabling the buttons provides an
		 easy way to block OnEnter and OnLeave scripts. If memory becomes a problem, the buttons
		 can be converted to frames as long as bookkeeping is done to block the enable and disable
		 scripts at the appropriate times (e.g. when a modal dialog is up).
	-->
	<Frame name="CalendarClassButtonContainer" parent="CalendarFrame" hidden="true">
		<Size x="18" y="270"/>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT"/>
		</Anchors>
		<Frames>
			<Button name="CalendarClassTotalsButton">
				<Size x="20" y="10"/>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBackgroundMiddle" file="Interface\SpellBook\SpellBook-SkillLineTab">
							<Size x="26" y="8"/>
							<Anchors>
								<Anchor point="LEFT">
									<Offset x="-2" y="0"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.0" right="0.625" top="0.21875" bottom="0.640625"/>
						</Texture>
						<Texture name="$parentBackgroundTop" file="Interface\SpellBook\SpellBook-SkillLineTab">
							<Size x="26" y="11"/>
							<Anchors>
								<Anchor point="BOTTOM" relativeTo="$parentBackgroundMiddle" relativePoint="TOP"/>
							</Anchors>
							<TexCoords left="0.0" right="0.625" top="0.0" bottom="0.21875"/>
						</Texture>
						<Texture name="$parentBackgroundBottom" file="Interface\SpellBook\SpellBook-SkillLineTab">
							<Size x="26" y="15"/>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentBackgroundMiddle" relativePoint="BOTTOM"/>
							</Anchors>
							<TexCoords left="0.0" right="0.625" top="0.640625" bottom="0.875"/>
						</Texture>
					</Layer>
					<Layer level="BORDER">
						<FontString name="CalendarClassTotalsText" inherits="GameFontGreenSmall" text="0">
							<Anchors>
								<Anchor point="CENTER"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
<!--
				<Frames>
					<Frame name="CalendarClassTotalsButtonOnEnterDummy" enableMouse="true" setAllPoints="true">
						<Scripts>
							<OnEnter>
								CalendarClassTotalsButtonOnEnterDummy_OnEnter(self);
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
				</Frames>
-->
				<Scripts>
<!--
					<OnLoad>
						CalendarClassTotalsButton_OnLoad(self);
					</OnLoad>
					<OnEvent>
						CalendarClassTotalsButton_OnEvent(self, event, ...);
					</OnEvent>
					<OnClick>
						CalendarClassTotalsButton_OnClick(self);
					</OnClick>
-->
					<OnEnter>
						CalendarClassTotalsButton_OnEnter(self);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
<!--
				<ButtonText text="0">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</ButtonText>
				<NormalFont style="GameFontGreenSmall"/>
				<HighlightFont style="GameFontHighlightSmall"/>
				<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
-->
			</Button>
<!--
			<Frame name="CalendarInviteToGroupDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
				<Anchors>
					<Anchor point="RIGHT" relativePoint="LEFT"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						CalendarInviteToGroupDropDown_OnLoad(self);
					</OnLoad>
				</Scripts>
			</Frame>
-->
		</Frames>
		<Scripts>
			<OnLoad>
				CalendarClassButtonContainer_OnLoad(self);
			</OnLoad>
		</Scripts>
	</Frame>
</Ui>

