function AtlasLootRepMenu()
    for i = 1, 30, 1 do
        getglobal("AtlasLootItem_"..i):Hide();
    end
    for i = 1, 30, 1 do
        getglobal("AtlasLootMenuItem_"..i):Hide();
    end
    getglobal("AtlasLootItemsFrame_NEXT"):Hide();
    getglobal("AtlasLootItemsFrame_PREV"):Hide();
    --The Aldor
    AtlasLootMenuItem_2_Name:SetText(ATLASLOOT_FACTION_ALDOR);
    AtlasLootMenuItem_2_Extra:SetText("");
    AtlasLootMenuItem_2_Icon:SetTexture("Interface\\Icons\\Spell_Holy_SealOfSalvation");
    AtlasLootMenuItem_2.type="Factions";
    AtlasLootMenuItem_2.lootpage="Aldor1";
    AtlasLootMenuItem_2.text=ATLASLOOT_FACTION_ALDOR;
    AtlasLootMenuItem_2:Show();
    --Argent Dawn
    AtlasLootMenuItem_17_Name:SetText(ATLASLOOT_FACTION_ARGENT);
    AtlasLootMenuItem_17_Extra:SetText("");
    AtlasLootMenuItem_17_Icon:SetTexture("Interface\\Icons\\INV_Jewelry_Talisman_08");
    AtlasLootMenuItem_17.type="Factions";
    AtlasLootMenuItem_17.lootpage="Argent1";
    AtlasLootMenuItem_17.text=ATLASLOOT_FACTION_ARGENT;
    AtlasLootMenuItem_17:Show();
    --Brood of Nozdormu
    AtlasLootMenuItem_3_Name:SetText(ATLASLOOT_FACTION_BROOD);
    AtlasLootMenuItem_3_Extra:SetText("");
    AtlasLootMenuItem_3_Icon:SetTexture("Interface\\Icons\\INV_Jewelry_Ring_40");
    AtlasLootMenuItem_3.type="Factions";
    AtlasLootMenuItem_3.lootpage="AQBroodRings";
    AtlasLootMenuItem_3.text=ATLASLOOT_FACTION_BROOD;
    AtlasLootMenuItem_3:Show();
    --Cenarion Hold
    AtlasLootMenuItem_18_Name:SetText(ATLASLOOT_FACTION_CENARION);
    AtlasLootMenuItem_18_Extra:SetText("");
    AtlasLootMenuItem_18_Icon:SetTexture("Interface\\Icons\\INV_Chest_Plate07");
    AtlasLootMenuItem_18.type="Factions";
    AtlasLootMenuItem_18.lootpage="Cenarion1";
    AtlasLootMenuItem_18.text=ATLASLOOT_FACTION_CENARION;
    AtlasLootMenuItem_18:Show();
    --Cenarion Expedition
    AtlasLootMenuItem_4_Name:SetText(ATLASLOOT_FACTION_CENARION_EXPEDITION);
    AtlasLootMenuItem_4_Extra:SetText("");
    AtlasLootMenuItem_4_Icon:SetTexture("Interface\\Icons\\INV_Misc_Ammo_Arrow_02");
    AtlasLootMenuItem_4.type="Factions";
    AtlasLootMenuItem_4.lootpage="CExpedition1";
    AtlasLootMenuItem_4.text=ATLASLOOT_FACTION_CENARION_EXPEDITION;
    AtlasLootMenuItem_4:Show();
    --The Consortium
    AtlasLootMenuItem_19_Name:SetText(ATLASLOOT_FACTION_CONSORTIUM);
    AtlasLootMenuItem_19_Extra:SetText("");
    AtlasLootMenuItem_19_Icon:SetTexture("Interface\\Icons\\INV_Weapon_Shortblade_31");
    AtlasLootMenuItem_19.type="Factions";
    AtlasLootMenuItem_19.lootpage="Consortium1";
    AtlasLootMenuItem_19.text=ATLASLOOT_FACTION_CONSORTIUM;
    AtlasLootMenuItem_19:Show();
    --Darkmoon Faire
    AtlasLootMenuItem_5_Name:SetText(ATLASLOOT_FACTION_DARKMOON);
    AtlasLootMenuItem_5_Extra:SetText("");
    AtlasLootMenuItem_5_Icon:SetTexture("Interface\\Icons\\INV_Misc_Ticket_Tarot_Maelstrom_01");
    AtlasLootMenuItem_5.type="Factions";
    AtlasLootMenuItem_5.lootpage="Darkmoon";
    AtlasLootMenuItem_5.text=ATLASLOOT_FACTION_DARKMOON;
    AtlasLootMenuItem_5:Show();
    --Honor Hold
    AtlasLootMenuItem_20_Name:SetText(ATLASLOOT_FACTION_HONOR_HOLD);
    AtlasLootMenuItem_20_Extra:SetText("|cffFF8400"..ATLASLOOT_ALLIANCE);
    AtlasLootMenuItem_20_Icon:SetTexture("Interface\\Icons\\INV_BannerPVP_02");
    AtlasLootMenuItem_20.type="Factions";
    AtlasLootMenuItem_20.lootpage="HonorHold1";
    AtlasLootMenuItem_20.text=ATLASLOOT_FACTION_HONOR_HOLD;
    AtlasLootMenuItem_20:Show();
    --Keepers of Time
    AtlasLootMenuItem_6_Name:SetText(ATLASLOOT_FACTION_KEEPERS);
    AtlasLootMenuItem_6_Extra:SetText("");
    AtlasLootMenuItem_6_Icon:SetTexture("Interface\\Icons\\Ability_Warrior_VictoryRush");
    AtlasLootMenuItem_6.type="Factions";
    AtlasLootMenuItem_6.lootpage="KeepersofTime1";
    AtlasLootMenuItem_6.text=ATLASLOOT_FACTION_KEEPERS;
    AtlasLootMenuItem_6:Show();
    --Kurenai
    AtlasLootMenuItem_21_Name:SetText(ATLASLOOT_FACTION_KURENAI);
    AtlasLootMenuItem_21_Extra:SetText("|cffFF8400"..ATLASLOOT_ALLIANCE);
    AtlasLootMenuItem_21_Icon:SetTexture("Interface\\Icons\\INV_Misc_Foot_Centaur");
    AtlasLootMenuItem_21.type="Factions";
    AtlasLootMenuItem_21.lootpage="Kurenai1";
    AtlasLootMenuItem_21.text=ATLASLOOT_FACTION_KURENAI;
    AtlasLootMenuItem_21:Show();
    --The Lower City
    AtlasLootMenuItem_7_Name:SetText(ATLASLOOT_FACTION_LOWERCITY);
    AtlasLootMenuItem_7_Extra:SetText("");
    AtlasLootMenuItem_7_Icon:SetTexture("Interface\\Icons\\Ability_Rogue_MasterOfSubtlety");
    AtlasLootMenuItem_7.type="Factions";
    AtlasLootMenuItem_7.lootpage="LowerCity1";
    AtlasLootMenuItem_7.text=ATLASLOOT_FACTION_LOWERCITY;
    AtlasLootMenuItem_7:Show();
    --The Mag'har
    AtlasLootMenuItem_22_Name:SetText(ATLASLOOT_FACTION_MAGHAR);
    AtlasLootMenuItem_22_Extra:SetText("|cffFF8400"..ATLASLOOT_HORDE);
    AtlasLootMenuItem_22_Icon:SetTexture("Interface\\Icons\\INV_Misc_Foot_Centaur");
    AtlasLootMenuItem_22.type="Factions";
    AtlasLootMenuItem_22.lootpage="Maghar1";
    AtlasLootMenuItem_22.text=ATLASLOOT_FACTION_MAGHAR;
    AtlasLootMenuItem_22:Show();
    --The Scryers
    AtlasLootMenuItem_8_Name:SetText(ATLASLOOT_FACTION_SCRYER);
    AtlasLootMenuItem_8_Extra:SetText("");
    AtlasLootMenuItem_8_Icon:SetTexture("Interface\\Icons\\Spell_Holy_ChampionsBond");
    AtlasLootMenuItem_8.type="Factions";
    AtlasLootMenuItem_8.lootpage="Scryer1";
    AtlasLootMenuItem_8.text=ATLASLOOT_FACTION_SCRYER;
    AtlasLootMenuItem_8:Show();
    --The Sha'tar
    AtlasLootMenuItem_23_Name:SetText(ATLASLOOT_FACTION_SHATAR);
    AtlasLootMenuItem_23_Extra:SetText("");
    AtlasLootMenuItem_23_Icon:SetTexture("Interface\\Icons\\Spell_Nature_LightningOverload");
    AtlasLootMenuItem_23.type="Factions";
    AtlasLootMenuItem_23.lootpage="Shatar1";
    AtlasLootMenuItem_23.text=ATLASLOOT_FACTION_SHATAR;
    AtlasLootMenuItem_23:Show();
    --Sporeggar
    AtlasLootMenuItem_9_Name:SetText(ATLASLOOT_FACTION_SPOREGGAR);
    AtlasLootMenuItem_9_Extra:SetText("");
    AtlasLootMenuItem_9_Icon:SetTexture("Interface\\Icons\\INV_Mushroom_10");
    AtlasLootMenuItem_9.type="Factions";
    AtlasLootMenuItem_9.lootpage="Sporeggar1";
    AtlasLootMenuItem_9.text=ATLASLOOT_FACTION_SPOREGGAR;
    AtlasLootMenuItem_9:Show();
    --Thorium Brotherhood
    AtlasLootMenuItem_24_Name:SetText(ATLASLOOT_FACTION_THORIUM);
    AtlasLootMenuItem_24_Extra:SetText("");
    AtlasLootMenuItem_24_Icon:SetTexture("Interface\\Icons\\INV_Ingot_Mithril");
    AtlasLootMenuItem_24.type="Factions";
    AtlasLootMenuItem_24.lootpage="Thorium1";
    AtlasLootMenuItem_24.text=ATLASLOOT_FACTION_THORIUM;
    AtlasLootMenuItem_24:Show();
    --Thrallmar
    AtlasLootMenuItem_10_Name:SetText(ATLASLOOT_FACTION_THRALLMAR);
    AtlasLootMenuItem_10_Extra:SetText("|cffFF8400"..ATLASLOOT_HORDE);
    AtlasLootMenuItem_10_Icon:SetTexture("Interface\\Icons\\INV_BannerPVP_01");
    AtlasLootMenuItem_10.type="Factions";
    AtlasLootMenuItem_10.lootpage="Thrallmar1";
    AtlasLootMenuItem_10.text=ATLASLOOT_FACTION_THRALLMAR;
    AtlasLootMenuItem_10:Show();
    --The Timbermaw
    AtlasLootMenuItem_25_Name:SetText(ATLASLOOT_FACTION_TIMBERMAW);
    AtlasLootMenuItem_25_Extra:SetText("");
    AtlasLootMenuItem_25_Icon:SetTexture("Interface\\Icons\\INV_Misc_Horn_01");
    AtlasLootMenuItem_25.type="Factions";
    AtlasLootMenuItem_25.lootpage="Timbermaw";
    AtlasLootMenuItem_25.text=ATLASLOOT_FACTION_TIMBERMAW;
    AtlasLootMenuItem_25:Show();
    --The Tranquillien
    AtlasLootMenuItem_11_Name:SetText(ATLASLOOT_FACTION_TRANQ);
    AtlasLootMenuItem_11_Extra:SetText("");
    AtlasLootMenuItem_11_Icon:SetTexture("Interface\\Icons\\INV_Misc_Bandana_03");
    AtlasLootMenuItem_11.type="Factions";
    AtlasLootMenuItem_11.lootpage="Tranquillien1";
    AtlasLootMenuItem_11.text=ATLASLOOT_FACTION_TRANQ;
    AtlasLootMenuItem_11:Show();
    --Zandalar Tribe
    AtlasLootMenuItem_26_Name:SetText(ATLASLOOT_FACTION_ZANDALAR);
    AtlasLootMenuItem_26_Extra:SetText("");
    AtlasLootMenuItem_26_Icon:SetTexture("Interface\\Icons\\INV_Misc_Coin_08");
    AtlasLootMenuItem_26.type="Factions";
    AtlasLootMenuItem_26.lootpage="Zandalar1";
    AtlasLootMenuItem_26.text=ATLASLOOT_FACTION_ZANDALAR;
    AtlasLootMenuItem_26:Show();
    for i = 1, 30, 1 do
        getglobal("AtlasLootMenuItem_"..i.."_Extra"):Show();
    end
    AtlasLoot_BossName:SetText("|cffFFFFFF"..ATLASLOOT_PANEL_BUTTON_REPUTATION);
    AtlasLoot_SetItemInfoFrame(AtlasLoot_AnchorFrame);
