-- Dropdown
AQW_DIA.DROPDOWN_OPTIONS = {};
AQW_DIA.DROPDOWN_OPTIONS = { { TITLE = AQW_EVENT.AQ, FUNC = function() AQWarner_Dummy(); end },
                             { TITLE = "-------------------------", FUNC = function() AQWarner_Dummy(); end },
                             { TITLE = AQW_DIA.SKERAM_INTRO, FUNC = function() AQWarner_SkeramOnClick(); end },
                             { TITLE = AQW_DIA.TRIO_INTRO, FUNC = function() AQWarner_TrioOnClick(); end },
                             { TITLE = AQW_DIA.SARTURA_INTRO, FUNC = function() AQWarner_SarturaOnClick(); end },
                             { TITLE = AQW_DIA.FANKRISS_INTRO, FUNC = function() AQWarner_FankrissOnClick(); end },
                             { TITLE = AQW_DIA.HUHURAN_INTRO, FUNC = function() AQWarner_HuhuranOnClick(); end },
                             { TITLE = AQW_DIA.ANUB_INTRO, FUNC = function() AQWarner_AnubOnClick(); end },
                             { TITLE = AQW_DIA.TWINS_INTRO, FUNC = function() AQWarner_TwinsOnClick(); end },
                             { TITLE = AQW_DIA.SLAYER_INTRO, FUNC = function() AQWarner_SlayerOnClick(); end },
                             { TITLE = AQW_DIA.CHAMP_INTRO, FUNC = function() AQWarner_ChampOnClick(); end },
--														 { TITLE = AQW_DIA.WARDER_INTRO, FUNC = function() AQWarner_WarderOnClick(); end },
--                             { TITLE = AQW_DIA.NULLIFIER_INTRO, FUNC = function() AQWarner_NullifierOnClick(); end },
                             { TITLE = AQW_DIA.CTHUN_INTRO, FUNC = function() AQWarner_CThunOnClick(); end },
                             { TITLE = "", FUNC = function() AQWarner_Dummy(); end },
                             { TITLE = AQW_EVENT.AQ20, FUNC = function() AQWarner_Dummy(); end },
                             { TITLE = "-------------------------", FUNC = function() AQWarner_Dummy(); end },
                             { TITLE = AQW_DIA.RAJAXX_INTRO, FUNC = function() AQWarner_RajaxxOnClick(); end },
                             { TITLE = AQW_DIA.BURU_INTRO, FUNC = function() AQWarner_BuruOnClick(); end },
                             { TITLE = AQW_DIA.MOAM_INTRO, FUNC = function() AQWarner_MoamOnClick(); end },
                             { TITLE = AQW_DIA.AYAMISS_INTRO, FUNC = function() AQWarner_AyamissOnClick(); end },
                             { TITLE = AQW_DIA.ANUB_AQ20_INTRO, FUNC = function() AQWarner_AnubAQ20OnClick(); end },
                             { TITLE = AQW_DIA.OSSIRIAN_INTRO, FUNC = function() AQWarner_OssirianOnClick(); end }
                           }

--**********************************
--*                                *
--*        Reset Config            *
--*                                *
--**********************************
function AQWarner_ConfigToDefault()
    AQW_OPTIONS.ENABLED = true;
    AQW_OPTIONS.STARS = true;
    AQW_OPTIONS.RAID = true;
    AQW_OPTIONS.SOUND = true;
    AQW_OPTIONS.SEND_TELLS = true;
    AQW_OPTIONS.SELF_MESSAGE = true;
    AQW_OPTIONS.MINIMAP_BUTTON_POSITION = 90;
    AQW_OPTIONS.MINIMAP_BUTTON = true;
    AQW_OPTIONS.DEBUG = false;
    AQW_OPTIONS.CURRENT_SELECT = 3;
    -- Skeram
    AQW_OPTIONS.SKERAM_AE = true;
    AQW_OPTIONS.SKERAM_MC = true;
    AQW_OPTIONS.SKERAM_SPLIT = true;
    -- Vem/Yauj/Kri
    AQW_OPTIONS.TRIO_YAUJ_HEAL = true;
    -- Fankriss
    AQW_OPTIONS.FANKRISS_SUMMON = true;
    -- Sartura
    AQW_OPTIONS.SARTURA_WHIRL = true;
    AQW_OPTIONS.SARTURA_ENRAGE = true;
    AQW_OPTIONS.SARTURE_SUPREME = true;
    -- Huhuran
    AQW_OPTIONS.HUHURAN_FRENZY = false;
    AQW_OPTIONS.HUHURAN_BERSERK_IMMINENT = true;
    AQW_OPTIONS.HUHURAN_BERSERK_LIMIT = 33;
    AQW_OPTIONS.HUHURAN_STING = true;
    AQW_OPTIONS.HUHURAN_SUPREME = true;
    -- Anubisath
    AQW_OPTIONS.ANUB_SUMMON = true;
    AQW_OPTIONS.ANUB_PLAGUE = true;
    AQW_OPTIONS.ANUB_METEOR = true;
    AQW_OPTIONS.ANUB_THUNDERCLAP = true;
    AQW_OPTIONS.ANUB_STORM = true;
    AQW_OPTIONS.ANUB_EXPLODE = true;
    AQW_OPTIONS.ANUB_ENRAGE = true;
    -- Twins
    AQW_OPTIONS.TWINS_PORT = false;
    AQW_OPTIONS.TWINS_PREWARN_INTERVAL = 5;
    AQW_OPTIONS.TWINS_HEAL = false;
    AQW_OPTIONS.TWINS_HEAL_ANNOUNCE_INTERVAL = 10;
    AQW_OPTIONS.TWINS_BUG_EXPLODE = true;
    AQW_OPTIONS.TWINS_SUPREME = true;
    -- Qiraji Slayer
    AQW_OPTIONS.SLAYER_FRENZY = false;
    AQW_OPTIONS.SLAYER_WHIRL = false;
    -- Qiraji Champion
    AQW_OPTIONS.CHAMP_ENRAGE = false;
		-- Anubisath Warder
		AQW_OPTIONS.WARDER_ROOTS = false;
		AQW_OPTIONS.WARDER_FEAR = false;
		AQW_OPTIONS.WARDER_BLASTWAVE = false;
		AQW_OPTIONS.WARDER_DUSTCLOUD = false;
		AQW_OPTIONS.WARDER_SILENCE = false;
		-- Obsidian Nullifier
		AQW_OPTIONS.NULLIFIER_NULLIFY = false;
		-- C'Thun
		AQW_OPTIONS.CTHUN_GLARE = true;
		AQW_OPTIONS.CTHUN_GLARE_PREWARN = 5;
		AQW_OPTIONS.CTHUN_EYETENT = true;
		AQW_OPTIONS.CTHUN_EYETENT_PREWARN = 5;
		AQW_OPTIONS.CTHUN_CLAWTENT = true;
		AQW_OPTIONS.CTHUN_STOMACH = true;
		AQW_OPTIONS.CTHUN_EYEBEAM = true;
