<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="ISync_Filters.lua"/>
	
	<Frame name="ISync_FiltersFrame" inherits="ISyncFrame_MainTemplate" hidden="true" parent="ISync_MainFrame">
			<Size>
				<AbsDimension x="360" y="495"/>
			</Size>
			<Anchors>
				<Anchor point="TOPLEFT" relativeTo="ISync_MainFrame" relativePoint="TOPRIGHT">
					<Offset>
						<AbsDimension x="32" y="0"/>
					</Offset>
				</Anchor>
			</Anchors>
			<Frames>
				<Frame name="ISync_Filters_FilterRarityColor" inherits="OptionFrameBoxTemplate">
					<Size>
						<AbsDimension x="335" y="135"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="ISync_FiltersFrame" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="13" y="465"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Layers>
						<Layer level="BACKGROUND">
							<FontString inherits="GameFontNormal" text="ISYNC_FILTER_SELECT1">
								<Anchors>
									<Anchor point="TOPLEFT"> 
										<Offset>
											<AbsDimension x="30" y="-10"/>
										</Offset>
									</Anchor>
								</Anchors>
							</FontString>
							<FontString inherits="GameFontNormal" text="ISYNC_FILTER_SELECT2">
								<Anchors>
									<Anchor point="TOPLEFT"> 
										<Offset>
											<AbsDimension x="30" y="-30"/>
										</Offset>
									</Anchor>
								</Anchors>
							</FontString>
							<FontString inherits="GameFontNormal" text="ISYNC_FILTER_SELECT3">
								<Anchors>
									<Anchor point="TOPLEFT"> 
										<Offset>
											<AbsDimension x="30" y="-50"/>
										</Offset>
									</Anchor>
								</Anchors>
							</FontString>
							<FontString inherits="GameFontNormal" text="ISYNC_FILTER_SELECT4">
								<Anchors>
									<Anchor point="TOPLEFT"> 
										<Offset>
											<AbsDimension x="30" y="-70"/>
										</Offset>
									</Anchor>
								</Anchors>
							</FontString>

							<FontString inherits="GameFontNormal" text="ISYNC_FILTER_SELECT5">
								<Anchors>
									<Anchor point="TOPLEFT"> 
										<Offset>
											<AbsDimension x="30" y="-90"/>
										</Offset>
									</Anchor>
								</Anchors>
							</FontString>
							<FontString inherits="GameFontNormal" text="ISYNC_FILTER_SELECT6">
								<Anchors>
									<Anchor point="TOPLEFT"> 
										<Offset>
											<AbsDimension x="30" y="-110"/>
										</Offset>
									</Anchor>
								</Anchors>
							</FontString>
						</Layer>
					</Layers>

					<Frames>
						<CheckButton name="ISync_Filters_RarityLayoutCheckButton1" inherits="OptionsCheckButtonTemplate">
							<Size>
								<AbsDimension x="26" y="26"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="5" y="-5"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									if (this:GetChecked()) then
									    PlaySound("igMainMenuOptionCheckBoxOn");
									    ISync:SetVar({"FILTERS",0}, 1, "TRUE");
									else
									    PlaySound("igMainMenuOptionCheckBoxOff");
									    ISync:SetVar({"FILTERS",0}, 0, "TRUE");
									end
								</OnClick>
							</Scripts>
						</CheckButton>
						<CheckButton name="ISync_Filters_RarityLayoutCheckButton2" inherits="OptionsCheckButtonTemplate">
							<Size>
								<AbsDimension x="26" y="26"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="ISync_Filters_RarityLayoutCheckButton1" relativePoint="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="6"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									if (this:GetChecked()) then
									    PlaySound("igMainMenuOptionCheckBoxOn");
									    ISync:SetVar({"FILTERS",1}, 1, "TRUE");
									else
									    PlaySound("igMainMenuOptionCheckBoxOff");
									    ISync:SetVar({"FILTERS",1}, 0, "TRUE");
									end
								</OnClick>
							</Scripts>
						</CheckButton>

						<CheckButton name="ISync_Filters_RarityLayoutCheckButton3" inherits="OptionsCheckButtonTemplate">
							<Size>
								<AbsDimension x="26" y="26"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="ISync_Filters_RarityLayoutCheckButton2" relativePoint="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="6"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									if (this:GetChecked()) then
									    PlaySound("igMainMenuOptionCheckBoxOn");
									    ISync:SetVar({"FILTERS",2}, 1, "TRUE");
									else
									    PlaySound("igMainMenuOptionCheckBoxOff");
									    ISync:SetVar({"FILTERS",2}, 0, "TRUE");
									end
								</OnClick>
							</Scripts>
						</CheckButton>
						<CheckButton name="ISync_Filters_RarityLayoutCheckButton4" inherits="OptionsCheckButtonTemplate">
							<Size>
								<AbsDimension x="26" y="26"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="ISync_Filters_RarityLayoutCheckButton3" relativePoint="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="6"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									if (this:GetChecked()) then
									    PlaySound("igMainMenuOptionCheckBoxOn");
									    ISync:SetVar({"FILTERS",3}, 1, "TRUE");
									else
									    PlaySound("igMainMenuOptionCheckBoxOff");
									    ISync:SetVar({"FILTERS",3}, 0, "TRUE");
									end
								</OnClick>
							</Scripts>
						</CheckButton>
						<CheckButton name="ISync_Filters_RarityLayoutCheckButton5" inherits="OptionsCheckButtonTemplate">
							<Size>
								<AbsDimension x="26" y="26"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="ISync_Filters_RarityLayoutCheckButton4" relativePoint="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="6"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									if (this:GetChecked()) then
									    PlaySound("igMainMenuOptionCheckBoxOn");
									    ISync:SetVar({"FILTERS",4}, 1, "TRUE");
									else
									    PlaySound("igMainMenuOptionCheckBoxOff");
									    ISync:SetVar({"FILTERS",4}, 0, "TRUE");
									end
								</OnClick>
							</Scripts>
						</CheckButton>
						<CheckButton name="ISync_Filters_RarityLayoutCheckButton6" inherits="OptionsCheckButtonTemplate">
							<Size>
								<AbsDimension x="26" y="26"/>
							</Size>
							<Anchors>
								<Anchor point="TOP" relativeTo="ISync_Filters_RarityLayoutCheckButton5" relativePoint="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="6"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									if (this:GetChecked()) then
									    PlaySound("igMainMenuOptionCheckBoxOn");
									    ISync:SetVar({"FILTERS",5}, 1, "TRUE");
									else
									    PlaySound("igMainMenuOptionCheckBoxOff");
									    ISync:SetVar({"FILTERS",5}, 0, "TRUE");
									end
								</OnClick>
							</Scripts>
						</CheckButton>
						
						<Button name="ISync_Filters_Filter_Help1" virtual="true" hidden="false">
							<Size>
								<AbsDimension x="18" y="16"/>
							</Size>
							<Anchors>
								<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
									<Offset>
										<AbsDimension x="-8" y="-8"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Layers>
								<Layer level="OVERLAY">
									<FontString name="$parentText" inherits="GameFontNormal" justifyH="RIGHT" text="[?]">
										<Anchors>
											<Anchor point="RIGHT">
												<Offset>
													<AbsDimension x="0" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
									</FontString>
								</Layer>
							</Layers>
							<Scripts>
								<OnEnter>
									getglobal(this:GetName() .. "Text"):SetTextColor(1, 1, 0);
									GameTooltip:SetOwner(this, "ANCHOR_LEFT");
									GameTooltip:SetText(ISYNC_HELP_SUB1, 1, 0.72, 0, nil, 1);
									GameTooltip:Show();
								</OnEnter>
								<OnLeave>
									getglobal(this:GetName() .. "Text"):SetTextColor(1, 0.82, 0);
									GameTooltip:Hide();						
								</OnLeave>
							</Scripts>
						</Button>


					</Frames>

					<Scripts>
						<OnLoad>
							this:SetBackdropBorderColor(0.4, 0.4, 0.4);
							this:SetBackdropColor(0.15, 0.15, 0.15);
							getglobal(this:GetName().."Title"):SetText(ISYNC_FILTER_HEADER1);
						</OnLoad>
					</Scripts>
				</Frame>



				<Frame name="ISync_FiltersFrame_Opt_PurgeInvalid" inherits="OptionFrameBoxTemplate">
					<Size>
						<AbsDimension x="335" y="40"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="ISync_FiltersFrame" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="13" y="150"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Layers>
					</Layers>

					<Frames>

						<Button name="ISync_FiltersFramePurgeInvalidButton" inherits="UIPanelButtonTemplate" text="OK">
							<Size>
								<AbsDimension x="90" y="21"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									StaticPopup_Show("ISYNC_PURGEINVALID_CONFIRM");
								</OnClick>
							</Scripts>
						</Button>

						<Button name="ISync_Filters_Filter_Help3" virtual="true" hidden="false">
							<Size>
								<AbsDimension x="18" y="16"/>
							</Size>
							<Anchors>
								<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
									<Offset>
										<AbsDimension x="-8" y="-8"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Layers>
								<Layer level="OVERLAY">
									<FontString name="$parentText" inherits="GameFontNormal" justifyH="RIGHT" text="[?]">
										<Anchors>
											<Anchor point="RIGHT">
												<Offset>
													<AbsDimension x="0" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
									</FontString>
								</Layer>
							</Layers>
							<Scripts>
								<OnEnter>
									getglobal(this:GetName() .. "Text"):SetTextColor(1, 1, 0);
									GameTooltip:SetOwner(this, "ANCHOR_LEFT");
									GameTooltip:SetText(ISYNC_HELP_SUB3, 1, 0.72, 0, nil, 1);
									GameTooltip:Show();
								</OnEnter>
								<OnLeave>
									getglobal(this:GetName() .. "Text"):SetTextColor(1, 0.82, 0);
									GameTooltip:Hide();						
								</OnLeave>
							</Scripts>
						</Button>

					</Frames>

					<Scripts>
						<OnLoad>
							this:SetBackdropBorderColor(0.4, 0.4, 0.4);
							this:SetBackdropColor(0.15, 0.15, 0.15);
							getglobal(this:GetName().."Title"):SetText(ISYNC_FILTER_HEADER3);
						</OnLoad>
					</Scripts>
				</Frame>



				<Frame name="ISync_FiltersFrame_Opt_Purge" inherits="OptionFrameBoxTemplate">
					<Size>
						<AbsDimension x="335" y="40"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="ISync_FiltersFrame" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="13" y="85"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Layers>
					</Layers>

					<Frames>

						<Button name="ISync_FilterPurgeRare_DropDown" inherits="UIDropDownMenuTemplate">
								<Anchors>
									<Anchor point="TOPLEFT">
										<Offset>
											<AbsDimension x="5" y="-5"/>
										</Offset>
									</Anchor>
								</Anchors>
							<Scripts>
								<OnLoad>
									if(ISync) then ISync:Filter_DD_Load(); end
								</OnLoad>
							</Scripts>
						</Button>

						<Button name="ISync_FiltersFramePurgeButton" inherits="UIPanelButtonTemplate" text="OK">
							<Size>
								<AbsDimension x="90" y="21"/>
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="200" y="-10"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Scripts>
								<OnClick>
									StaticPopup_Show("ISYNC_PURGEDATA_CONFIRM");
								</OnClick>
							</Scripts>
						</Button>

						<Button name="ISync_Filters_Filter_Help4" virtual="true" hidden="false">
							<Size>
								<AbsDimension x="18" y="16"/>
							</Size>
							<Anchors>
								<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
									<Offset>
										<AbsDimension x="-8" y="-8"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Layers>
								<Layer level="OVERLAY">
									<FontString name="$parentText" inherits="GameFontNormal" justifyH="RIGHT" text="[?]">
										<Anchors>
											<Anchor point="RIGHT">
												<Offset>
													<AbsDimension x="0" y="0"/>
												</Offset>
											</Anchor>
										</Anchors>
									</FontString>
								</Layer>
							</Layers>
							<Scripts>
								<OnEnter>
									getglobal(this:GetName() .. "Text"):SetTextColor(1, 1, 0);
									GameTooltip:SetOwner(this, "ANCHOR_LEFT");
									GameTooltip:SetText(ISYNC_HELP_SUB4, 1, 0.72, 0, nil, 1);
									GameTooltip:Show();
								</OnEnter>
								<OnLeave>
									getglobal(this:GetName() .. "Text"):SetTextColor(1, 0.82, 0);
									GameTooltip:Hide();						
								</OnLeave>
							</Scripts>
						</Button>

					</Frames>

					<Scripts>
						<OnLoad>
							this:SetBackdropBorderColor(0.4, 0.4, 0.4);
							this:SetBackdropColor(0.15, 0.15, 0.15);
							getglobal(this:GetName().."Title"):SetText(ISYNC_FILTER_HEADER2);
						</OnLoad>
					</Scripts>
				</Frame>


				
			</Frames>
 
 			<Scripts>
   				<OnLoad>
 						ISync_FiltersFrameHeader_Box:SetBackdropBorderColor(0.4, 0.4, 0.4);
 						ISync_FiltersFrameHeader_Box:SetBackdropColor(1.0, 0.0, 0.0, 0.7);
 				</OnLoad>
 				<OnShow>	
						PlaySound("igMainMenuOptionCheckBoxOn");
 						ISync_FiltersFrameHeader_BoxText:SetText(ISYNC_BT_FILTERS);
 						
 						
 						ISync_Filters_RarityLayoutCheckButton1:SetChecked(ISync:SetVar({"FILTERS", 0}, 1));
 						ISync_Filters_RarityLayoutCheckButton2:SetChecked(ISync:SetVar({"FILTERS", 1}, 1));
 						ISync_Filters_RarityLayoutCheckButton3:SetChecked(ISync:SetVar({"FILTERS", 2}, 1));
 						ISync_Filters_RarityLayoutCheckButton4:SetChecked(ISync:SetVar({"FILTERS", 3}, 1));
 						ISync_Filters_RarityLayoutCheckButton5:SetChecked(ISync:SetVar({"FILTERS", 4}, 1));
 						ISync_Filters_RarityLayoutCheckButton6:SetChecked(ISync:SetVar({"FILTERS", 5}, 1));
	
 				</OnShow>
 				
 				<OnHide> 	if(GameTooltip:IsVisible()) then
 							GameTooltip:Hide();
 						end
 						
 						PlaySound("igMainMenuOptionCheckBoxOff");
 				</OnHide>
 			</Scripts>
	
	</Frame>


</Ui>