end

function AtlasLoot_Rep(setid, text)
    for i = 1, 30, 1 do
        getglobal("AtlasLootMenuItem_"..i):Hide();
    end
    getglobal("AtlasLootItemsFrame_NEXT"):Hide();
    getglobal("AtlasLootItemsFrame_PREV"):Hide();
    if(setid=="Thorium1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_THORIUM..": "..ATLASLOOT_FRIENDLY, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Thorium2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Thorium2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_THORIUM..": "..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Thorium3";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Thorium1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Thorium3") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_THORIUM..": "..ATLASLOOT_REVERED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Thorium4";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Thorium2";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Thorium4") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_THORIUM..": "..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Thorium3";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Cenarion1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CENARION..": "..ATLASLOOT_FRIENDLY, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Cenarion2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Cenarion2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CENARION..": "..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Cenarion3";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Cenarion1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Cenarion3") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CENARION..": "..ATLASLOOT_REVERED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Cenarion4";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Cenarion2";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Cenarion4") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CENARION..": "..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Cenarion3";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Argent1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ARGENT..": "..ATLASLOOT_FACTION_ARGENT_TOKEN, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Argent2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Argent2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ARGENT..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Argent3";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Argent1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Argent3") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ARGENT..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Argent2";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Zandalar1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ZANDALAR..": "..ATLASLOOT_FRIENDLY, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Zandalar2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Zandalar2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ZANDALAR..": "..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Zandalar3";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Zandalar1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Zandalar3") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ZANDALAR..": "..ATLASLOOT_REVERED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Zandalar4";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Zandalar2";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Zandalar4") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ZANDALAR..": "..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Zandalar3";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Aldor1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ALDOR..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Aldor2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Aldor2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_ALDOR..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Aldor1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Scryer1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_SCRYER..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Scryer2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Scryer2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_SCRYER..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Scryer1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="CExpedition1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CENARION_EXPEDITION..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="CExpedition2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="CExpedition2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CENARION_EXPEDITION..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="CExpedition1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Shatar1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_SHATAR..": "..ATLASLOOT_FRIENDLY.."-"..ATLASLOOT_REVERED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Shatar2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Shatar2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_SHATAR..": "..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Shatar1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="LowerCity1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_LOWERCITY..": "..ATLASLOOT_FRIENDLY.."-"..ATLASLOOT_REVERED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="LowerCity2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="LowerCity2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_LOWERCITY..": "..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="LowerCity1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Thrallmar1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_THRALLMAR..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Thrallmar2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Thrallmar2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_THRALLMAR..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Thrallmar1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="HonorHold1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_HONOR_HOLD..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="HonorHold2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="HonorHold2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_HONOR_HOLD..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="HonorHold1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(setid=="Consortium1") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CONSORTIUM..": "..ATLASLOOT_FRIENDLY.."/"..ATLASLOOT_HONORED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_NEXT").lootpage="Consortium2";
        getglobal("AtlasLootItemsFrame_NEXT"):Show();
    elseif(setid=="Consortium2") then
        AtlasLoot_ShowItemsFrame(setid, AtlasLootRepItems, ATLASLOOT_FACTION_CONSORTIUM..": "..ATLASLOOT_REVERED.."/"..ATLASLOOT_EXALTED, AtlasLoot_AnchorFrame);
        getglobal("AtlasLootItemsFrame_PREV").lootpage="Consortium1";
        getglobal("AtlasLootItemsFrame_PREV"):Show();
    elseif(this:GetName()=="AtlasLootItemsFrame_NEXT" or this:GetName()=="AtlasLootItemsFrame_PREV") then
        AtlasLootPvPButton_OnClick(this.lootpage);
    end
end

function AtlasLootRepButton_OnClick(setid, text)
    for i = 1, 30, 1 do
        getglobal("AtlasLootMenuItem_"..i):Hide();
    end
    getglobal("AtlasLootItemsFrame_NEXT"):Hide();
    getglobal("AtlasLootItemsFrame_PREV"):Hide();
    if (setid=="Darkmoon" or setid=="Timbermaw" or setid=="Sporeggar1" or setid=="Kurenai1" or setid=="KeepersofTime1") then
        AtlasLoot_ShowBossLoot(setid, text, AtlasLoot_AnchorFrame);
    elseif (setid=="Tranquillien1" or setid=="Maghar1") then
        AtlasLoot_ShowBossLoot(setid, text, AtlasLoot_AnchorFrame);
    elseif (setid=="AQBroodRings") then
        AtlasLoot_ShowBossLoot(setid, ATLASLOOT_FACTION_BROOD, AtlasLoot_AnchorFrame);
    else
        AtlasLoot_Rep(setid, text);
    end
end