--
-- AQ20
--
    -- Rajaxx
    AQW_OPTIONS.RAJAXX_WAVES = true;
    -- Buru
    AQW_OPTIONS.BURU_EYES = true;
    -- Ossirian
    AQW_OPTIONS.OSSIRIAN_SUPREME = true;
    AQW_OPTIONS.OSSIRIAN_SUPREME_IMMINENT = true;
    AQW_OPTIONS.OSSIRIAN_WEAKNESS = true;
    -- Moam
    AQW_OPTIONS.MOAM_ADDS = false;
    -- Ayamiss
    AQW_OPTIONS.AYAMISS_SACRIFICE = true;
    -- Anubisath Guardian
    AQW_OPTIONS.ANUB_AQ20_SUMMON = true;
    AQW_OPTIONS.ANUB_AQ20_PLAGUE = true;
    AQW_OPTIONS.ANUB_AQ20_METEOR = true;
    AQW_OPTIONS.ANUB_AQ20_THUNDERCLAP = true;
    AQW_OPTIONS.ANUB_AQ20_STORM = true;
    AQW_OPTIONS.ANUB_AQ20_EXPLODE = true;
    AQW_OPTIONS.ANUB_AQ20_ENRAGE = true;
    
    getglobal(AQWarnerConfigFrame:GetName().."CheckButtonAQWarner"):SetChecked(AQW_OPTIONS.ENABLED);

    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonStars"):SetChecked(AQW_OPTIONS.STARS);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonRaid"):SetChecked(AQW_OPTIONS.RAID);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonSound"):SetChecked(AQW_OPTIONS.SOUND);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonTells"):SetChecked(AQW_OPTIONS.SEND_TELLS);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonSelf"):SetChecked(AQW_OPTIONS.SELF_MESSAGE);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonMinimapButtonToggle"):SetChecked(AQW_OPTIONS.MINIMAP_BUTTON);
    
    if (AQW_OPTIONS.MINIMAP_BUTTON) then
        AQWMinimapButton:Show();
        AQWarner_ChangeMinimapPosition(AQW_OPTIONS.MINIMAP_BUTTON_POSITION);
    else
        AQWMinimapButton:Hide();
    end
    
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."MinimapButtonSlider"):SetValue(AQW_OPTIONS.MINIMAP_BUTTON_POSITION);
    
    getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramAE"):SetChecked(AQW_OPTIONS.SKERAM_AE);
    getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramMC"):SetChecked(AQW_OPTIONS.SKERAM_MC);
    getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramSplit"):SetChecked(AQW_OPTIONS.SKERAM_SPLIT);

    getglobal(AQWarnerTrioOptionsFrame:GetName().."CheckButtonTrioYaujHeal"):SetChecked(AQW_OPTIONS.TRIO_YAUJ_HEAL);
    
    getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaWhirl"):SetChecked(AQW_OPTIONS.SARTURA_WHIRL);
    getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaEnrage"):SetChecked(AQW_OPTIONS.SARTURA_ENRAGE);
    getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaSupreme"):SetChecked(AQW_OPTIONS.SARTURA_SUPREME);
    
    getglobal(AQWarnerFankrissOptionsFrame:GetName().."CheckButtonFankrissSummon"):SetChecked(AQW_OPTIONS.FANKRISS_SUMMON);

    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranFrenzy"):SetChecked(AQW_OPTIONS.HUHURAN_FRENZY);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranImminent"):SetChecked(AQW_OPTIONS.HUHURAN_IMMINENT);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."HuhuranBerserkLimit"):SetValue(AQW_OPTIONS.HUHURAN_BERSERK_LIMIT);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranBerserk"):SetChecked(AQW_OPTIONS.HUHURAN_BERSERK);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranSting"):SetChecked(AQW_OPTIONS.HUHURAN_STING);
    
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubSummon"):SetChecked(AQW_OPTIONS.ANUB_SUMMON);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubPlague"):SetChecked(AQW_OPTIONS.ANUB_PLAGUE);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubMeteor"):SetChecked(AQW_OPTIONS.ANUB_METEOR);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubThunderclap"):SetChecked(AQW_OPTIONS.ANUB_THUNDERCLAP);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubStorm"):SetChecked(AQW_OPTIONS.ANUB_STORM);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubExplode"):SetChecked(AQW_OPTIONS.ANUB_EXPLODE);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubEnrage"):SetChecked(AQW_OPTIONS.ANUB_ENRAGE);

    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsPort"):SetChecked(AQW_OPTIONS.TWINS_PORT);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsHeal"):SetChecked(AQW_OPTIONS.TWINS_HEAL);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."TwinsHealAnnounceInterval"):SetValue(AQW_OPTIONS.TWINS_HEAL_ANNOUNCE_INTERVAL);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsBugExplode"):SetChecked(AQW_OPTIONS.TWINS_BUG_EXPLODE);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsSupreme"):SetChecked(AQW_OPTIONS.TWINS_SUPREME);

    getglobal(AQWarnerSlayerOptionsFrame:GetName().."CheckButtonSlayerFrenzy"):SetChecked(AQW_OPTIONS.SLAYER_FRENZY);
    getglobal(AQWarnerSlayerOptionsFrame:GetName().."CheckButtonSlayerWhirl"):SetChecked(AQW_OPTIONS.SLAYER_WHIRL);

    getglobal(AQWarnerChampOptionsFrame:GetName().."CheckButtonChampEnrage"):SetChecked(AQW_OPTIONS.CHAMP_ENRAGE);

    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunGlare"):SetChecked(AQW_OPTIONS.CTHUN_GLARE);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CThunGlarePrewarn"):SetValue(AQW_OPTIONS.CTHUN_GLARE_PREWARN);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunEyeTent"):SetChecked(AQW_OPTIONS.CTHUN_EYETENT);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CThunEyeTentPrewarn"):SetValue(AQW_OPTIONS.CTHUN_EYETENT_PREWARN);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunClawTent"):SetChecked(AQW_OPTIONS.CTHUN_CLAWTENT);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunStomach"):SetChecked(AQW_OPTIONS.CTHUN_STOMACH);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunEyeBeam"):SetChecked(AQW_OPTIONS.CTHUN_EYEBEAM);

    getglobal(AQWarnerRajaxxOptionsFrame:GetName().."CheckButtonRajaxxWaves"):SetChecked(AQW_OPTIONS.RAJAXX_WAVES);

    getglobal(AQWarnerBuruOptionsFrame:GetName().."CheckButtonBuruEyes"):SetChecked(AQW_OPTIONS.BURU_EYES);

    getglobal(AQWarnerMoamOptionsFrame:GetName().."CheckButtonMoamAdds"):SetChecked(AQW_OPTIONS.MOAM_ADDS);

    getglobal(AQWarnerAyamissOptionsFrame:GetName().."CheckButtonAyamissSacrifice"):SetChecked(AQW_OPTIONS.AYAMISS_SACRIFICE);

    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Summon"):SetChecked(AQW_OPTIONS.ANUB_AQ20_SUMMON);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Plague"):SetChecked(AQW_OPTIONS.ANUB_AQ20_PLAGUE);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Meteor"):SetChecked(AQW_OPTIONS.ANUB_AQ20_METEOR);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Thunderclap"):SetChecked(AQW_OPTIONS.ANUB_AQ20_THUNDERCLAP);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Storm"):SetChecked(AQW_OPTIONS.ANUB_AQ20_STORM);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Explode"):SetChecked(AQW_OPTIONS.ANUB_AQ20_EXPLODE);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Enrage"):SetChecked(AQW_OPTIONS.ANUB_AQ20_ENRAGE);

    getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianSupremeImminent"):SetChecked(AQW_OPTIONS.OSSIRIAN_SUPREME_IMMINENT);
    getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianSupreme"):SetChecked(AQW_OPTIONS.OSSIRIAN_SUPREME);
    getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianWeakness"):SetChecked(AQW_OPTIONS.OSSIRIAN_WEAKNESS);
