<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="CustomChat.lua"/>

	<Frame name="ccMenu" toplevel="true" frameStrata="DIALOG" movable="true" enableMouse="true" hidden="true" parent="UIParent">

		<Size>
			<AbsDimension x="350" y="400" />
		</Size>

		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>

		<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<EdgeSize>
				<AbsValue val="20"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>

		<Layers>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_Title" inherits="ChatFontNormal" text="CustomChat Options">
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-7"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_editboxtop" inherits="ChatFontNormal" text="Editbox on top">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="55" y="-68"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_mousewheel" inherits="ChatFontNormal" text="Mousewheel">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="55" y="-88"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_timestamp" inherits="ChatFontNormal" text="Timestamp">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="55" y="-108"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_timestampformat" inherits="ChatFontNormal" text="-Format:">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="20" y="-128"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_chatbuttons" inherits="ChatFontNormal" text="Chatbuttons">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="55" y="-148"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_chatfade" inherits="ChatFontNormal" text="Chatfade">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="55" y="-168"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_chatfadetime" inherits="ChatFontNormal" text="-Time:">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="20" y="-188"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_chatfadetimesec" inherits="ChatFontNormal" text="(Sec)">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="115" y="-188"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_sticky" inherits="ChatFontNormal" text="Sticky Chat:">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-48"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickysay" inherits="ChatFontNormal" text="Say">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-68"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickyyell" inherits="ChatFontNormal" text="Yell">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-88"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickyemote" inherits="ChatFontNormal" text="Emote">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-108"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickyparty" inherits="ChatFontNormal" text="Party">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-128"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickyraid" inherits="ChatFontNormal" text="Raid">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-148"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickyguild" inherits="ChatFontNormal" text="Guild">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-168"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickyofficer" inherits="ChatFontNormal" text="Officer">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-188"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickywhisper" inherits="ChatFontNormal" text="Whisper">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-208"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickychannel" inherits="ChatFontNormal" text="Channels">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-228"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="cc_Text_stickysystem" inherits="ChatFontNormal" text="System">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="215" y="-248"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>

		<Frames>
			<CheckButton name="$parent_editboxtop" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-60"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOption("editboxtop",true);
						else
							cc_SetOption("editboxtop",false);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_mousewheel" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-80"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOption("mousewheel",true);
						else
							cc_SetOption("mousewheel",false);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_timestamp" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-100"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOption("timestamp",true);
						else
							cc_SetOption("timestamp",false);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_chatbuttons" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-140"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOption("chatbuttons",true);
						else
							cc_SetOption("chatbuttons",false);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_chatfade" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="20" y="-160"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOption("chatfade",true);
						else
							cc_SetOption("chatfade",false);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickysay" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-60"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("SAY",1);
						else
							cc_SetOptionSticky("SAY",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickyyell" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-80"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("YELL",1);
						else
							cc_SetOptionSticky("YELL",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickyemote" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-100"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("EMOTE",1);
						else
							cc_SetOptionSticky("EMOTE",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickyparty" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-120"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("PARTY",1);
						else
							cc_SetOptionSticky("PARTY",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickyraid" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-140"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("RAID",1);
						else
							cc_SetOptionSticky("RAID",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickyguild" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-160"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("GUILD",1);
						else
							cc_SetOptionSticky("GUILD",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickyofficer" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-180"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("OFFICER",1);
						else
							cc_SetOptionSticky("OFFICER",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickywhisper" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-200"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("WHISPER",1);
						else
							cc_SetOptionSticky("WHISPER",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickychannel" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-220"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("CHANNEL",1);
						else
							cc_SetOptionSticky("CHANNEL",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parent_stickysystem" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="20" y="-240"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							cc_SetOptionSticky("SYSTEM",1);
						else
							cc_SetOptionSticky("SYSTEM",0);
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<EditBox name="$parent_timestampformat" autofocus="false" multiline="false" ignorearrows="true" toplevel="true" historylines="0" letters="20" hidden="false" virtual="true">
				<Size>
					<AbsDimension x="110" y="25"></AbsDimension>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="75" y="-123"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="25"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT">
									<Offset>
										<AbsDimension x="-5" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="25"/>
							</Size>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset>
										<AbsDimension x="-10" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="10" y="25"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
								<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
							</Anchors>
							<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnTextChanged>
						cc_SetOption("timestampformat",this:GetText());
					</OnTextChanged>
				</Scripts>
				<FontString inherits="ChatFontNormal"></FontString>
			</EditBox>
			<EditBox name="$parent_chatfadetime" autofocus="false" multiline="false" ignorearrows="true" toplevel="true" historylines="0" letters="5" hidden="false" virtual="true">
				<Size>
					<AbsDimension x="60" y="25"></AbsDimension>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="63" y="-183"></AbsDimension>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentLeft" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="25"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT">
									<Offset>
										<AbsDimension x="-5" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0" right="0.0625" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentRight" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="8" y="25"/>
							</Size>
							<Anchors>
								<Anchor point="RIGHT">
									<Offset>
										<AbsDimension x="-10" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<TexCoords left="0.9375" right="1.0" top="0" bottom="0.625"/>
						</Texture>
						<Texture name="$parentMiddle" file="Interface\Common\Common-Input-Border">
							<Size>
								<AbsDimension x="10" y="25"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
								<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"/>
							</Anchors>
							<TexCoords left="0.0625" right="0.9375" top="0" bottom="0.625"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnTextChanged>
						cc_SetOption("chatfadetime",this:GetText());
					</OnTextChanged>
				</Scripts>
				<FontString inherits="ChatFontNormal"></FontString>
			</EditBox>
			<Button name="cc_XButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset>
							<AbsDimension x="-3" y="-3" />
						</Offset>
					</Anchor>
				</Anchors>

				<Scripts>
					<OnClick>
						cc_ToggleMenu();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="cc_ApplyButton" inherits="OptionsButtonTemplate" text="Apply">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-107" y="7"/>
						</Offset>
					</Anchor>
				</Anchors>

				<Scripts>
					<OnClick>
						cc_Update();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="cc_CloseButton" inherits="OptionsButtonTemplate" text="Close">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-7" y="7"/>
						</Offset>
					</Anchor>
				</Anchors>

				<Scripts>
					<OnClick>
						cc_ToggleMenu();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				this:RegisterEvent("VARIABLES_LOADED");
			</OnLoad>
			<OnEvent>
				if (event == "VARIABLES_LOADED") then
					cc_CheckSavedVars();
					cc_Update();
				end
			</OnEvent>
		</Scripts>
	</Frame>

</Ui>