end

--**********************************
--*                                *
--*        GUI Click Event         *
--*                                *
--**********************************
function AQWarner_OnClick()

    if (not AQW_CONFIG_LOADED) then
        AQWarnerConfigFrame:Hide();
        return;
    end
    
    if (this:GetName() == (this:GetParent():GetName().."CheckButtonAQWarner")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ENABLED = true;
            AQWarner_AddMessage(AQW_MSG.ENABLED);
        else
            AQW_OPTIONS.ENABLED = false;
            AQWarner_AddMessage(AQW_MSG.DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonTells")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SEND_TELLS = true;
            AQWarner_AddMessage(AQW_MSG.TELLS_ENABLED);
        else
            AQW_OPTIONS.SEND_TELLS = false;
            AQWarner_AddMessage(AQW_MSG.TELLS_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSelf")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SELF_MESSAGE = true;
            AQWarner_AddMessage(AQW_MSG.SELF_ENABLED);
        else
            AQW_OPTIONS.SELF_MESSAGE = false;
            AQWarner_AddMessage(AQW_MSG.SELF_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonStars")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.STARS = true;
            AQWarner_AddMessage(AQW_MSG.STARS_ENABLED);
        else
            AQW_OPTIONS.STARS = false;
            AQWarner_AddMessage(AQW_MSG.STARS_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonRaid")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.RAID = true;
            AQWarner_AddMessage(AQW_MSG.RAID_ENABLED);
        else
            AQW_OPTIONS.RAID = false;
            AQWarner_AddMessage(AQW_MSG.RAID_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSound")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SOUND = true;
            AQWarner_AddMessage(AQW_MSG.SOUND_ENABLED);
        else
            AQW_OPTIONS.SOUND = false;
            AQWarner_AddMessage(AQW_MSG.SOUND_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonMinimapButtonToggle")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.MINIMAP_BUTTON = true;
            AQWarner_AddMessage(AQW_MSG.MINIMAP_BUTTON_ENABLED);
            AQWMinimapButton:Show();
            AQWarner_ChangeMinimapPosition(AQW_OPTIONS.MINIMAP_BUTTON_POSITION);
        else
            AQW_OPTIONS.MINIMAP_BUTTON = false;
            AQWarner_AddMessage(AQW_MSG.MINIMAP_BUTTON_DISABLED);
            AQWMinimapButton:Hide();
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSkeramAE")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SKERAM_AE = true;
            AQWarner_AddMessage(AQW_MSG.SKERAM_AE_ENABLED);
        else
            AQW_OPTIONS.SKERAM_AE = false;
            AQWarner_AddMessage(AQW_MSG.SKERAM_AE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSkeramMC")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SKERAM_MC = true;
            AQWarner_AddMessage(AQW_MSG.SKERAM_MC_ENABLED);
        else
            AQW_OPTIONS.SKERAM_MC = false;
            AQWarner_AddMessage(AQW_MSG.SKERAM_MC_DISABLED);
        end
        
    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSkeramSplit")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SKERAM_SPLIT = true;
            AQWarner_AddMessage(AQW_MSG.SKERAM_SPLIT_ENABLED);
        else
            AQW_OPTIONS.SKERAM_SPLIT = false;
            AQWarner_AddMessage(AQW_MSG.SKERAM_SPLIT_DISABLED);
        end
        
    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonTrioYaujHeal")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.TRIO_YAUJ_HEAL = true;
            AQWarner_AddMessage(AQW_MSG.TRIO_YAUJ_HEAL_ENABLED);
        else
            AQW_OPTIONS.TRIO_YAUJ_HEAL = false;
            AQWarner_AddMessage(AQW_MSG.TRIO_YAUJ_HEAL_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSarturaWhirl")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SARTURA_WHIRL = true;
            AQWarner_AddMessage(AQW_MSG.SARTURA_WHIRL_ENABLED);
        else
            AQW_OPTIONS.SARTURA_WHIRL = false;
            AQWarner_AddMessage(AQW_MSG.SARTURA_WHIRL_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSarturaEnrage")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SARTURA_ENRAGE = true;
            AQWarner_AddMessage(AQW_MSG.SARTURA_ENRAGE_ENABLED);
        else
            AQW_OPTIONS.SARTURA_ENRAGE = false;
            AQWarner_AddMessage(AQW_MSG.SARTURA_ENRAGE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSarturaSupreme")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SARTURA_SUPREME = true;
            AQWarner_AddMessage(AQW_MSG.SARTURA_SUPREME_ENABLED);
        else
            AQW_OPTIONS.SARTURA_SUPREME = false;
            AQWarner_AddMessage(AQW_MSG.SARTURA_SUPREME_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonFankrissSummon")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.FANKRISS_SUMMON = true;
            AQWarner_AddMessage(AQW_MSG.FANKRISS_SUMMON_ENABLED);
        else
            AQW_OPTIONS.FANKRISS_SUMMON = false;
            AQWarner_AddMessage(AQW_MSG.FANKRISS_SUMMON_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonHuhuranFrenzy")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.HUHURAN_FRENZY = true;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_FRENZY_ENABLED);
        else
            AQW_OPTIONS.HUHURAN_FRENZY = false;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_FRENZY_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonHuhuranImminent")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.HUHURAN_IMMINENT = true;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_IMMINENT_ENABLED);
        else
            AQW_OPTIONS.HUHURAN_IMMINENT = false;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_IMMINENT_DISABLED);
        end
        
    elseif (this:GetName() == (this:GetParent():GetName().."HuhuranBerserkLimit")) then
        AQW_OPTIONS.HUHURAN_BERSERK_LIMIT = this:GetValue();

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonHuhuranBerserk")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.HUHURAN_BERSERK = true;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_BERSERK_ENABLED);
        else
            AQW_OPTIONS.HUHURAN_BERSERK = false;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_BERSERK_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonHuhuranBerserk")) then
        AQW_OPTIONS.HUHURAN_BERSERK_LIMIT = this:GetValue();

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonHuhuranSting")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.HUHURAN_STING = true;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_STING_ENABLED);
        else
            AQW_OPTIONS.HUHURAN_STING = false;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_STING_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonHuhuranSupreme")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.HUHURAN_SUPREME = true;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_SUPREME_ENABLED);
        else
            AQW_OPTIONS.HUHURAN_SUPREME = false;
            AQWarner_AddMessage(AQW_MSG.HUHURAN_SUPREME_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubSummon")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_SUMMON = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_SUMMON_ENABLED);
        else
            AQW_OPTIONS.ANUB_SUMMON = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_SUMMON_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubPlague")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_PLAGUE = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_PLAGUE_ENABLED);
        else
            AQW_OPTIONS.ANUB_PLAGUE = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_PLAGUE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubThunderclap")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_THUNDERCLAP = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_THUNDERCLAP_ENABLED);
        else
            AQW_OPTIONS.ANUB_THUNDERCLAP = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_THUNDERCLAP_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubStorm")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_STORM = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_STORM_ENABLED);
        else
            AQW_OPTIONS.ANUB_STORM = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_STORM_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubMeteor")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_METEOR = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_METEOR_ENABLED);
        else
            AQW_OPTIONS.ANUB_METEOR = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_METEOR_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubEnrage")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_ENRAGE = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_ENRAGE_ENABLED);
        else
            AQW_OPTIONS.ANUB_ENRAGE = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_ENRAGE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubExplode")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_EXPLODE = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_EXPLODE_ENABLED);
        else
            AQW_OPTIONS.ANUB_EXPLODE = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_EXPLODE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonTwinsPort")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.TWINS_PORT = true;
            AQWarner_AddMessage(AQW_MSG.TWINS_PORT_ENABLED);
        else
            AQW_OPTIONS.TWINS_PORT = false;
            AQWarner_AddMessage(AQW_MSG.TWINS_PORT_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonTwinsHeal")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.TWINS_HEAL = true;
            AQWarner_AddMessage(AQW_MSG.TWINS_HEAL_ENABLED);
        else
            AQW_OPTIONS.TWINS_HEAL = false;
            AQWarner_AddMessage(AQW_MSG.TWINS_HEAL_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."TwinsHealAnnounceInterval")) then
        AQW_OPTIONS.TWINS_HEAL_ANNOUNCE_INTERVAL = this:GetValue();

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonTwinsBugExplode")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.TWINS_BUG_EXPLODE = true;
            AQWarner_AddMessage(AQW_MSG.TWINS_BUG_EXPLODE_ENABLED);
        else
            AQW_OPTIONS.TWINS_BUG_EXPLODE = false;
            AQWarner_AddMessage(AQW_MSG.TWINS_BUG_EXPLODE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonTwinsSupreme")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.TWINS_SUPREME = true;
            AQWarner_AddMessage(AQW_MSG.TWINS_SUPREME_ENABLED);
        else
            AQW_OPTIONS.TWINS_SUPREME = false;
            AQWarner_AddMessage(AQW_MSG.TWINS_SUPREME_DISABLED);
        end
        
    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSlayerFrenzy")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SLAYER_FRENZY = true;
            AQWarner_AddMessage(AQW_MSG.SLAYER_FRENZY_ENABLED);
        else
            AQW_OPTIONS.SLAYER_FRENZY = false;
            AQWarner_AddMessage(AQW_MSG.SLAYER_FRENZY_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonSlayerWhirl")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.SLAYER_WHIRL = true;
            AQWarner_AddMessage(AQW_MSG.SLAYER_WHIRL_ENABLED);
        else
            AQW_OPTIONS.SLAYER_WHIRL = false;
            AQWarner_AddMessage(AQW_MSG.SLAYER_WHIRL_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonChampEnrage")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.CHAMP_ENRAGE = true;
            AQWarner_AddMessage(AQW_MSG.CHAMP_ENRAGE_ENABLED);
        else
            AQW_OPTIONS.CHAMP_ENRAGE = false;
            AQWarner_AddMessage(AQW_MSG.CHAMP_ENRAGE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonCThunGlare")) then
    
    		if (this:GetChecked()) then
    				AQW_OPTIONS.CTHUN_GLARE = true;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_GLARE_ENABLED);
    		else
    				AQW_OPTIONS.CTHUN_GLARE = false;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_GLARE_DISABLED);
    		end

    elseif (this:GetName() == (this:GetParent():GetName().."CThunGlarePrewarn")) then
        AQW_OPTIONS.CTHUN_GLARE_PREWARN = this:GetValue();

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonCThunEyeTent")) then
    
    		if (this:GetChecked()) then
    				AQW_OPTIONS.CTHUN_EYETENT = true;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_EYETENT_ENABLED);
    		else
    				AQW_OPTIONS.CTHUN_EYETENT = false;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_EYETENT_DISABLED);
    		end

    elseif (this:GetName() == (this:GetParent():GetName().."CThunEyeTentPrewarn")) then
        AQW_OPTIONS.CTHUN_EYETENT_PREWARN = this:GetValue();

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonCThunClawTent")) then
    
    		if (this:GetChecked()) then
    				AQW_OPTIONS.CTHUN_CLAWTENT = true;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_CLAWTENT_ENABLED);
    		else
    				AQW_OPTIONS.CTHUN_CLAWTENT = false;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_CLAWTENT_DISABLED);
    		end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonCThunStomach")) then
    
    		if (this:GetChecked()) then
    				AQW_OPTIONS.CTHUN_STOMACH = true;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_STOMACH_ENABLED);
    		else
    				AQW_OPTIONS.CTHUN_STOMACH = false;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_STOMACH_DISABLED);
    		end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonCThunEyeBeam")) then
    
    		if (this:GetChecked()) then
    				AQW_OPTIONS.CTHUN_EYEBEAM = true;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_EYEBEAM_ENABLED);
    		else
    				AQW_OPTIONS.CTHUN_EYEBEAM = false;
    				AQWarner_AddMessage(AQW_MSG.CTHUN_EYEBEAM_DISABLED);
    		end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonRajaxxWaves")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.RAJAXX_WAVES = true;
            AQWarner_AddMessage(AQW_MSG.RAJAXX_WAVES_ENABLED);
        else
            AQW_OPTIONS.RAJAXX_WAVES = false;
            AQWarner_AddMessage(AQW_MSG.RAJAXX_WAVES_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonBuruEyes")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.BURU_EYES = true;
            AQWarner_AddMessage(AQW_MSG.BURU_EYES_ENABLED);
        else
            AQW_OPTIONS.BURU_EYES = false;
            AQWarner_AddMessage(AQW_MSG.BURU_EYES_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonMoamAdds")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.MOAM_ADDS = true;
            AQWarner_AddMessage(AQW_MSG.MOAM_ADDS_ENABLED);
        else
            AQW_OPTIONS.TWINS_MOAM_ADDS = false;
            AQWarner_AddMessage(AQW_MSG.MOAM_ADDS_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAyamissSacrifice")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.AYAMISS_SACRIFICE = true;
            AQWarner_AddMessage(AQW_MSG.AYAMISS_SACRIFICE_ENABLED);
        else
            AQW_OPTIONS.AYAMISS_SACRIFICE = false;
            AQWarner_AddMessage(AQW_MSG.AYAMISS_SACRIFICE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Summon")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_SUMMON = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_SUMMON_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_SUMMON = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_SUMMON_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Plague")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_PLAGUE = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_PLAGUE_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_PLAGUE = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_PLAGUE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Thunderclap")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_THUNDERCLAP = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_THUNDERCLAP_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_THUNDERCLAP = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_THUNDERCLAP_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Storm")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_STORM = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_STORM_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_STORM = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_STORM_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Meteor")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_METEOR = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_METEOR_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_METEOR = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_METEOR_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Enrage")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_ENRAGE = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_ENRAGE_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_ENRAGE = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_ENRAGE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonAnubAQ20Explode")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.ANUB_AQ20_EXPLODE = true;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_EXPLODE_ENABLED);
        else
            AQW_OPTIONS.ANUB_AQ20_EXPLODE = false;
            AQWarner_AddMessage(AQW_MSG.ANUB_AQ20_EXPLODE_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonOssirianSupremeImminent")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.OSSIRIAN_SUPREME_IMMINENT = true;
            AQWarner_AddMessage(AQW_MSG.OSSIRIAN_SUPREME_IMMINENT_ENABLED);
        else
            AQW_OPTIONS.OSSIRIAN_SUPREME_IMMINENT = false;
            AQWarner_AddMessage(AQW_MSG.OSSIRIAN_SUPREME_IMMINENT_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonOssirianSupreme")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.OSSIRIAN_SUPREME = true;
            AQWarner_AddMessage(AQW_MSG.OSSIRIAN_SUPREME_ENABLED);
        else
            AQW_OPTIONS.OSSIRIAN_SUPREME = false;
            AQWarner_AddMessage(AQW_MSG.OSSIRIAN_SUPREME_DISABLED);
        end

    elseif (this:GetName() == (this:GetParent():GetName().."CheckButtonOssirianWeakness")) then

        if (this:GetChecked()) then
            AQW_OPTIONS.OSSIRIAN_WEAKNESS = true;
            AQWarner_AddMessage(AQW_MSG.OSSIRIAN_WEAKNESS_ENABLED);
        else
            AQW_OPTIONS.OSSIRIAN_WEAKNESS = false;
            AQWarner_AddMessage(AQW_MSG.OSSIRIAN_WEAKNESS_DISABLED);
        end

    end
end

--**********************************
--*                                *
--*        Frame Message           *
--*                                *
--**********************************
function AQWarner_OnShow()
    local textWidth = 0;

    if (not AQW_CONFIG_LOADED) then
        AQWarnerConfigFrame:Hide();
        return;
    end
    
    getglobal(AQWarnerConfigFrame:GetName().."CheckButtonAQWarner"):SetChecked(AQW_OPTIONS.ENABLED);
    getglobal(AQWarnerConfigFrame:GetName().."ButtonClose"):SetWidth(getglobal(AQWarnerConfigFrame:GetName().."ButtonClose"):GetTextWidth() + 20);
    getglobal(AQWarnerConfigFrame:GetName().."ButtonToDefault"):SetWidth(getglobal(AQWarnerConfigFrame:GetName().."ButtonToDefault"):GetTextWidth() + 20);

    getglobal(AQWGeneralOptionsTitle:GetName().."ConfigIntro"):SetText(AQW_DIA.CONFIG_INTRO);
    AQWGeneralOptionsTitle:SetWidth(getglobal(AQWGeneralOptionsTitle:GetName().."ConfigIntro"):GetWidth() + 40);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonStars"):SetChecked(AQW_OPTIONS.STARS);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonRaid"):SetChecked(AQW_OPTIONS.RAID);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonSound"):SetChecked(AQW_OPTIONS.SOUND);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonTells"):SetChecked(AQW_OPTIONS.SEND_TELLS);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonSelf"):SetChecked(AQW_OPTIONS.SELF_MESSAGE);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."MinimapButtonSlider"):SetValue(AQW_OPTIONS.MINIMAP_BUTTON_POSITION);
    getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonMinimapButtonToggle"):SetChecked(AQW_OPTIONS.MINIMAP_BUTTON);
    
    getglobal(AQWSkeramOptionsTitle:GetName().."SkeramIntro"):SetText(AQW_DIA.SKERAM_INTRO);
    AQWSkeramOptionsTitle:SetWidth(getglobal(AQWSkeramOptionsTitle:GetName().."SkeramIntro"):GetWidth() + 40);
    getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramAE"):SetChecked(AQW_OPTIONS.SKERAM_AE);
    getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramMC"):SetChecked(AQW_OPTIONS.SKERAM_MC);
    getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramSplit"):SetChecked(AQW_OPTIONS.SKERAM_SPLIT);

    getglobal(AQWTrioOptionsTitle:GetName().."TrioIntro"):SetText(AQW_DIA.TRIO_INTRO);
    AQWTrioOptionsTitle:SetWidth(getglobal(AQWTrioOptionsTitle:GetName().."TrioIntro"):GetWidth() + 40);
    getglobal(AQWarnerTrioOptionsFrame:GetName().."CheckButtonTrioYaujHeal"):SetChecked(AQW_OPTIONS.TRIO_YAUJ_HEAL);
    
    getglobal(AQWSarturaOptionsTitle:GetName().."SarturaIntro"):SetText(AQW_DIA.SARTURA_INTRO);
    AQWSarturaOptionsTitle:SetWidth(getglobal(AQWSarturaOptionsTitle:GetName().."SarturaIntro"):GetWidth() + 40);
    getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaWhirl"):SetChecked(AQW_OPTIONS.SARTURA_WHIRL);
    getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaEnrage"):SetChecked(AQW_OPTIONS.SARTURA_ENRAGE);
    getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaSupreme"):SetChecked(AQW_OPTIONS.SARTURA_SUPREME);
    
    getglobal(AQWFankrissOptionsTitle:GetName().."FankrissIntro"):SetText(AQW_DIA.FANKRISS_INTRO);
    AQWFankrissOptionsTitle:SetWidth(getglobal(AQWFankrissOptionsTitle:GetName().."FankrissIntro"):GetWidth() + 40);
    getglobal(AQWarnerFankrissOptionsFrame:GetName().."CheckButtonFankrissSummon"):SetChecked(AQW_OPTIONS.FANKRISS_SUMMON);

    getglobal(AQWHuhuranOptionsTitle:GetName().."HuhuranIntro"):SetText(AQW_DIA.HUHURAN_INTRO);
    AQWHuhuranOptionsTitle:SetWidth(getglobal(AQWHuhuranOptionsTitle:GetName().."HuhuranIntro"):GetWidth() + 40);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranFrenzy"):SetChecked(AQW_OPTIONS.HUHURAN_FRENZY);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranImminent"):SetChecked(AQW_OPTIONS.HUHURAN_IMMINENT);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."HuhuranBerserkLimit"):SetValue(AQW_OPTIONS.HUHURAN_BERSERK_LIMIT);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranBerserk"):SetChecked(AQW_OPTIONS.HUHURAN_BERSERK);
    getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranSting"):SetChecked(AQW_OPTIONS.HUHURAN_STING);
    
    getglobal(AQWAnubOptionsTitle:GetName().."AnubIntro"):SetText(AQW_DIA.ANUB_INTRO);
    AQWAnubOptionsTitle:SetWidth(getglobal(AQWAnubOptionsTitle:GetName().."AnubIntro"):GetWidth() + 40);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubSummon"):SetChecked(AQW_OPTIONS.ANUB_SUMMON);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubPlague"):SetChecked(AQW_OPTIONS.ANUB_PLAGUE);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubMeteor"):SetChecked(AQW_OPTIONS.ANUB_METEOR);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubThunderclap"):SetChecked(AQW_OPTIONS.ANUB_THUNDERCLAP);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubStorm"):SetChecked(AQW_OPTIONS.ANUB_STORM);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubExplode"):SetChecked(AQW_OPTIONS.ANUB_EXPLODE);
    getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubEnrage"):SetChecked(AQW_OPTIONS.ANUB_ENRAGE);

    getglobal(AQWTwinsOptionsTitle:GetName().."TwinsIntro"):SetText(AQW_DIA.TWINS_INTRO);
    AQWTwinsOptionsTitle:SetWidth(getglobal(AQWTwinsOptionsTitle:GetName().."TwinsIntro"):GetWidth() + 40);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsPort"):SetChecked(AQW_OPTIONS.TWINS_PORT);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsHeal"):SetChecked(AQW_OPTIONS.TWINS_HEAL);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."TwinsHealAnnounceInterval"):SetValue(AQW_OPTIONS.TWINS_HEAL_ANNOUNCE_INTERVAL);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsBugExplode"):SetChecked(AQW_OPTIONS.TWINS_BUG_EXPLODE);
    getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsSupreme"):SetChecked(AQW_OPTIONS.TWINS_SUPREME);

    getglobal(AQWSlayerOptionsTitle:GetName().."SlayerIntro"):SetText(AQW_DIA.SLAYER_INTRO);
    AQWSlayerOptionsTitle:SetWidth(getglobal(AQWSlayerOptionsTitle:GetName().."SlayerIntro"):GetWidth() + 40);
    getglobal(AQWarnerSlayerOptionsFrame:GetName().."CheckButtonSlayerFrenzy"):SetChecked(AQW_OPTIONS.SLAYER_FRENZY);
    getglobal(AQWarnerSlayerOptionsFrame:GetName().."CheckButtonSlayerWhirl"):SetChecked(AQW_OPTIONS.SLAYER_WHIRL);

    getglobal(AQWChampOptionsTitle:GetName().."ChampIntro"):SetText(AQW_DIA.CHAMP_INTRO);
    AQWChampOptionsTitle:SetWidth(getglobal(AQWChampOptionsTitle:GetName().."ChampIntro"):GetWidth() + 40);
    getglobal(AQWarnerChampOptionsFrame:GetName().."CheckButtonChampEnrage"):SetChecked(AQW_OPTIONS.CHAMP_ENRAGE);

    getglobal(AQWCThunOptionsTitle:GetName().."CThunIntro"):SetText(AQW_DIA.CTHUN_INTRO);
    AQWCThunOptionsTitle:SetWidth(getglobal(AQWCThunOptionsTitle:GetName().."CThunIntro"):GetWidth() + 40);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunGlare"):SetChecked(AQW_OPTIONS.CTHUN_GLARE);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CThunGlarePrewarn"):SetValue(AQW_OPTIONS.CTHUN_GLARE_PREWARN);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunEyeTent"):SetChecked(AQW_OPTIONS.CTHUN_EYETENT);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CThunEyeTentPrewarn"):SetValue(AQW_OPTIONS.CTHUN_EYETENT_PREWARN);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunClawTent"):SetChecked(AQW_OPTIONS.CTHUN_CLAWTENT);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunStomach"):SetChecked(AQW_OPTIONS.CTHUN_STOMACH);
    getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunEyeBeam"):SetChecked(AQW_OPTIONS.CTHUN_EYEBEAM);

    getglobal(AQWRajaxxOptionsTitle:GetName().."RajaxxIntro"):SetText(AQW_DIA.RAJAXX_INTRO);
    AQWRajaxxOptionsTitle:SetWidth(getglobal(AQWRajaxxOptionsTitle:GetName().."RajaxxIntro"):GetWidth() + 40);
    getglobal(AQWarnerRajaxxOptionsFrame:GetName().."CheckButtonRajaxxWaves"):SetChecked(AQW_OPTIONS.RAJAXX_WAVES);

    getglobal(AQWBuruOptionsTitle:GetName().."BuruIntro"):SetText(AQW_DIA.BURU_INTRO);
    AQWBuruOptionsTitle:SetWidth(getglobal(AQWBuruOptionsTitle:GetName().."BuruIntro"):GetWidth() + 40);
    getglobal(AQWarnerBuruOptionsFrame:GetName().."CheckButtonBuruEyes"):SetChecked(AQW_OPTIONS.BURU_EYES);

    getglobal(AQWMoamOptionsTitle:GetName().."MoamIntro"):SetText(AQW_DIA.MOAM_INTRO);
    AQWMoamOptionsTitle:SetWidth(getglobal(AQWMoamOptionsTitle:GetName().."MoamIntro"):GetWidth() + 40);
    getglobal(AQWarnerMoamOptionsFrame:GetName().."CheckButtonMoamAdds"):SetChecked(AQW_OPTIONS.MOAM_ADDS);

    getglobal(AQWAyamissOptionsTitle:GetName().."AyamissIntro"):SetText(AQW_DIA.AYAMISS_INTRO);
    AQWAyamissOptionsTitle:SetWidth(getglobal(AQWAyamissOptionsTitle:GetName().."AyamissIntro"):GetWidth() + 40);
    getglobal(AQWarnerAyamissOptionsFrame:GetName().."CheckButtonAyamissSacrifice"):SetChecked(AQW_OPTIONS.AYAMISS_SACRIFICE);

    getglobal(AQWAnubAQ20OptionsTitle:GetName().."AnubAQ20Intro"):SetText(AQW_DIA.ANUB_AQ20_INTRO);
    AQWAnubAQ20OptionsTitle:SetWidth(getglobal(AQWAnubAQ20OptionsTitle:GetName().."AnubAQ20Intro"):GetWidth() + 40);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Summon"):SetChecked(AQW_OPTIONS.ANUB_AQ20_SUMMON);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Plague"):SetChecked(AQW_OPTIONS.ANUB_AQ20_PLAGUE);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Meteor"):SetChecked(AQW_OPTIONS.ANUB_AQ20_METEOR);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Thunderclap"):SetChecked(AQW_OPTIONS.ANUB_AQ20_THUNDERCLAP);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Storm"):SetChecked(AQW_OPTIONS.ANUB_AQ20_STORM);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Explode"):SetChecked(AQW_OPTIONS.ANUB_AQ20_EXPLODE);
    getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Enrage"):SetChecked(AQW_OPTIONS.ANUB_AQ20_ENRAGE);

    getglobal(AQWOssirianOptionsTitle:GetName().."OssirianIntro"):SetText(AQW_DIA.OSSIRIAN_INTRO);
    AQWOssirianOptionsTitle:SetWidth(getglobal(AQWOssirianOptionsTitle:GetName().."OssirianIntro"):GetWidth() + 40);
    getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianSupremeImminent"):SetChecked(AQW_OPTIONS.OSSIRIAN_SUPREME_IMMINENT);
    getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianSupreme"):SetChecked(AQW_OPTIONS.OSSIRIAN_SUPREME);
    getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianWeakness"):SetChecked(AQW_OPTIONS.OSSIRIAN_WEAKNESS);

    tinsert(UISpecialFrames,"AQWarnerConfigFrame");   
    AQWarnerConfigFrame:Show();
    AQWarnerSkeramOptionsFrame:Show();
    AQWarnerTrioOptionsFrame:Hide();
    AQWarnerSarturaOptionsFrame:Hide();
    AQWarnerFankrissOptionsFrame:Hide();
    AQWarnerHuhuranOptionsFrame:Hide();
    AQWarnerAnubOptionsFrame:Hide();
    AQWarnerTwinsOptionsFrame:Hide();
    AQWarnerSlayerOptionsFrame:Hide();
    AQWarnerChampOptionsFrame:Hide();
    AQWarnerCThunOptionsFrame:Hide();
    AQWarnerRajaxxOptionsFrame:Hide();
    AQWarnerBuruOptionsFrame:Hide();
    AQWarnerMoamOptionsFrame:Hide();
    AQWarnerAyamissOptionsFrame:Hide();
    AQWarnerAnubAQ20OptionsFrame:Hide();
    AQWarnerOssirianOptionsFrame:Hide();
end

--**********************************
--*                                *
--*        Close Dialog            *
--*                                *
--**********************************
function AQWarner_OnHide()
    AQWarner_SaveConfig();
    AQWarnerConfigFrame:Hide();
end

--**********************************
--*                                *
--*        Save Config             *
--*                                *
--**********************************
function AQWarner_SaveConfig()
    AQW_OPTIONS.ENABLED = getglobal(AQWarnerConfigFrame:GetName().."CheckButtonAQWarner"):GetChecked();

    AQW_OPTIONS.STARS = getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonStars"):GetChecked();
    AQW_OPTIONS.RAID = getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonRaid"):GetChecked();
    AQW_OPTIONS.SOUND = getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonSound"):GetChecked();
    AQW_OPTIONS.SEND_TELLS = getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonTells"):GetChecked();
    AQW_OPTIONS.SELF_MESSAGE = getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonSelf"):GetChecked();
    AQW_OPTIONS.MINIMAP_BUTTON_POSITION = getglobal(AQWarnerGeneralOptionsFrame:GetName().."MinimapButtonSlider"):GetValue();
    AQW_OPTIONS.MINIMAP_BUTTON = getglobal(AQWarnerGeneralOptionsFrame:GetName().."CheckButtonMinimapButtonToggle"):GetChecked();
    
    AQW_OPTIONS.SKERAM_AE = getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramAE"):GetChecked();
    AQW_OPTIONS.SKERAM_MC = getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramMC"):GetChecked();
    AQW_OPTIONS.SKERAM_SPLIT = getglobal(AQWarnerSkeramOptionsFrame:GetName().."CheckButtonSkeramSplit"):GetChecked();

    AQW_OPTIONS.TRIO_YAUJ_HEAL = getglobal(AQWarnerTrioOptionsFrame:GetName().."CheckButtonTrioYaujHeal"):GetChecked();
    
    AQW_OPTIONS.SARTURA_WHIRL = getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaWhirl"):GetChecked();
    AQW_OPTIONS.SARTURA_ENRAGE = getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaEnrage"):GetChecked();
    AQW_OPTIONS.SARTURA_SUPREME = getglobal(AQWarnerSarturaOptionsFrame:GetName().."CheckButtonSarturaSupreme"):GetChecked();
    
    AQW_OPTIONS.FANKRISS_SUMMON = getglobal(AQWarnerFankrissOptionsFrame:GetName().."CheckButtonFankrissSummon"):GetChecked();

    AQW_OPTIONS.HUHURAN_FRENZY = getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranFrenzy"):GetChecked();
    AQW_OPTIONS.HUHURAN_IMMINENT = getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranImminent"):GetChecked();
    AQW_OPTIONS.HUHURAN_BERSERK_LIMIT = getglobal(AQWarnerHuhuranOptionsFrame:GetName().."HuhuranBerserkLimit"):GetValue();
    AQW_OPTIONS.HUHURAN_BERSERK = getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranBerserk"):GetChecked();
    AQW_OPTIONS.HUHURAN_STING = getglobal(AQWarnerHuhuranOptionsFrame:GetName().."CheckButtonHuhuranSting"):GetChecked();
    
    AQW_OPTIONS.ANUB_SUMMON = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubSummon"):GetChecked();
    AQW_OPTIONS.ANUB_PLAGUE = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubPlague"):GetChecked();
    AQW_OPTIONS.ANUB_METEOR = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubMeteor"):GetChecked();
    AQW_OPTIONS.ANUB_THUNDERCLAP = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubThunderclap"):GetChecked();
    AQW_OPTIONS.ANUB_STORM = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubStorm"):GetChecked();
    AQW_OPTIONS.ANUB_EXPLODE = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubExplode"):GetChecked();
    AQW_OPTIONS.ANUB_ENRAGE = getglobal(AQWarnerAnubOptionsFrame:GetName().."CheckButtonAnubEnrage"):GetChecked();

    AQW_OPTIONS.TWINS_PORT = getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsPort"):GetChecked();
    AQW_OPTIONS.TWINS_HEAL = getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsHeal"):GetChecked();
    AQW_OPTIONS.TWINS_HEAL_ANNOUNCE_INTERVAL = getglobal(AQWarnerTwinsOptionsFrame:GetName().."TwinsHealAnnounceInterval"):GetValue();
    AQW_OPTIONS.TWINS_BUG_EXPLODE = getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsBugExplode"):GetChecked();
    AQW_OPTIONS.TWINS_SUPREME = getglobal(AQWarnerTwinsOptionsFrame:GetName().."CheckButtonTwinsSupreme"):GetChecked();
    
    AQW_OPTIONS.SLAYER_FRENZY = getglobal(AQWarnerSlayerOptionsFrame:GetName().."CheckButtonSlayerFrenzy"):GetChecked();
    AQW_OPTIONS.SLAYER_WHIRL = getglobal(AQWarnerSlayerOptionsFrame:GetName().."CheckButtonSlayerWhirl"):GetChecked();

    AQW_OPTIONS.CHAMP_ENRAGE = getglobal(AQWarnerChampOptionsFrame:GetName().."CheckButtonChampEnrage"):GetChecked();

    AQW_OPTIONS.CTHUN_GLARE = getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunGlare"):GetChecked();
    AQW_OPTIONS.CTHUN_GLARE_PREWARN = getglobal(AQWarnerCThunOptionsFrame:GetName().."CThunGlarePrewarn"):GetValue();
    AQW_OPTIONS.CTHUN_EYETENT = getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunEyeTent"):GetChecked();
    AQW_OPTIONS.CTHUN_EYETENT_PREWARN = getglobal(AQWarnerCThunOptionsFrame:GetName().."CThunEyeTentPrewarn"):GetValue();
    AQW_OPTIONS.CTHUN_CLAWTENT = getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunClawTent"):GetChecked();
    AQW_OPTIONS.CTHUN_STOMACH = getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunStomach"):GetChecked();
    AQW_OPTIONS.CTHUN_EYEBEAM = getglobal(AQWarnerCThunOptionsFrame:GetName().."CheckButtonCThunEyeBeam"):GetChecked();

    AQW_OPTIONS.RAJAXX_WAVES = getglobal(AQWarnerRajaxxOptionsFrame:GetName().."CheckButtonRajaxxWaves"):GetChecked();

    AQW_OPTIONS.BURU_EYES = getglobal(AQWarnerBuruOptionsFrame:GetName().."CheckButtonBuruEyes"):GetChecked();

    AQW_OPTIONS.MOAM_ADDS = getglobal(AQWarnerMoamOptionsFrame:GetName().."CheckButtonMoamAdds"):GetChecked();

    AQW_OPTIONS.AYAMISS_SACRIFICE = getglobal(AQWarnerAyamissOptionsFrame:GetName().."CheckButtonAyamissSacrifice"):GetChecked();

    AQW_OPTIONS.ANUB_AQ20_SUMMON = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Summon"):GetChecked();
    AQW_OPTIONS.ANUB_AQ20_PLAGUE = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Plague"):GetChecked();
    AQW_OPTIONS.ANUB_AQ20_METEOR = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Meteor"):GetChecked();
    AQW_OPTIONS.ANUB_AQ20_THUNDERCLAP = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Thunderclap"):GetChecked();
    AQW_OPTIONS.ANUB_AQ20_STORM = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Storm"):GetChecked();
    AQW_OPTIONS.ANUB_AQ20_EXPLODE = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Explode"):GetChecked();
    AQW_OPTIONS.ANUB_AQ20_ENRAGE = getglobal(AQWarnerAnubAQ20OptionsFrame:GetName().."CheckButtonAnubAQ20Enrage"):GetChecked();

    AQW_OPTIONS.OSSIRIAN_SUPREME_IMMINENT = getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianSupremeImminent"):GetChecked();
    AQW_OPTIONS.OSSIRIAN_SUPREME = getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianSupreme"):GetChecked();
    AQW_OPTIONS.OSSIRIAN_WEAKNESS = getglobal(AQWarnerOssirianOptionsFrame:GetName().."CheckButtonOssirianWeakness"):GetChecked();
end

--**********************************
--*                                *
--*       Minimap Button           *
--*                                *
--**********************************
function AQWarner_MinimapButtonClick(button)

    if (button == "LeftButton") then
    
        if (AQWarnerConfigFrame:IsVisible()) then
            AQWarner_OnHide();
        else
            AQWarner_OnShow();
        end
    
    elseif (button == "RightButton") then
        AQWarner_CmdToggle();
        
        if (AQWarnerConfigFrame:IsVisible()) then
            getglobal(AQWarnerConfigFrame:GetName().."CheckButtonAQWarner"):SetChecked(AQW_OPTIONS.ENABLED);
        end

    end

end

--**********************************
--*                                *
--*     Move Minimap Button        *
--*                                *
--**********************************
function AQWarner_ChangeMinimapPosition(theValue)
    theButton = getglobal("AQWMinimapButton");
    
    if (theButton == nil) then
        return;
    end
    
    x = cos(theValue)*80;
    y = sin(theValue)*80;
    
    theButton:SetPoint("CENTER", "Minimap", "CENTER", x, y);
    
    AQW_OPTIONS.MINIMAP_BUTTON_POSITION = theValue;

end

--**********************************
--*                                *
--*       OnLoad f. Dropdown       *
--*                                *
--**********************************
function AQWarner_DropdownOnLoad()
    this:RegisterEvent("VARIABLES_LOADED");
end

--**********************************
--*                                *
--*       OnEvent f. Dropdown      *
--*                                *
--**********************************
function AQWarner_DropdownOnEvent()
    
    if (event == "VARIABLES_LOADED") then
        UIDropDownMenu_Initialize(AQWarnerDropdownSelect, AQWarner_DropdownInit);
        UIDropDownMenu_SetSelectedID(AQWarnerDropdownSelect, 3);
        UIDropDownMenu_SetWidth(175);
    end
    
end

--**********************************
--*                                *
--*    Dropdown Initialisation     *
--*                                *
--**********************************
function AQWarner_DropdownInit()
    local info;
    
    for i = 1, getn(AQW_DIA.DROPDOWN_OPTIONS) do
        info = {
            text = AQW_DIA.DROPDOWN_OPTIONS[i]["TITLE"];
            func = AQW_DIA.DROPDOWN_OPTIONS[i]["FUNC"];
        };
        UIDropDownMenu_AddButton(info);
    end
    
end

--**********************************
--*                                *
--*        Select Skeram           *
--*                                *
--**********************************
function AQWarner_SkeramOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerSkeramOptionsFrame:Show();
end

--**********************************
--*                                *
--*       Vem/Yauj/Kri Select      *
--*                                *
--**********************************
function AQWarner_TrioOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerTrioOptionsFrame:Show();
end

--**********************************
--*                                *
--*       Sartura Select           *
--*                                *
--**********************************
function AQWarner_SarturaOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerSarturaOptionsFrame:Show();
end

--**********************************
--*                                *
--*       Fankriss Select          *
--*                                *
--**********************************
function AQWarner_FankrissOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerFankrissOptionsFrame:Show();
end

--**********************************
--*                                *
--*       Huhuran Select           *
--*                                *
--**********************************
function AQWarner_HuhuranOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerHuhuranOptionsFrame:Show();
end

--**********************************
--*                                *
--*    Anubisath Defender Select   *
--*                                *
--**********************************
function AQWarner_AnubOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerAnubOptionsFrame:Show();
end

--**********************************
--*                                *
--*     Twin Emperors Select       *
--*                                *
--**********************************
function AQWarner_TwinsOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerTwinsOptionsFrame:Show();
end

--**********************************
--*                                *
--*     Qiraji Slayer Select       *
--*                                *
--**********************************
function AQWarner_SlayerOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerSlayerOptionsFrame:Show();
end

--**********************************
--*                                *
--*     Qiraji Champion Select     *
--*                                *
--**********************************
function AQWarner_ChampOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerChampOptionsFrame:Show();
end

--**********************************
--*                                *
--*   Obsidian Nullifier Select    *
--*                                *
--**********************************
function AQWarner_NullifierOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerNullifierOptionsFrame:Show();
end

--**********************************
--*                                *
--*    Anubisath Warder Select     *
--*                                *
--**********************************
function AQWarner_WarderOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerWarderOptionsFrame:Show();
end

--**********************************
--*                                *
--*    				C'Thun							 *
--*                                *
--**********************************
function AQWarner_CThunOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerCThunOptionsFrame:Show();
end

--**********************************
--*                                *
--*         Rajaxx Select          *
--*                                *
--**********************************
function AQWarner_RajaxxOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarnerSkeramOptionsFrame:Hide();
    AQWarner_HideAllSubFrames();
    AQWarnerRajaxxOptionsFrame:Show();
end

--**********************************
--*                                *
--*         Buru Select            *
--*                                *
--**********************************
function AQWarner_BuruOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerBuruOptionsFrame:Show();
end

--**********************************
--*                                *
--*         Moam Select            *
--*                                *
--**********************************
function AQWarner_MoamOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerMoamOptionsFrame:Show();
end

--**********************************
--*                                *
--*        Ayamiss Select          *
--*                                *
--**********************************
function AQWarner_AyamissOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerAyamissOptionsFrame:Show();
end

--**********************************
--*                                *
--*   Anubisath Guardian Select    *
--*                                *
--**********************************
function AQWarner_AnubAQ20OnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerAnubAQ20OptionsFrame:Show();
end

--**********************************
--*                                *
--*       Ossirian Select          *
--*                                *
--**********************************
function AQWarner_OssirianOnClick()
    AQWarner_SetDropdownSelect(this);
    AQWarner_HideAllSubFrames();
    AQWarnerOssirianOptionsFrame:Show();
end

--**********************************
--*                                *
--*        Dummy Function          *
--*                                *
--**********************************
function AQWarner_Dummy()
end

--**********************************
--*                                *
--*   Set Selected Dropdown Item   *
--*                                *
--**********************************
function AQWarner_SetDropdownSelect(itemSelected)
    i = itemSelected:GetID();
    AQW_OPTIONS.CURRENT_SELECT = i;
    UIDropDownMenu_SetSelectedID(AQWarnerDropdownSelect, i);
end

--**********************************
--*                                *
--*        Dummy Function          *
--*                                *
--**********************************
function AQWarner_HideAllSubFrames()
    AQWarnerSkeramOptionsFrame:Hide();
    AQWarnerTrioOptionsFrame:Hide();
    AQWarnerSarturaOptionsFrame:Hide();
    AQWarnerFankrissOptionsFrame:Hide();
    AQWarnerHuhuranOptionsFrame:Hide();
    AQWarnerAnubOptionsFrame:Hide();
    AQWarnerTwinsOptionsFrame:Hide();
    AQWarnerSlayerOptionsFrame:Hide();
    AQWarnerChampOptionsFrame:Hide();
--    AQWarnerNullifierOptionsFrame:Hide();
--		AQWarnerWarderOptionsFrame:Hide();
		AQWarnerCThunOptionsFrame:Hide();
    AQWarnerRajaxxOptionsFrame:Hide();
    AQWarnerBuruOptionsFrame:Hide();
    AQWarnerMoamOptionsFrame:Hide();
    AQWarnerAyamissOptionsFrame:Hide();
    AQWarnerAnubAQ20OptionsFrame:Hide();
    AQWarnerOssirianOptionsFrame:Hide();
end